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// SPDX-FileCopyrightText: Copyright (C) 2019 Tobias Hienzsch
3
4#ifndef TETL_TYPE_TRAITS_NEGATION_HPP
5#define TETL_TYPE_TRAITS_NEGATION_HPP
6
7#include <etl/_type_traits/bool_constant.hpp>
8
9namespace etl {
10
11/// \brief Forms the logical negation of the type trait B.
12template <typename B>
13struct negation : bool_constant<not static_cast<bool>(B::value)> { };
14
15template <typename B>
16inline constexpr bool negation_v = not static_cast<bool>(B::value);
17
18} // namespace etl
19
20#endif // TETL_TYPE_TRAITS_NEGATION_HPP
Definition adjacent_find.hpp:9
constexpr bool negation_v
Definition negation.hpp:16
Forms the logical negation of the type trait B.
Definition negation.hpp:13