summaryrefslogtreecommitdiff
path: root/asl
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2024-08-17 00:27:25 +0200
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2024-08-17 00:28:03 +0200
commitdb34f151779fbfc72a5c6d373b9b5b25da9085b7 (patch)
tree1c0b6c91d6b04e0f812b41c99199e52698bc53f3 /asl
parent4ad4091b38faa39ddd2deae7455bd3a26531994f (diff)
Enable compilation on ChromeOS
Diffstat (limited to 'asl')
-rw-r--r--asl/meta.hpp6
-rw-r--r--asl/utility.hpp12
2 files changed, 14 insertions, 4 deletions
diff --git a/asl/meta.hpp b/asl/meta.hpp
index 614fa5d..4a5b448 100644
--- a/asl/meta.hpp
+++ b/asl/meta.hpp
@@ -85,9 +85,9 @@ template<typename T> concept is_integral = __is_integral(T);
template<typename T> concept is_floating_point = __is_floating_point(T);
template<typename T> concept is_arithmetic = is_integral<T> || is_floating_point<T>;
-template<typename T> struct _is_array_helper : false_type {};
-template<typename T> struct _is_array_helper<T[]> : true_type {};
-template<typename T, size_t N> struct _is_array_helper<T[N]> : true_type {};
+template<typename T> struct _is_array_helper : false_type {};
+template<typename T> struct _is_array_helper<T[]> : true_type {};
+template<typename T, int N> struct _is_array_helper<T[N]> : true_type {};
template<typename T> concept is_array = _is_array_helper<T>::value;
diff --git a/asl/utility.hpp b/asl/utility.hpp
index e8b9d86..33734a5 100644
--- a/asl/utility.hpp
+++ b/asl/utility.hpp
@@ -1,4 +1,14 @@
#pragma once
-#define ASL_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]]
+#ifdef _MSVC_VER_
+#elif defined(__clang_version__)
+#else
+ #error Not a valid environment
+#endif
+
+#ifdef _MSVC_VER_
+ #define ASL_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]]
+#else
+ #define ASL_NO_UNIQUE_ADDRESS [[no_unique_address]]
+#endif