forked from boostorg/type_traits
Implement is_trivially_copyable
This commit is contained in:
1 parent
7a071a5918
commit
f7f7dbf16e
5 files changed
+295
-1
No files matched your search
@@ -0,0 +1,40 @@
|
||||
[/
|
||||
Copyright 2020 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
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_trivially_copyable is_trivially_copyable]
|
||||
|
||||
template<class T>
|
||||
struct is_trivially_copyable
|
||||
: __tof { };
|
||||
|
||||
__inherit If T is a (possibly cv-qualified) type that is trivially copyable
|
||||
then inherits from __true_type, otherwise inherits from __false_type.
|
||||
|
||||
__compat This trait is implemented as the conjunction of `has_trivial_copy`,
|
||||
`has_trivial_assign`, and `has_trivial_destructor`.
|
||||
|
||||
__header `#include <boost/type_traits/is_trivially_copyable.hpp>`
|
||||
|
||||
__examples
|
||||
|
||||
[:`is_trivially_copyable<int>` inherits from `__true_type`.]
|
||||
|
||||
[:`is_trivially_copyable<const int>` inherits from `__false_type`.]
|
||||
|
||||
[:`is_trivially_copyable<char*>::type` is the type `__true_type`.]
|
||||
|
||||
[:`is_trivially_copyable<int(*)(long)>::value` is an integral constant
|
||||
expression that evaluates to /true/.]
|
||||
|
||||
[:`is_trivially_copyable<MyClass>::value` is an integral constant expression
|
||||
that evaluates to /false/.]
|
||||
|
||||
[:`is_trivially_copyable<T>::value_type` is the type `bool`.]
|
||||
|
||||
[endsect]
|
||||
+3
-1
@@ -8,7 +8,7 @@
|
||||
[library Boost.TypeTraits
|
||||
[quickbook 1.5]
|
||||
[copyright 2000 2011 Adobe Systems Inc, David Abrahams, Frederic Bron,
|
||||
Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant, Jesse Jones,
|
||||
Steve Cleary, Beman Dawes, Glen Fernandes, Aleksey Gurtovoy, Howard Hinnant, Jesse Jones,
|
||||
Mat Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen,
|
||||
Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert Stewart and Steven Watanabe]
|
||||
[purpose Meta-programming support library]
|
||||
@@ -87,6 +87,7 @@
|
||||
[def __is_signed [link boost_typetraits.reference.is_signed is_signed]]
|
||||
[def __is_unsigned [link boost_typetraits.reference.is_unsigned is_unsigned]]
|
||||
[def __has_virtual_destructor [link boost_typetraits.reference.has_virtual_destructor has_virtual_destructor]]
|
||||
[def __is_trivially_copyable [link boost_typetraits.reference.is_trivially_copyable is_trivially_copyable]]
|
||||
[def __is_pod [link boost_typetraits.reference.is_pod is_pod]]
|
||||
[def __is_final [link boost_typetraits.reference.is_final is_final]]
|
||||
[def __has_trivial_constructor [link boost_typetraits.reference.has_trivial_constructor has_trivial_constructor]]
|
||||
@@ -439,6 +440,7 @@ See __has_trivial_constructor.
|
||||
[include is_scoped_enum.qbk]
|
||||
[include is_signed.qbk]
|
||||
[include is_stateless.qbk]
|
||||
[include is_trivially_copyable.qbk]
|
||||
[include is_unbounded_array.qbk]
|
||||
[include is_union.qbk]
|
||||
[include is_unscoped_enum.qbk]
|
||||
|
||||
Reference in new issue
Block a user