Skip to content

Commit

Permalink
fix: __cpp_deleted_function workaround for clang-19 added
Browse files Browse the repository at this point in the history
  • Loading branch information
mpusz committed Sep 27, 2024
1 parent 5f2cb78 commit 7ea1ea0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/core/include/mp-units/bits/hacks.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
#define MP_UNITS_DIAGNOSTIC_IGNORE_ZERO_AS_NULLPOINTER_CONSTANT \
MP_UNITS_DIAGNOSTIC_IGNORE("-Wzero-as-nullpointer-constant")
#define MP_UNITS_DIAGNOSTIC_IGNORE_DEPRECATED MP_UNITS_DIAGNOSTIC_IGNORE("-Wdeprecated-declarations")
#define MP_UNITS_DIAGNOSTIC_IGNORE_BUILTIN_MACRO_REDEFINED MP_UNITS_DIAGNOSTIC_IGNORE("-Wbuiltin-macro-redefined")
#else
#define MP_UNITS_DIAGNOSTIC_PUSH MP_UNITS_PRAGMA(warning(push))
#define MP_UNITS_DIAGNOSTIC_POP MP_UNITS_PRAGMA(warning(pop))
Expand Down Expand Up @@ -103,6 +104,18 @@ inline constexpr from_range_t from_range{};

#endif

// TODO https://github.com/llvm/llvm-project/issues/110224
#if MP_UNITS_COMP_CLANG == 19 && __cplusplus <= 202302

MP_UNITS_DIAGNOSTIC_PUSH
MP_UNITS_DIAGNOSTIC_IGNORE_BUILTIN_MACRO_REDEFINED

#undef __cpp_deleted_function

MP_UNITS_DIAGNOSTIC_POP

#endif

#if defined MP_UNITS_COMP_CLANG && MP_UNITS_COMP_CLANG < 17

#define MP_UNITS_CONSTEVAL constexpr
Expand Down

0 comments on commit 7ea1ea0

Please sign in to comment.