2 Copyright 2015 John Maddock.
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at
5 http://www.boost.org/LICENSE_1_0.txt).
8 [section:is_constructible is_constructible]
10 template <class T, class... Args>
11 struct is_constructible : public __tof {};
13 __inherit If `T` can be constructed from `Args`,
14 then inherits from __true_type, otherwise inherits from __false_type. Type `T`
15 must be a complete type.
17 Formally the trait answers the question, is the expression:
19 T t(std::declval<Args>()...);
23 There are a number of important special cases for this trait:
25 is_constructible<T>::value
27 Indicates whether `T` is default constructible, while:
29 is_constructible<T, const T&>::value
31 Indicates whether `T` is copy-constructible, and:
33 is_constructible<T, T>::value
35 Indicates whether `T` is move-constructible.
38 __compat This trait requires the C++11 features `decltype` variadic templates and SFINAE-expression support for full support.
39 While there is some fallback code for cases where this is not the case, the trait should really be considered broken in that case.
41 __header ` #include <boost/type_traits/is_copy_constructible.hpp>` or ` #include <boost/type_traits.hpp>`