tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
is_final.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_IS_FINAL_HPP
5#define TETL_TYPE_TRAITS_IS_FINAL_HPP
6
7#include <etl/_config/all.hpp>
8
9#include <etl/_type_traits/bool_constant.hpp>
10
11namespace etl {
12
13/// \brief If T is a final class (that is, a class declared with the final
14/// specifier), provides the member constant value equal true. For any other
15/// type, value is false. If T is a class type, T shall be a complete type;
16/// otherwise, the behavior is undefined.
17template <typename T>
18struct is_final : bool_constant<__is_final(T)> { };
19
20template <typename T>
21inline constexpr bool is_final_v = __is_final(T);
22
23} // namespace etl
24
25#endif // TETL_TYPE_TRAITS_IS_FINAL_HPP
Definition adjacent_find.hpp:9
constexpr bool is_final_v
Definition is_final.hpp:21
If T is a final class (that is, a class declared with the final specifier), provides the member const...
Definition is_final.hpp:18