tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
is_compound.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_COMPOUND_HPP
5#define TETL_TYPE_TRAITS_IS_COMPOUND_HPP
6
7#include <etl/_type_traits/bool_constant.hpp>
8#include <etl/_type_traits/is_fundamental.hpp>
9
10namespace etl {
11
12/// \brief If T is a compound type (that is, array, function, object pointer,
13/// function pointer, member object pointer, member function pointer, reference,
14/// class, union, or enumeration, including any cv-qualified variants), provides
15/// the member constant value equal true. For any other type, value is false.
16template <typename T>
17struct is_compound : bool_constant<not is_fundamental_v<T>> { };
18
19template <typename T>
20inline constexpr bool is_compound_v = not is_fundamental_v<T>;
21
22} // namespace etl
23
24#endif // TETL_TYPE_TRAITS_IS_COMPOUND_HPP
Definition adjacent_find.hpp:9
constexpr bool is_compound_v
Definition is_compound.hpp:20