fix: gcc-13

gcc-13 ICE on `decltype(auto(...))`
This commit is contained in:
Mateusz Pusz
2024-11-18 09:58:01 +01:00
parent a1d8c4d6a5
commit c1d323a91a

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 && MP_UNITS_COMP_GCC != 12
#if __cpp_auto_cast >= 202110L && MP_UNITS_COMP_GCC > 13
#define MP_UNITS_NONCONST_TYPE(expr) decltype(auto(expr))
#else
#define MP_UNITS_NONCONST_TYPE(expr) std::remove_const_t<decltype(expr)>