]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/type_traits/doc/has_nothrow_constructor.qbk
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / type_traits / doc / has_nothrow_constructor.qbk
CommitLineData
7c673cae
FG
1[/
2 Copyright 2007 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).
6]
7
8[section:has_nothrow_constructor has_nothrow_constructor]
9
10 template <class T>
11 struct has_nothrow_constructor : public __tof {};
12
13 template <class T>
14 struct has_nothrow_default_constructor : public __tof {};
15
16__inherit If T is a (possibly cv-qualified) type with a non-throwing default-constructor
17then inherits from __true_type, otherwise inherits from __false_type. Type `T`
18must be a complete type.
19
20These two traits are synonyms for each other.
21
22__compat Either requires C++11 `noexcept` and `decltype` or else some (unspecified) help from the compiler.
23Currently (June 2015) compilers more recent than Visual C++ 8, GCC-4.3, Greenhills 6.0,
24Intel-11.0, and Codegear and all recent GCC versions have the necessary compiler __intrinsics to ensure that this
25trait "just works". You may test to see if the necessary support is available
26by checking to see if `defined(BOOST_HAS_NOTHROW_CONSTRUCTOR) || (!defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_NOEXCEPT))` is true.
27
28__header ` #include <boost/type_traits/has_nothrow_constructor.hpp>` or ` #include <boost/type_traits.hpp>`
29
30[endsect]
31