3#ifndef TETL_TYPE_TRAITS_IS_NOTHROW_CONSTRUCTIBLE_HPP
4#define TETL_TYPE_TRAITS_IS_NOTHROW_CONSTRUCTIBLE_HPP
15template <bool,
typename T,
typename... Args>
16struct nothrow_constructible_impl :
false_type { };
18template <
typename T,
typename... Args>
19struct nothrow_constructible_impl<true, T, Args...> :
bool_constant<noexcept(T(declval<Args>()...))> { };
21template <
typename T,
typename Arg>
22struct nothrow_constructible_impl<true, T, Arg> :
bool_constant<noexcept(static_cast<T>(declval<Arg>()))> { };
25struct nothrow_constructible_impl<true, T> :
bool_constant<noexcept(T())> { };
27template <
typename T,
size_t Size>
28struct nothrow_constructible_impl<true, T[Size]> :
bool_constant<noexcept(remove_all_extents_t<T>())> { };
30#if defined(__cpp_aggregate_paren_init)
31template <
typename T,
size_t Size,
typename Arg>
32struct nothrow_constructible_impl<true, T[Size], Arg> : nothrow_constructible_impl<true, T, Arg> { };
34template <
typename T,
size_t Size,
typename... Args>
35struct nothrow_constructible_impl<true, T[Size], Args...>
36 :
bool_constant<(nothrow_constructible_impl<true, T, Args>::value && ...)> { };
39template <
typename T,
typename... Args>
40using is_nothrow_constructible_helper = nothrow_constructible_impl<__is_constructible(T, Args...), T, Args...>;
46template <
typename T,
typename... Args>
49template <
typename T,
typename... Args>
Definition adjacent_find.hpp:8
constexpr bool is_nothrow_constructible_v
Definition is_nothrow_constructible.hpp:50
integral_constant< bool, B > bool_constant
Definition bool_constant.hpp:11
bool_constant< false > false_type
Definition bool_constant.hpp:14
integral_constant< Type, Val > type
Definition integral_constant.hpp:12
The variable definition does not call any operation that is not trivial. For the purposes of this che...
Definition is_nothrow_constructible.hpp:47