Skip to content

Commit

Permalink
Bump compiler mins to gcc12, clang16, xcode16.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Jan 29, 2025
1 parent 6a2ce27 commit 6640126
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
10 changes: 0 additions & 10 deletions include/bitcoin/system/data/memory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,7 @@ inline std::shared_ptr<const Type> to_shared(const Type& value) NOEXCEPT
template <typename Type, typename ...Args>
inline std::shared_ptr<const Type> to_shared(Args&&... values) NOEXCEPT
{
// Type{} required due to CLang bug.
#if defined HAVE_CLANG
return std::make_shared<const Type>(Type{ std::forward<Args>(values)... });
#else
return std::make_shared<const Type>(std::forward<Args>(values)...);
#endif
}

/// Obtain non constant pointer from shared_ptr to const.
Expand Down Expand Up @@ -127,12 +122,7 @@ inline std::unique_ptr<const Type> to_unique(const Type& value) NOEXCEPT
template <typename Type, typename ...Args>
inline std::unique_ptr<const Type> to_unique(Args&&... values) NOEXCEPT
{
// Type{} required due to CLang bug.
#if defined HAVE_CLANG
return std::make_unique<const Type>(Type{ std::forward<Args>(values)... });
#else
return std::make_unique<const Type>(std::forward<Args>(values)...);
#endif
}

BC_POP_WARNING()
Expand Down
14 changes: 7 additions & 7 deletions include/bitcoin/system/have.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,30 +194,30 @@
#define HAVE_STRING_CONSTEXPR
#define HAVE_VECTOR_CONSTEXPR
#elif defined(HAVE_CLANG)
// Apple clang version 15.0.0 (clang-1500.0.40.1)
// Apple clang version 15
#if defined(HAVE_APPLE)
#define HAVE_RANGES
#define HAVE_CONSTEVAL
#define HAVE_STRING_CONSTEXPR
#define HAVE_VECTOR_CONSTEXPR
// Ubuntu clang version 15.0.7
// Ubuntu clang version 16
#else
////#define HAVE_RANGES (v16)
#define HAVE_RANGES
////#define HAVE_CONSTEVAL (v17)
#define HAVE_STRING_CONSTEXPR
#define HAVE_VECTOR_CONSTEXPR
#endif
// gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
// gcc version 12
#elif defined(HAVE_GCC)
#define HAVE_RANGES
#define HAVE_CONSTEVAL
////#define HAVE_STRING_CONSTEXPR (v12)
////#define HAVE_VECTOR_CONSTEXPR (v12)
#define HAVE_STRING_CONSTEXPR
#define HAVE_VECTOR_CONSTEXPR
#endif
#endif

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

/// None on xcode.
/// Requires link with -ltbb on gcc (v9).
Expand Down

0 comments on commit 6640126

Please sign in to comment.