103 Commits
Author SHA1 Message Date
Andrey Semashev 5d19cc2d57 Remove template arguments redefinition workaround for VS2022 update 5. (#268)
Update 5 adds /Zc:templateScope flag which causes compile errors in
typedefs redefining template parameters.
2023-02-28 07:29:50 +08:00
djowel e79a8690f0 Merge branch 'develop' 2022-09-26 08:11:49 +08:00
Nikita Kniazev 4979945690 Fix -Wdeprecated-copy 2020-04-30 02:47:37 +03:00
Kohei Takahashi e29b1a07f3 adapt: Cleanup includes 2018-07-28 14:49:50 +09:00
Kohei Takahashi 5135b5109b Likewise. 2016-10-29 20:57:06 +09:00
Kohei Takahashi 490baac6e2 Added workaround for older gcc. 2016-10-29 15:34:49 +09:00
Kohei Takahashi 6bd644d43d Don't use iterator for copy/move assign op. 2016-10-29 14:40:47 +09:00
Kohei Takahashi e74ccb1cf5 DEFINE_STRUCT now allows move construct/assign. 2016-10-19 01:33:43 +09:00
Kohei Takahashi a2b8a8f254 Don't define user-provided special functions.
To allow to define empty struct.
2016-10-13 00:18:14 +09:00
Kohei Takahashi 4ebc028769 Optimize. 2016-02-16 19:32:57 +09:00
Kohei Takahashi 99ad77b92f Fix typos. 2016-02-16 16:52:27 +09:00
Kohei Takahashi 9b43ac8ee0 More optimization. 2016-02-16 00:40:27 +09:00
Kohei Takahashi c9c2c3bad6 Optimize macros. 2016-02-14 23:53:38 +09:00
Kohei Takahashi d7d47619b4 Tweak PP includes. 2016-02-14 23:41:22 +09:00
Damien Buhl (alias daminetreg) 44c21e0f10 Fixes invalid use of hardcoded "obj." prefix for ADAPT_ASSOC_STRUCT_NAMED and btw. fixes test error since removal of BOOST_PP_IS_EMPTY. 2016-02-13 14:15:53 +09:00
Damien Buhl (alias daminetreg) 3125c15ff4 Fix BOOST_PP_EMPTY replacement with adapt_assoc_struct 2016-02-13 14:15:53 +09:00
Damien Buhl (alias daminetreg) 2e466ac054 Remove BOOST_PP_IS_EMPTY in favor of BOOST_MPL_PP_TOKEN_EQUAL and added auto as synonym for BOOST_FUSION_ADAPT_AUTO.
Fix ticket https://svn.boost.org/trac/boost/ticket/11157
BOOST_MPL_PP_TOKEN_EQUAL is now used to check if auto/BOOST_FUSION_ADAPT_AUTO
was provided as type, telling to deduce members types.
2016-02-13 14:15:53 +09:00
Damien Buhl (alias daminetreg) 8b1da45bfe Fix 11269 (https://svn.boost.org/trac/boost/ticket/11269) and add test case for it. 2015-05-06 08:21:02 +02:00
Damien Buhl (alias daminetreg) ce62bb49f3 fix constructors of DEFINE_STRUCT_INLINE to allow construction with non-constexpr compatible. 2015-04-26 22:19:44 +02:00
Damien Buhl (alias daminetreg) bbdfc9972e Remove BOOST_CONSTEXPR on BOOST_FUSION_DEFINE_STRUCT constructor as it however adds the requirement that the user provided types are constant enabled. 2015-04-21 08:59:24 +02:00
Kohei Takahashi f45c94fa43 Merge remote-tracking branch 'origin/develop' into feature/constexpr 2015-03-04 02:20:52 +09:00
Kohei Takahashi 2114bfca6c More constexpr and noexcept support.
Note 1: Forwarding functions are specified as a C++14 constexpr since
std::forward is not a constexpr within C++11.

Note 2: Though I'm not sure why it doesn't compile, some declarations
are specified as a C++14 constexpr or non-constexpr.

Note 3: Boost.Tuple adaptation and TR1-based tuple implementations are
not constexpr.
2015-03-03 02:21:02 +09:00
Damien Buhl (alias daminetreg) 73a5dde412 Merge remote-tracking branch 'official/develop' into fusion_adapters
Conflicts:
	test/sequence/adapt_struct.cpp
2015-02-02 07:06:52 +01:00
Damien Buhl (alias daminetreg) c6c9d872d3 Factored out the IS_TPL macro. 2015-02-01 17:20:31 +01:00
Damien Buhl alias daminetreg fc1a60e8e6 Adding typename in front of BOOST_TYPEOF is only needed in MSVC when we check the type of a template. 2015-01-30 18:17:36 +01:00
Damien Buhl alias daminetreg 70d5b40a7c BUGFIX: Expands typename for attribute_type only in case it is really a dependent scope. 2015-01-25 16:10:34 +01:00
Damien Buhl (alias daminetreg) bc07cac46c Fix use of non-static "obj" in unevaluated expression context of decltype. 2014-11-18 23:39:53 +01:00
Klemens Baum c921b9ca99 Avoid unused parameter warning in BOOST_FUSION_DEFINE_STRUCT_INLINE 2014-10-20 11:48:42 +02:00
Damien Buhl (alias daminetreg) cd0d3ce09a add comments for readability. 2014-10-12 14:51:34 +02:00
Damien Buhl (alias daminetreg) 7b089aa589 Add support for BOOST_FUSION_ADAPT_ADT to either deduce types or use specified ones. 2014-08-10 17:09:57 +02:00
Damien Buhl (alias daminetreg) 52d280983b Fix some includes for consistency and use correct accessors macros.
Since we have accessors macros for wrapped attributes we better use them,
to improve readability of the macros.
2014-08-10 15:27:55 +02:00
Damien Buhl (alias daminetreg) c8e4172021 Fix indentation. 2014-08-10 15:11:34 +02:00
Damien Buhl (alias daminetreg) 0715e996e2 Fix the DEFINE_ASSOC_STRUCT macros to use specific FILLER macros, because they cannot need type deduction. 2014-07-29 22:24:23 +02:00
Damien Buhl (alias daminetreg) 047b052548 Add missing include. 2014-07-29 22:22:54 +02:00
Damien Buhl (alias daminetreg) 4b0bed40f7 Renamed macro wrapping attribute to a more descriptive name. 2014-07-27 16:07:47 +02:00
Damien Buhl (alias daminetreg) 5422ba7f8f Adds the possibility to omit the member type in ADAPT_ASSOC* macros usage.
This feature is enabled when BOOST_PP_VARIADICS also is, as it rely on it.
A placeholder for the type can be used when BOOST_PP_VARIADICS isn't
active.
2014-07-23 02:42:30 +02:00
Damien Buhl (alias daminetreg) 17e49ba448 Adds accessors for the wrapped attributes and provide preliminary support for type deduction to ADAPT_ASSOC* macros. 2014-07-23 00:36:07 +02:00
Damien Buhl (alias daminetreg) 34fac0c449 Fix ADAPT_*_C / ADAPT_*_C_BASE macros responsible.
These macros are used to handle generation of boilerplate code or each
member to add to the adapted sequence. And in the commit
abff92ab65 we changed the signature of these
macros to handle generation of proxied object field type deduction, this
change simply fix the related macros.
2014-06-25 00:45:38 +02:00
Damien Buhl (alias daminetreg) abff92ab65 Add support for members types deduction to the ADAPT_STRUCT_NAMED macro. 2014-06-25 00:11:40 +02:00
Damien Buhl (alias daminetreg) c008b0dc3a Fixes the BOOST_FUSION_DEFINE_STRUCT* macros with an appropriate attributes FILLER macro.
As the BOOST_FUSION_ADAPT_STRUCT_FILLER* macros were changed to handle type
deduction, this breaks the usage that BOOST_FUSION_DEFINE_STRUCT makes from
them.

That is BOOST_FUSION_DEFINE_STRUCT_IMPL expects a simple tuple, while we
now provide a tuple containing the size of a nested tuple which either has
or not the type provided. But in the case of the DEFINE* macros it would be
a non-sense to support this kind of API as a field being defined cannot be
deduced. :)
2014-06-17 22:35:10 +02:00
Damien Buhl (alias daminetreg) ae0c976926 Fixes missing inclusion of BOOST_PP_LESS.
This was bringing the std::pair adapt test to fail, because it wasn't
including BOOST_PP_LESS like the other tests.
2014-06-14 12:11:44 +02:00
Damien Buhl (alias daminetreg) af812e6207 Fixed ADAPT_STRUCT_FILLER macro call for consistency. 2014-06-14 12:09:04 +02:00
Damien Buhl (alias daminetreg) 9a501785e6 Removed the old auto_* headers. 2014-06-13 23:09:39 +02:00
Damien Buhl (alias daminetreg) 04ce8a788b Enabled new ADAPT_STRUCT_API for ADAPT_TPL_STRUCT. 2014-06-13 23:09:38 +02:00
Damien Buhl (alias daminetreg) ce3f2d6020 Added new ADAPT_STRUCT API support for the ADAPT_STRUCT_AS_VIEW macro. 2014-06-13 23:09:38 +02:00
Damien Buhl (alias daminetreg) 687b2cf097 Factoring out of adapt_struct.hpp all the FILLER_* macros details.
As of BOOST_FUSION_ADAPT_STRUCT without type deduction, there were only
simple attributes filler. Now this need more complex logic to handle both
API: the backward compatible one with type specificiation, the one without
type specification and the non-variadic one which enables omitting the type
specification by providing BOOST_FUSION_ADAPT_AUTO instead of the type.

That's why I extracted the FILLER_* macros details in a separate source
file.
2014-06-13 23:09:38 +02:00
Damien Buhl (alias daminetreg) c851252f65 Renaming macros for ADAPT_STRUCT to deduce type or take provided attribute types. 2014-06-13 23:09:38 +02:00
Damien Buhl (alias daminetreg) 557b3d2dc6 Fix detection of member_type parameter emptiness for BOOST_FUSION_ADAPT_STRUCT.
As BOOST_PP_IS_EMPTY is not a general purpose emptiness checker, we limit
the ways it can be used.
2014-06-13 23:09:38 +02:00
Damien Buhl (alias daminetreg) 7ef202b794 Moved BOOST_FUSION_ADAPT_STRUCT implementation details to detail/adapt_base.hpp 2014-06-13 23:09:38 +02:00
Damien Buhl (alias daminetreg) 02b776360a FEATURE: BOOST_FUSION_ADAPT_STRUCT can now also be called completely with
variadics arguments.

The following signature is possible :

 BOOST_FUSION_ADAPT_STRUCT(
        struct_name,
        member_name0,
        (BOOST_FUSION_ADAPT_AUTO, member_name1)
        (member_type2, member_name2)
	member_name3,
        ...
        )
2014-06-13 23:09:38 +02:00