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
@@ -131,6 +131,7 @@
|
||||
#include <boost/type_traits/is_scoped_enum.hpp>
|
||||
#include <boost/type_traits/is_signed.hpp>
|
||||
#include <boost/type_traits/is_stateless.hpp>
|
||||
#include <boost/type_traits/is_trivially_copyable.hpp>
|
||||
#include <boost/type_traits/is_union.hpp>
|
||||
#include <boost/type_traits/is_unscoped_enum.hpp>
|
||||
#include <boost/type_traits/is_unsigned.hpp>
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
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)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_TT_IS_TRIVIALLY_COPYABLE_HPP_INCLUDED
|
||||
#define BOOST_TT_IS_TRIVIALLY_COPYABLE_HPP_INCLUDED
|
||||
|
||||
#include <boost/type_traits/has_trivial_assign.hpp>
|
||||
#include <boost/type_traits/has_trivial_copy.hpp>
|
||||
#include <boost/type_traits/has_trivial_destructor.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
template<class T>
|
||||
struct is_trivially_copyable
|
||||
: integral_constant<bool, has_trivial_copy<T>::value &&
|
||||
has_trivial_assign<T>::value &&
|
||||
has_trivial_destructor<T>::value> { };
|
||||
|
||||
} /* boost */
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user