Commit Graph
127 Commits
Author SHA1 Message Date
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 de43345b34 BUGFIX: Forwarding template parameters for MSVC to deduced_attr_type context thanks to BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS. 2015-01-25 23:05:42 +01:00
Damien Buhl (alias daminetreg) 382c1e5645 BUGFIX: Expands typename for attribute_type only in case it is really a dependent scope. 2015-01-25 21:48:49 +01:00
Damien Buhl (alias daminetreg) 588896de45 Revert "BUGFIX: MSVC doesn't accept typename to specify a dependent scope within"
This reverts commit 98247fb97f.
2015-01-25 16:14:45 +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) 98247fb97f BUGFIX: MSVC doesn't accept typename to specify a dependent scope within
template specialization in C++03 as standard specify it.

This also works on GCC 4.6, 4.8.2 and 4.9 in C++11 and C++03, I needlessly
added this during some debugging where the compiler was telling me to do so.

I shouldn't have followed it's advice, as this breaks compatibility with
other compilers.
2015-01-21 00:28:13 +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
Damien Buhl (alias daminetreg) b5018586aa Breaking change of BOOST_FUSION_ADAPT_ADT_NAMED and BOOST_FUSION_ADAPT_ASSOC_ADT_NAMED API to be coherent with the expressions of BOOST_FUSION_ADAPT_ADT thanks to correct usage of BOOST_FUSION_PROXY_PREFIX. 2014-11-18 23:38:47 +01:00
Damien Buhl (alias daminetreg) 18fa262a4e BUGFIX: Use of non-static member in typedef to retrieve the type. clang doesn't allow this even in unevaluated context like decltype. 2014-11-18 22:50:07 +01:00
Kohei Takahashi 7a7b225fb1 Add boost_tuple_iterator_identity to compare iterator correctly.
And add test for boost_tuple_iterator.
2014-11-06 17:10:31 +09:00
Kohei Takahashi f716d2f410 Merge various hotfixes into develop. 2014-11-01 22:00:45 +09:00
Damien Buhl (alias daminetreg) 2f850604e8 Merge remote-tracking branch 'official/develop' into fusion_adapters 2014-10-27 14:00:49 +01:00
Damien Buhl (alias daminetreg) e50f5852e4 Changes the test cases, as the behaviour about const-qualifier for
attribute_type and attribute_const_type when type is deduced can be
different than when the type is provided.

Indeed when specifying attribute_type and attribute_const_type manually
it's possible to provide a type which isn't const qualified as
attribute_const_type. When deducing the types from the get_expr, a const
and a non const qualified type is taken respectively for attribute_type
and attribute_const_type.
2014-10-22 22:06:31 +02:00
Damien Buhl (alias daminetreg) 03ba146d84 lvalue typedef for acess::struct_member is a dependent scope to templated
parameter when used within BOOST_FUSION_ADAPT_ASSOC_TPL_ADT.

This fixes test sequence/adapt_assoc_tpl_adt.cpp.
2014-10-20 12:54:31 +02: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) 2b5da49628 lvalue access::struct_member was wrongly set to be adt_attribute_proxy<> instead of adt_attribute_proxy<>::type. Shame on me. 2014-10-12 16:25:59 +02:00
Damien Buhl (alias daminetreg) cd0d3ce09a add comments for readability. 2014-10-12 14:51:34 +02:00
Damien Buhl (alias daminetreg) 644d72ccfe adds type deduction support for BOOST_FUSION_ADAPT_ASSOC_ADT. 2014-10-12 14:51:04 +02:00
Damien Buhl (alias daminetreg) aa7b0a6972 Factoring out the workaround to access last variadic parameter.
Indeed when some parameter are BOOST_PP_EMPTY the last parameter is
accessed correctly but results in a compilation error which doesn't stop
some compiler (e.g. g++) to go through the preprocessing pass and still
compile the binary correctly. But to avoid the error message I used a
workaround which behaves better. I preferred factoring it out to make
clear that there are some reason why this element is strangely accessed.
2014-09-23 23:07:00 +02:00
Damien Buhl (alias daminetreg) 69e67cd1ad BUGFIX: When VARIADICS are active supporting any of the input combination.
That is : BOOST_FUSION_ADAPT_AUTO, omitting type or specifying type.
2014-09-17 00:47:52 +02:00
Damien Buhl (alias daminetreg) f0bc2a2ac1 Fix dependents scopes and typedefs with typename keywords. 2014-08-26 23:32:26 +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) fe3682ac02 add type deduction support to BOOST_FUSION_ADAPT_ADT_C_BASE. 2014-08-10 15:15:31 +02:00
Damien Buhl (alias daminetreg) c8e4172021 Fix indentation. 2014-08-10 15:11:34 +02:00
gnzlbg c2abefbab8 Initial constexpr support
This allows to use, e.g., boost::fusion::fold within constexpr functions.

The BOOST_CONSTEXPR macro is used to declare functions constexpr.
2014-08-06 11:09:40 +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
Damien Buhl (alias daminetreg) 37fc1443ad Improve the BOOST_FUSION_ADAPT_STRUCT macro to work also when there is no variadic support.
This enable the following flexible macro signature when there is
no BOOST_PP_VARIADICS support:

BOOST_FUSION_ADAPT_STRUCT(
    struct_name,
    (member_type0, member_name0)
    (BOOST_FUSION_ADAPT_AUTO, member_name1)
    (,member_name2)
    ...
    )

If BOOST_PP_VARIADICS is active then there is quite more flexibility as it
allows to avoid the type specification:

BOOST_FUSION_ADAPT_STRUCT(
    struct_name,
    (member_type0, member_name0)
    (BOOST_FUSION_ADAPT_AUTO, member_name1)
    (,member_name2)
    (member_name3)
    ...
    )
2014-06-13 23:09:29 +02:00
Damien Buhl (alias daminetreg) 944c363787 Remove dependency to variadics macros for the old API not deducing types. 2014-06-13 23:07:49 +02:00
Damien Buhl (alias daminetreg) 6f6bfb3a27 EDITORIAL: Cleaning the ADAPT_STRUCT which can deduce types. 2014-06-13 23:07:32 +02:00
Damien Buhl (alias daminetreg) 04cbf0d4c6 BUGFIX: Presents the correct field name as a string even if type is deduced. 2014-06-13 23:07:32 +02:00