tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
is_trivially_copyable.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_TRIVIALLY_COPYABLE_HPP
5#define TETL_TYPE_TRAITS_IS_TRIVIALLY_COPYABLE_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 TriviallyCopyable type, provides the member constant value
14/// equal to true. For any other type, value is false. The only trivially
15/// copyable types are scalar types, trivially copyable classes, and arrays of
16/// such types/classes (possibly cv-qualified).
17/// group is_trivial_copyable
18template <typename T>
19struct is_trivially_copyable : etl::bool_constant<__is_trivially_copyable(T)> { };
20
21template <typename T>
22inline constexpr bool is_trivially_copyable_v = __is_trivially_copyable(T);
23
24} // namespace etl
25
26#endif // TETL_TYPE_TRAITS_IS_TRIVIALLY_COPYABLE_HPP
Definition adjacent_find.hpp:9
constexpr bool is_trivially_copyable_v
Definition is_trivially_copyable.hpp:22
If T is a TriviallyCopyable type, provides the member constant value equal to true....
Definition is_trivially_copyable.hpp:19