mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-29 20:17:32 +02:00
It should be default constructible
This commit is contained in:
@ -19,6 +19,9 @@ struct trivial_base { };
|
||||
|
||||
struct non_trivial_base
|
||||
{
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
BOOST_DEFAULTED_FUNCTION(non_trivial_base() BOOST_NOEXCEPT, {})
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
non_trivial_base(non_trivial_base const&) BOOST_NOEXCEPT { }
|
||||
};
|
||||
|
@ -11,12 +11,16 @@
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/type_traits/is_base_of.hpp>
|
||||
#include <boost/type_traits/is_default_constructible.hpp>
|
||||
#include "trivial.hpp"
|
||||
|
||||
using namespace boost;
|
||||
using namespace boost::fusion::detail;
|
||||
|
||||
|
||||
BOOST_MPL_ASSERT((is_default_constructible<trivial_base>));
|
||||
BOOST_MPL_ASSERT((is_default_constructible<non_trivial_base>));
|
||||
|
||||
BOOST_FUSION_ASSERT_FALLBACK((is_trivially_copyable<trivial_base>));
|
||||
BOOST_MPL_ASSERT_NOT((is_trivially_copyable<non_trivial_base>));
|
||||
|
||||
|
Reference in New Issue
Block a user