Skip to content

Commit aa8a735

Browse files
authored
Merge pull request #1600 from evoskuil/master
Bump compiler mins to gcc12, clang16, xcode16.
2 parents 6a2ce27 + 222aa04 commit aa8a735

3 files changed

Lines changed: 12 additions & 22 deletions

File tree

include/bitcoin/system/data/memory.hpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,7 @@ inline std::shared_ptr<const Type> to_shared(const Type& value) NOEXCEPT
6666
template <typename Type, typename ...Args>
6767
inline std::shared_ptr<const Type> to_shared(Args&&... values) NOEXCEPT
6868
{
69-
// Type{} required due to CLang bug.
70-
#if defined HAVE_CLANG
71-
return std::make_shared<const Type>(Type{ std::forward<Args>(values)... });
72-
#else
7369
return std::make_shared<const Type>(std::forward<Args>(values)...);
74-
#endif
7570
}
7671

7772
/// Obtain non constant pointer from shared_ptr to const.
@@ -127,12 +122,7 @@ inline std::unique_ptr<const Type> to_unique(const Type& value) NOEXCEPT
127122
template <typename Type, typename ...Args>
128123
inline std::unique_ptr<const Type> to_unique(Args&&... values) NOEXCEPT
129124
{
130-
// Type{} required due to CLang bug.
131-
#if defined HAVE_CLANG
132-
return std::make_unique<const Type>(Type{ std::forward<Args>(values)... });
133-
#else
134125
return std::make_unique<const Type>(std::forward<Args>(values)...);
135-
#endif
136126
}
137127

138128
BC_POP_WARNING()

include/bitcoin/system/have.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -194,30 +194,30 @@
194194
#define HAVE_STRING_CONSTEXPR
195195
#define HAVE_VECTOR_CONSTEXPR
196196
#elif defined(HAVE_CLANG)
197-
// Apple clang version 15.0.0 (clang-1500.0.40.1)
197+
// Apple clang version 15
198198
#if defined(HAVE_APPLE)
199199
#define HAVE_RANGES
200200
#define HAVE_CONSTEVAL
201201
#define HAVE_STRING_CONSTEXPR
202202
#define HAVE_VECTOR_CONSTEXPR
203-
// Ubuntu clang version 15.0.7
203+
// Ubuntu clang version 16
204204
#else
205-
////#define HAVE_RANGES (v16)
205+
#define HAVE_RANGES
206206
////#define HAVE_CONSTEVAL (v17)
207207
#define HAVE_STRING_CONSTEXPR
208208
#define HAVE_VECTOR_CONSTEXPR
209209
#endif
210-
// gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
210+
// gcc version 12
211211
#elif defined(HAVE_GCC)
212212
#define HAVE_RANGES
213213
#define HAVE_CONSTEVAL
214-
////#define HAVE_STRING_CONSTEXPR (v12)
215-
////#define HAVE_VECTOR_CONSTEXPR (v12)
214+
#define HAVE_STRING_CONSTEXPR
215+
#define HAVE_VECTOR_CONSTEXPR
216216
#endif
217217
#endif
218218

219219
/// C++20: parenthesized initialization of aggregates requires clang16/xcode16.
220-
/// We don't have macro treatment for that, just ad-hoc conditions.
220+
/// We don't have macro treatment for that, just ad-hoc HAVE_CLANG conditions.
221221

222222
/// None on xcode.
223223
/// Requires link with -ltbb on gcc (v9).

test/data/integer.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ BOOST_AUTO_TEST_CASE(integer__uint256_shift_right__null_hash__null_hash)
288288
{
289289
BOOST_REQUIRE_EQUAL(uint256_t() >> 0, uint256_t());
290290
BOOST_REQUIRE_EQUAL(uint256_t() >> 1, uint256_t());
291-
BOOST_REQUIRE_EQUAL(uint256_t() >> bc::max_uint32, uint256_t());
291+
BOOST_REQUIRE_EQUAL(uint256_t() >> 42, uint256_t());
292292
}
293293

294294
BOOST_AUTO_TEST_CASE(integer__uint256_shift_right__unit_hash_0__unit_hash)
@@ -301,7 +301,7 @@ BOOST_AUTO_TEST_CASE(integer__uint256_shift_right__unit_hash_positive__null_hash
301301
{
302302
static const uint256_t value(unit_hash);
303303
BOOST_REQUIRE_EQUAL(value >> 1, uint256_t());
304-
BOOST_REQUIRE_EQUAL(value >> bc::max_uint32, uint256_t());
304+
BOOST_REQUIRE_EQUAL(value >> 42, uint256_t());
305305
}
306306

307307
BOOST_AUTO_TEST_CASE(integer__uint256_shift_right__max_hash_1__most_hash)
@@ -452,7 +452,7 @@ BOOST_AUTO_TEST_CASE(integer__uint256_assign_shift_right__null_hash__null_hash)
452452
uint256_t value3;
453453
value1 >>= 0;
454454
value2 >>= 1;
455-
value3 >>= bc::max_uint32;
455+
value3 >>= 42;
456456
BOOST_REQUIRE_EQUAL(value1, uint256_t());
457457
BOOST_REQUIRE_EQUAL(value2, uint256_t());
458458
BOOST_REQUIRE_EQUAL(value3, uint256_t());
@@ -470,7 +470,7 @@ BOOST_AUTO_TEST_CASE(integer__uint256_assign_shift_right__unit_hash_positive__nu
470470
uint256_t value1(unit_hash);
471471
uint256_t value2(unit_hash);
472472
value1 >>= 1;
473-
value2 >>= bc::max_uint32;
473+
value2 >>= 42;
474474
BOOST_REQUIRE_EQUAL(value1, uint256_t());
475475
BOOST_REQUIRE_EQUAL(value2, uint256_t());
476476
}
@@ -499,7 +499,7 @@ BOOST_AUTO_TEST_CASE(integer__uint256_assign_shift_left__null_hash__null_hash)
499499
uint256_t value3;
500500
value1 <<= 0;
501501
value2 <<= 1;
502-
value3 <<= bc::max_uint32;
502+
value3 <<= 42;
503503
BOOST_REQUIRE_EQUAL(value1, uint256_t());
504504
BOOST_REQUIRE_EQUAL(value2, uint256_t());
505505
BOOST_REQUIRE_EQUAL(value3, uint256_t());

0 commit comments

Comments
 (0)