aboutsummaryrefslogtreecommitdiff
path: root/include/openvic-dataloader/detail
diff options
context:
space:
mode:
Diffstat (limited to 'include/openvic-dataloader/detail')
-rw-r--r--include/openvic-dataloader/detail/Constexprs.hpp27
-rw-r--r--include/openvic-dataloader/detail/OptionalConstexpr.hpp9
-rw-r--r--include/openvic-dataloader/detail/VectorConstexpr.hpp9
3 files changed, 27 insertions, 18 deletions
diff --git a/include/openvic-dataloader/detail/Constexprs.hpp b/include/openvic-dataloader/detail/Constexprs.hpp
new file mode 100644
index 0000000..ade1bfa
--- /dev/null
+++ b/include/openvic-dataloader/detail/Constexprs.hpp
@@ -0,0 +1,27 @@
+#pragma once
+
+// THANK YOU APPLE FOR YOUR UTTER DISREGARD FOR C++20
+
+#if defined(__cpp_lib_optional) && __cpp_lib_optional >= 202106L
+#define OVDL_OPTIONAL_CONSTEXPR constexpr
+#else
+#define OVDL_OPTIONAL_CONSTEXPR inline
+#endif
+
+#if defined(__cpp_lib_constexpr_string) && __cpp_lib_constexpr_string >= 201907L
+#define OVDL_STRING_CONSTEXPR constexpr
+#else
+#define OVDL_STRING_CONSTEXPR inline
+#endif
+
+#if defined(__cpp_lib_optional) && __cpp_lib_optional >= 202106L && defined(__cpp_lib_constexpr_string) && __cpp_lib_constexpr_string >= 201907L
+#define OVDL_STR_OPT_CONSTEXPR constexpr
+#else
+#define OVDL_STR_OPT_CONSTEXPR inline
+#endif
+
+#if defined(__cpp_lib_constexpr_vector) && __cpp_lib_constexpr_vector >= 201907L
+#define OVDL_VECTOR_CONSTEXPR constexpr
+#else
+#define OVDL_VECTOR_CONSTEXPR inline
+#endif \ No newline at end of file
diff --git a/include/openvic-dataloader/detail/OptionalConstexpr.hpp b/include/openvic-dataloader/detail/OptionalConstexpr.hpp
deleted file mode 100644
index bcb12a7..0000000
--- a/include/openvic-dataloader/detail/OptionalConstexpr.hpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#pragma once
-
-// THANK YOU APPLE FOR YOUR UTTER DISREGARD FOR C++20
-
-#if __cpp_lib_optional >= 202106L
-#define OVDL_OPTIONAL_CONSTEXPR constexpr
-#else
-#define OVDL_OPTIONAL_CONSTEXPR inline
-#endif \ No newline at end of file
diff --git a/include/openvic-dataloader/detail/VectorConstexpr.hpp b/include/openvic-dataloader/detail/VectorConstexpr.hpp
deleted file mode 100644
index 7e7fa34..0000000
--- a/include/openvic-dataloader/detail/VectorConstexpr.hpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#pragma once
-
-// THANK YOU APPLE FOR YOUR UTTER DISREGARD FOR C++20
-
-#if __cpp_lib_constexpr_vector >= 201907L
-#define OVDL_VECTOR_CONSTEXPR constexpr
-#else
-#define OVDL_VECTOR_CONSTEXPR inline
-#endif \ No newline at end of file