tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
is_constant_evaluated.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSL-1.0
2
3
#ifndef TETL_TYPE_TRAITS_IS_CONSTANT_EVALUATED_HPP
4
#define TETL_TYPE_TRAITS_IS_CONSTANT_EVALUATED_HPP
5
6
#include <
etl/_config/all.hpp
>
7
8
namespace
etl
{
9
16
[[nodiscard]]
constexpr
auto
is_constant_evaluated
() noexcept ->
bool
17
{
18
#if __has_builtin(__builtin_is_constant_evaluated)
19
return
__builtin_is_constant_evaluated();
20
#else
21
return
false
;
22
#endif
23
}
24
25
}
// namespace etl
26
27
#endif
// TETL_TYPE_TRAITS_IS_CONSTANT_EVALUATED_HPP
all.hpp
etl
Definition
adjacent_find.hpp:8
etl::is_constant_evaluated
constexpr auto is_constant_evaluated() noexcept -> bool
Detects whether the function call occurs within a constant-evaluated context. Returns true if the eva...
Definition
is_constant_evaluated.hpp:16
include
etl
_type_traits
is_constant_evaluated.hpp
Generated on Sat Mar 8 2025 16:19:59 for tetl by
1.14.0