From 180cac5cc6344ca6dac57c274e2ed2cfc22733e9 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Tue, 1 Feb 2022 20:06:10 -0600 Subject: [PATCH] [ox/std] Add std::is_constant_evaluated() --- deps/ox/src/ox/std/typetraits.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deps/ox/src/ox/std/typetraits.hpp b/deps/ox/src/ox/std/typetraits.hpp index 576e1591..1cc38ddc 100644 --- a/deps/ox/src/ox/std/typetraits.hpp +++ b/deps/ox/src/ox/std/typetraits.hpp @@ -21,6 +21,10 @@ namespace std { template constexpr bool is_union_v = __is_union(T); +constexpr bool is_constant_evaluated() noexcept { + return __builtin_is_constant_evaluated(); +} + } #endif