Don't define user-provided special functions.

To allow to define empty struct.
This commit is contained in:
Kohei Takahashi
2016-10-13 00:18:14 +09:00
parent 599b8d4aef
commit a2b8a8f254
5 changed files with 10 additions and 18 deletions

View File

@ -282,20 +282,7 @@
NAME, BOOST_PP_SEQ_TAIL(ATTRIBUTES_SEQ), ATTRIBUTE_TUPLE_SIZE)
#define BOOST_FUSION_DEFINE_EMPTY_STRUCT_IMPL( \
NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE) \
\
template<typename Seq> \
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
NAME(Seq const&) \
{} \
\
template<typename Seq> \
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
self_type& \
operator=(Seq const& seq) \
{ \
return *this; \
}
NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE)
#define BOOST_FUSION_DEFINE_STRUCT_IMPL( \
NAMESPACE_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE) \
@ -327,10 +314,7 @@
ATTRIBUTE_TUPLE_SIZE)
#define BOOST_FUSION_DEFINE_EMPTY_TPL_STRUCT_IMPL( \
TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE) \
\
BOOST_FUSION_DEFINE_EMPTY_STRUCT_IMPL( \
NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE)
TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE)
#define BOOST_FUSION_DEFINE_TPL_STRUCT_IMPL( \
TEMPLATE_PARAMS_SEQ, \

View File

@ -29,6 +29,8 @@ BOOST_FUSION_DEFINE_ASSOC_STRUCT(
(int, y, ns::y_member)
)
BOOST_FUSION_DEFINE_ASSOC_STRUCT(BOOST_PP_EMPTY(), empty_struct, )
int
main()
{

View File

@ -31,6 +31,8 @@ BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT(
(int, y, ns::y_member)
)
BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT((M), BOOST_PP_EMPTY(), empty_struct, )
int
main()
{

View File

@ -33,6 +33,8 @@ BOOST_FUSION_DEFINE_STRUCT(
BOOST_FUSION_DEFINE_STRUCT(BOOST_PP_EMPTY(), s, (int, m))
BOOST_FUSION_DEFINE_STRUCT(BOOST_PP_EMPTY(), empty_struct, )
// Testing non-constexpr compatible types
BOOST_FUSION_DEFINE_STRUCT(
(ns),

View File

@ -27,6 +27,8 @@ BOOST_FUSION_DEFINE_TPL_STRUCT(
BOOST_FUSION_DEFINE_TPL_STRUCT((M), BOOST_PP_EMPTY(), s, (M, m))
BOOST_FUSION_DEFINE_TPL_STRUCT((M), BOOST_PP_EMPTY(), empty_struct, )
int
main()
{