move CPP20 constexpr to compat

v1
Brett 2023-10-27 00:00:01 -04:00
parent 8d2bb93b2d
commit 827ee4bd55
2 changed files with 3 additions and 6 deletions

View File

@ -21,9 +21,11 @@
#if __cplusplus >= 202002L #if __cplusplus >= 202002L
#define BLT_CONTAINS(container, value) container.contains(value) #define BLT_CONTAINS(container, value) container.contains(value)
#define BLT_CPP20_CONSTEXPR constexpr
#else #else
#include <algorithm> #include <algorithm>
#define BLT_CONTAINS(container, value) std::find(container.begin(), container.end(), value) != container.end() #define BLT_CONTAINS(container, value) std::find(container.begin(), container.end(), value) != container.end()
#define BLT_CPP20_CONSTEXPR
#endif #endif
#define INCLUDE_FS \ #define INCLUDE_FS \

View File

@ -13,12 +13,7 @@
#include <algorithm> #include <algorithm>
#include <vector> #include <vector>
#include <cctype> #include <cctype>
#include <blt/compatibility.h>
#if __cplusplus >= 202002L
#define BLT_CPP20_CONSTEXPR constexpr
#else
#define BLT_CPP20_CONSTEXPR
#endif
namespace blt::string namespace blt::string
{ {