fix: MP_UNITS_NONCONST_TYPE disabled for gcc-12

This commit is contained in:
Mateusz Pusz
2024-11-13 22:48:19 +01:00
parent 2590aa4b80
commit f5b9288825

View File

@@ -81,7 +81,7 @@
// workarounds for https://cplusplus.github.io/CWG/issues/2387.html
#define MP_UNITS_INLINE inline
#if __cpp_auto_cast >= 202110L
#if __cpp_auto_cast >= 202110L && MP_UNITS_COMP_GCC != 12
#define MP_UNITS_NONCONST_TYPE(expr) decltype(auto(expr))
#else
#define MP_UNITS_NONCONST_TYPE(expr) std::remove_const_t<decltype(expr)>