From db34f151779fbfc72a5c6d373b9b5b25da9085b7 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Sat, 17 Aug 2024 00:27:25 +0200 Subject: Enable compilation on ChromeOS --- asl/meta.hpp | 6 +++--- asl/utility.hpp | 12 +++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'asl') 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 concept is_integral = __is_integral(T); template concept is_floating_point = __is_floating_point(T); template concept is_arithmetic = is_integral || is_floating_point; -template struct _is_array_helper : false_type {}; -template struct _is_array_helper : true_type {}; -template struct _is_array_helper : true_type {}; +template struct _is_array_helper : false_type {}; +template struct _is_array_helper : true_type {}; +template struct _is_array_helper : true_type {}; template concept is_array = _is_array_helper::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 -- cgit