tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
is_trivially_copy_assignable.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_COPY_ASSIGNABLE_HPP
5#define TETL_TYPE_TRAITS_IS_TRIVIALLY_COPY_ASSIGNABLE_HPP
6
7#include <etl/_type_traits/add_lvalue_reference.hpp>
8#include <etl/_type_traits/bool_constant.hpp>
9#include <etl/_type_traits/is_trivially_assignable.hpp>
10
11namespace etl {
12
13/// \brief If T is not a referenceable type (i.e., possibly cv-qualified void or
14/// a function type with a cv-qualifier-seq or a ref-qualifier), provides a
15/// member constant value equal to false. Otherwise, provides a member constant
16/// value equal to etl::is_trivially_assignable<T&, T const&>::value.
17///
18/// \details T shall be a complete type, (possibly cv-qualified) void, or an
19/// array of unknown bound. Otherwise, the behavior is undefined. If an
20/// instantiation of a template above depends, directly or indirectly, on an
21/// incomplete type, and that instantiation could yield a different result if
22/// that type were hypothetically completed, the behavior is undefined. The
23/// behavior of a program that adds specializations for any of the templates
24/// described on this page is undefined.
25template <typename T>
27 : is_trivially_assignable<add_lvalue_reference_t<T>, add_lvalue_reference_t<T const>> { };
28
29template <typename T>
31
32} // namespace etl
33
34#endif // TETL_TYPE_TRAITS_IS_TRIVIALLY_COPY_ASSIGNABLE_HPP
Definition adjacent_find.hpp:9
constexpr bool is_trivially_copy_assignable_v
Definition is_trivially_copy_assignable.hpp:30
If the expression etl::declval<T>() = etl::declval<U>() is well-formed in unevaluated context,...
Definition is_trivially_assignable.hpp:18
If T is not a referenceable type (i.e., possibly cv-qualified void or a function type with a cv-quali...
Definition is_trivially_copy_assignable.hpp:27