summaryrefslogtreecommitdiff
path: root/boost/fusion/adapted/struct
diff options
context:
space:
mode:
Diffstat (limited to 'boost/fusion/adapted/struct')
-rw-r--r--boost/fusion/adapted/struct/adapt_struct.hpp19
-rw-r--r--boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp10
-rw-r--r--boost/fusion/adapted/struct/detail/define_struct.hpp16
-rw-r--r--boost/fusion/adapted/struct/detail/define_struct_inline.hpp4
4 files changed, 28 insertions, 21 deletions
diff --git a/boost/fusion/adapted/struct/adapt_struct.hpp b/boost/fusion/adapted/struct/adapt_struct.hpp
index e96e7c76d2..2744f5b218 100644
--- a/boost/fusion/adapted/struct/adapt_struct.hpp
+++ b/boost/fusion/adapted/struct/adapt_struct.hpp
@@ -17,6 +17,8 @@
#include <boost/preprocessor/control/if.hpp>
#include <boost/preprocessor/comparison/less.hpp>
#include <boost/preprocessor/comparison/equal.hpp>
+#include <boost/preprocessor/seq/seq.hpp>
+#include <boost/preprocessor/variadic/to_seq.hpp>
#include <boost/type_traits/add_reference.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/add_const.hpp>
@@ -61,25 +63,28 @@
(1)NAME_SEQ, \
struct_tag, \
0, \
- BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER(__VA_ARGS__), \
+ BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER( \
+ BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__)), \
BOOST_FUSION_ADAPT_STRUCT_C)
-# define BOOST_FUSION_ADAPT_STRUCT(NAME, ...) \
+# define BOOST_FUSION_ADAPT_STRUCT(...) \
BOOST_FUSION_ADAPT_STRUCT_BASE( \
(0), \
- (0)(NAME), \
+ (0)(BOOST_PP_SEQ_HEAD(BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__))), \
struct_tag, \
0, \
- BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER(__VA_ARGS__), \
+ BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER( \
+ BOOST_PP_SEQ_TAIL(BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__))), \
BOOST_FUSION_ADAPT_STRUCT_C)
-# define BOOST_FUSION_ADAPT_STRUCT_AS_VIEW(NAME, ...) \
+# define BOOST_FUSION_ADAPT_STRUCT_AS_VIEW(...) \
BOOST_FUSION_ADAPT_STRUCT_BASE( \
(0), \
- (0)(NAME), \
+ (0)(BOOST_PP_SEQ_HEAD(BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__))), \
struct_tag, \
1, \
- BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER(__VA_ARGS__), \
+ BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER( \
+ BOOST_PP_SEQ_TAIL(BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__))), \
BOOST_FUSION_ADAPT_STRUCT_C)
#else // BOOST_PP_VARIADICS
diff --git a/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp b/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp
index 69d5b204ce..7a83bb347c 100644
--- a/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp
+++ b/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp
@@ -49,14 +49,16 @@
# define BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER_OP(r, unused, elem) \
BOOST_PP_IF(BOOST_FUSION_PP_IS_SEQ(elem), \
BOOST_PP_CAT( BOOST_FUSION_ADAPT_STRUCT_FILLER_0 elem ,_END), \
- BOOST_FUSION_ADAPT_STRUCT_WRAP_ATTR(BOOST_FUSION_ADAPT_AUTO, \
- elem))
+ BOOST_PP_IF(BOOST_PP_IS_EMPTY(elem), \
+ BOOST_PP_EMPTY(), \
+ BOOST_FUSION_ADAPT_STRUCT_WRAP_ATTR(BOOST_FUSION_ADAPT_AUTO,elem))\
+ )
-# define BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER(...) \
+# define BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER(VA_ARGS_SEQ) \
BOOST_PP_SEQ_PUSH_FRONT( \
BOOST_PP_SEQ_FOR_EACH( \
BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER_OP, \
- unused, BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__)), \
+ unused, VA_ARGS_SEQ), \
(0,0))
#endif // BOOST_PP_VARIADICS
diff --git a/boost/fusion/adapted/struct/detail/define_struct.hpp b/boost/fusion/adapted/struct/detail/define_struct.hpp
index 25542920ad..ce3737ea97 100644
--- a/boost/fusion/adapted/struct/detail/define_struct.hpp
+++ b/boost/fusion/adapted/struct/detail/define_struct.hpp
@@ -69,7 +69,7 @@
ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
\
template<typename Seq> \
- BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
+ BOOST_FUSION_GPU_ENABLED \
self_type& \
operator=(Seq const& seq) \
{ \
@@ -128,7 +128,7 @@
ATTRIBUTE_TUPEL_SIZE, \
ATTRIBUTES_SEQ) \
\
- BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
+ BOOST_FUSION_GPU_ENABLED \
NAME() \
: BOOST_PP_SEQ_FOR_EACH_I_R( \
1, \
@@ -137,7 +137,7 @@
ATTRIBUTES_SEQ) \
{} \
\
- BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
+ BOOST_FUSION_GPU_ENABLED \
NAME(self_type const& other_self) \
: BOOST_PP_SEQ_FOR_EACH_I_R( \
1, \
@@ -147,7 +147,7 @@
{} \
\
template<typename Seq> \
- BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
+ BOOST_FUSION_GPU_ENABLED \
NAME(Seq const& seq \
BOOST_PP_IF( \
BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)), \
@@ -167,7 +167,7 @@
#define BOOST_FUSION_DEFINE_STRUCT_CTOR_1( \
NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
\
- BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
+ BOOST_FUSION_GPU_ENABLED \
explicit \
NAME(boost::call_traits< \
BOOST_PP_TUPLE_ELEM( \
@@ -180,7 +180,7 @@
#define BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_1( \
TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
\
- BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
+ BOOST_FUSION_GPU_ENABLED \
explicit \
NAME(typename boost::call_traits< \
typename boost::fusion::detail::get_first_arg< \
@@ -217,7 +217,7 @@
#define BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_N( \
TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
\
- BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
+ BOOST_FUSION_GPU_ENABLED \
NAME(BOOST_PP_SEQ_FOR_EACH_I_R( \
1, \
BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_ARG_I, \
@@ -245,7 +245,7 @@
#define BOOST_FUSION_DEFINE_STRUCT_CTOR_N( \
NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
\
- BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
+ BOOST_FUSION_GPU_ENABLED \
NAME(BOOST_PP_SEQ_FOR_EACH_I_R( \
1, \
BOOST_FUSION_DEFINE_STRUCT_CTOR_ARG_I, \
diff --git a/boost/fusion/adapted/struct/detail/define_struct_inline.hpp b/boost/fusion/adapted/struct/detail/define_struct_inline.hpp
index a5a3ae0628..a037ffe549 100644
--- a/boost/fusion/adapted/struct/detail/define_struct_inline.hpp
+++ b/boost/fusion/adapted/struct/detail/define_struct_inline.hpp
@@ -66,7 +66,7 @@
#define BOOST_FUSION_IGNORE_2(ARG1, ARG2)
#define BOOST_FUSION_MAKE_COPY_CONSTRUCTOR(NAME, ATTRIBUTES_SEQ) \
- BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
+ BOOST_FUSION_GPU_ENABLED \
NAME(BOOST_PP_SEQ_FOR_EACH_I( \
BOOST_FUSION_MAKE_CONST_REF_PARAM, \
~, \
@@ -337,7 +337,7 @@
typedef boost::mpl::int_<N> index; \
typedef boost_fusion_detail_Seq sequence_type; \
\
- BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
+ BOOST_FUSION_GPU_ENABLED \
BOOST_FUSION_ITERATOR_NAME(NAME)(boost_fusion_detail_Seq& seq) \
: seq_(seq) \
BOOST_FUSION_DEFINE_ITERATOR_WKND_INIT_LIST_ENTRIES( \