tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
is_trivial.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_TYPE_TRAITS_IS_TRIVIAL_HPP
4#define TETL_TYPE_TRAITS_IS_TRIVIAL_HPP
5
9
10namespace etl {
11
18template <typename T>
19struct is_trivial : bool_constant<is_trivially_copyable_v<T> and is_trivially_default_constructible_v<T>> { };
20
21template <typename T>
22inline constexpr bool is_trivial_v = is_trivial<T>::value;
23
24} // namespace etl
25
26#endif // TETL_TYPE_TRAITS_IS_TRIVIAL_HPP
Definition adjacent_find.hpp:8
constexpr bool is_trivial_v
Definition is_trivial.hpp:22
integral_constant< bool, B > bool_constant
Definition bool_constant.hpp:11
static constexpr bool value
Definition integral_constant.hpp:10
If T is TrivialType (that is, a scalar type, a trivially copyable class with a trivial default constr...
Definition is_trivial.hpp:19