Skip to content

Commit

Permalink
[ci] clang-19 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Nov 2, 2024
1 parent d9d18b9 commit 0f393f8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
16 changes: 16 additions & 0 deletions src/lib/score/serialization/IsTemplate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ struct is_template<T<Args...>> : std::true_type
};

template <template <class, auto, auto...> class T, class Arg1, auto Arg2, auto... Arg3>
requires(sizeof...(Arg3) > 0)
struct is_template<T<Arg1, Arg2, Arg3...>> : std::true_type
{
};
template <template <auto, class, class...> class T, auto Arg1, class Arg2, class... Arg3>
requires(sizeof...(Arg3) > 0)
struct is_template<T<Arg1, Arg2, Arg3...>> : std::true_type
{
};
Expand Down Expand Up @@ -72,13 +74,27 @@ template <template <class, std::size_t> class T, class X, std::size_t u>
struct is_template<T<X, u>> : std::true_type
{
};

#if defined(__clang__) && (__clang_major__ >= 19)
// https://gcc.godbolt.org/z/v115ch8oe
template <
template <class, std::size_t, class, class> class T, class X, std::size_t u, class A,
class B>
struct is_template<T<X, u, A, B>> : std::true_type
{
};

#endif
#endif

// For IdContainer

#if !defined(__clang__) || (__clang_major__ < 19)
template <template <class, bool> class T, class A, bool C>
struct is_template<T<A, C>> : std::true_type
{
};
#endif

template <template <class, class, bool> class T, class A, class B, bool C>
struct is_template<T<A, B, C>> : std::true_type
Expand Down
4 changes: 3 additions & 1 deletion src/lib/score/tools/RecursiveWatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@
#include <version>
#endif

// https://github.com/ned14/llfio/issues/144
#if __has_include(<llfio.hpp>) \
&& (__cpp_lib_concepts >= 202002L) \
&& (__cpp_lib_span >= 202002L) && __has_include(<span>) \
&& defined(__linux__) \
&& !defined(_WIN32) \
&& !defined(__EMSCRIPTEN__) \
&& !defined(__APPLE__) \
&& (!defined(__clang_major__) || __clang_major__ >= 14)
&& (!defined(__clang_major__) || (__clang_major__ >= 14 && __clang_major__ < 19))
#define SCORE_HAS_LLFIO 1
#elif defined(__APPLE__)
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_15
Expand All @@ -33,6 +34,7 @@
#define LLFIO_EXPERIMENTAL_STATUS_CODE 1
#define LLFIO_DISABLE_OPENSSL 1
#define QUICKCPPLIB_USE_STD_SPAN 1
// #define OUTCOME_USE_SYSTEM_STATUS_CODE 0

#if !defined(__has_feature)
#define __has_feature(T) 0
Expand Down

0 comments on commit 0f393f8

Please sign in to comment.