detect c++23

This commit is contained in:
conrad
2024-02-02 13:52:19 +10:00
parent 614f2a9c68
commit efcd328e19
3 changed files with 19 additions and 2 deletions
+7
View File
@@ -181,6 +181,13 @@ struct arma_config
#endif
#if defined(ARMA_HAVE_CXX23)
static constexpr bool cxx23 = true;
#else
static constexpr bool cxx23 = false;
#endif
#if (!defined(ARMA_DONT_USE_STD_MUTEX))
static constexpr bool std_mutex = true;
#else
+10
View File
@@ -20,6 +20,7 @@
#undef ARMA_HAVE_CXX14
#undef ARMA_HAVE_CXX17
#undef ARMA_HAVE_CXX20
#undef ARMA_HAVE_CXX23
#if (__cplusplus >= 201103L)
#define ARMA_HAVE_CXX11
@@ -37,6 +38,10 @@
#define ARMA_HAVE_CXX20
#endif
#if (__cplusplus >= 202302L)
#define ARMA_HAVE_CXX23
#endif
// MS really can't get its proverbial shit together
#if defined(_MSVC_LANG)
@@ -59,6 +64,11 @@
#define ARMA_HAVE_CXX20
#endif
#if (_MSVC_LANG >= 202302L)
#undef ARMA_HAVE_CXX23
#define ARMA_HAVE_CXX23
#endif
#endif
+2 -2
View File
@@ -263,8 +263,7 @@ arma_print(const T1& x, const T2& y, const T3& z)
//
// arma_sigprint
//! print a message to the log stream with a preceding @ character.
//! by default the log stream is cout.
//! print a message to the cerr stream with a preceding @ character.
//! used for printing the signature of a function
//! (see the arma_extra_debug_sigprint macro)
inline
@@ -1424,6 +1423,7 @@ arma_assert_atlas_size(const T1& A, const T2& B)
out << "@ arma_config::cxx14 = " << arma_config::cxx14 << '\n';
out << "@ arma_config::cxx17 = " << arma_config::cxx17 << '\n';
out << "@ arma_config::cxx20 = " << arma_config::cxx20 << '\n';
out << "@ arma_config::cxx23 = " << arma_config::cxx23 << '\n';
out << "@ arma_config::std_mutex = " << arma_config::std_mutex << '\n';
out << "@ arma_config::posix = " << arma_config::posix << '\n';
out << "@ arma_config::openmp = " << arma_config::openmp << '\n';