tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
negation.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_TYPE_TRAITS_NEGATION_HPP
4#define TETL_TYPE_TRAITS_NEGATION_HPP
5
7
8namespace etl {
9
11template <typename B>
12struct negation : bool_constant<not static_cast<bool>(B::value)> { };
13
14template <typename B>
15inline constexpr bool negation_v = not static_cast<bool>(B::value);
16
17} // namespace etl
18
19#endif // TETL_TYPE_TRAITS_NEGATION_HPP
Definition adjacent_find.hpp:8
constexpr bool negation_v
Definition negation.hpp:15
integral_constant< bool, B > bool_constant
Definition bool_constant.hpp:11
Forms the logical negation of the type trait B.
Definition negation.hpp:12