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