tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
is_nothrow_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_NOTHROW_COPY_CONSTRUCTIBLE_HPP
5#define TETL_TYPE_TRAITS_IS_NOTHROW_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_nothrow_constructible.hpp>
11
12namespace etl {
13
14/// \brief Same as copy, but uses etl::is_nothrow_constructible<T, T const&>.
15///
16/// \details T shall be a complete type, (possibly cv-qualified) void, or an
17/// array of unknown bound. Otherwise, the behavior is undefined. If an
18/// instantiation of a template above depends, directly or indirectly, on an
19/// incomplete type, and that instantiation could yield a different result if
20/// that type were hypothetically completed, the behavior is undefined.
21///
22/// The behavior of a program that adds specializations for any of the templates
23/// described on this page is undefined.
24template <typename T>
25struct is_nothrow_copy_constructible : is_nothrow_constructible<T, add_lvalue_reference_t<add_const_t<T>>> { };
26
27template <typename T>
29
30} // namespace etl
31
32#endif // TETL_TYPE_TRAITS_IS_NOTHROW_COPY_CONSTRUCTIBLE_HPP
Definition adjacent_find.hpp:9
constexpr bool is_nothrow_copy_constructible_v
Definition is_nothrow_copy_constructible.hpp:28
The variable definition does not call any operation that is not trivial. For the purposes of this che...
Definition is_nothrow_constructible.hpp:48
Same as copy, but uses etl::is_nothrow_constructible<T, T const&>.
Definition is_nothrow_copy_constructible.hpp:25