Add is_list_constructible

This commit is contained in:
Peter Dimov
2017-07-15 23:03:38 +03:00
parent 64421a443b
commit ced4870cb0
6 changed files with 165 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
[/
Copyright 2017 Peter Dimov
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:is_list_constructible is_list_constructible]
template <class T, class... Args>
struct is_list_constructible : public __tof {};
__inherit If `T` can be constructed from `Args` using list initialization
(`T{declval<Args>()...}`), then inherits from __true_type, otherwise inherits from
__false_type. `T` must be a complete type.
__compat This trait requires C++11.
__header ` #include <boost/type_traits/is_list_constructible.hpp>` or ` #include <boost/type_traits.hpp>`
[endsect]
+2
View File
@@ -72,6 +72,7 @@
[def __is_copy_constructible [link boost_typetraits.reference.is_copy_constructible is_copy_constructible]]
[def __is_copy_assignable [link boost_typetraits.reference.is_copy_assignable is_copy_assignable]]
[def __is_constructible [link boost_typetraits.reference.is_constructible is_constructible]]
[def __is_list_constructible [link boost_typetraits.reference.is_list_constructible is_list_constructible]]
[def __is_default_constructible [link boost_typetraits.reference.is_default_constructible is_default_constructible]]
[def __is_destructible [link boost_typetraits.reference.is_destructible is_destructible]]
[def __is_volatile [link boost_typetraits.reference.is_volatile is_volatile]]
@@ -294,6 +295,7 @@ See __has_trivial_constructor.
[include is_function.qbk]
[include is_fundamental.qbk]
[include is_integral.qbk]
[include is_list_constructible.qbk]
[include is_lvalue_reference.qbk]
[include is_member_function_pointer.qbk]
[include is_member_object_pointer.qbk]
+3
View File
@@ -168,6 +168,9 @@ The following templates describe the general properties of a type.
template <class T>
struct __is_default_constructible;
template <class T, class... Args>
struct __is_list_constructible;
template <class T>
struct __is_destructible;