mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-24 01:27:37 +02:00
wrong library, FUSION, not SPIRIT
[SVN r37332]
This commit is contained in:
@ -29,21 +29,21 @@
|
|||||||
#include <boost/mpl/int.hpp>
|
#include <boost/mpl/int.hpp>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#define BOOST_SPIRIT_ADAPT_STRUCT(name, bseq) \
|
#define BOOST_FUSION_ADAPT_STRUCT(name, bseq) \
|
||||||
BOOST_SPIRIT_ADAPT_STRUCT_I( \
|
BOOST_FUSION_ADAPT_STRUCT_I( \
|
||||||
name, BOOST_PP_CAT(BOOST_SPIRIT_ADAPT_STRUCT_X bseq, 0)) \
|
name, BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_X bseq, 0)) \
|
||||||
/***/
|
/***/
|
||||||
|
|
||||||
#define BOOST_SPIRIT_ADAPT_STRUCT_X(x, y) ((x, y)) BOOST_SPIRIT_ADAPT_STRUCT_Y
|
#define BOOST_FUSION_ADAPT_STRUCT_X(x, y) ((x, y)) BOOST_FUSION_ADAPT_STRUCT_Y
|
||||||
#define BOOST_SPIRIT_ADAPT_STRUCT_Y(x, y) ((x, y)) BOOST_SPIRIT_ADAPT_STRUCT_X
|
#define BOOST_FUSION_ADAPT_STRUCT_Y(x, y) ((x, y)) BOOST_FUSION_ADAPT_STRUCT_X
|
||||||
#define BOOST_SPIRIT_ADAPT_STRUCT_X0
|
#define BOOST_FUSION_ADAPT_STRUCT_X0
|
||||||
#define BOOST_SPIRIT_ADAPT_STRUCT_Y0
|
#define BOOST_FUSION_ADAPT_STRUCT_Y0
|
||||||
|
|
||||||
// BOOST_SPIRIT_ADAPT_STRUCT_I generates the overarching structure and uses
|
// BOOST_FUSION_ADAPT_STRUCT_I generates the overarching structure and uses
|
||||||
// SEQ_FOR_EACH_I to generate the "linear" substructures.
|
// SEQ_FOR_EACH_I to generate the "linear" substructures.
|
||||||
// Thanks to Paul Mensonides for the PP macro help
|
// Thanks to Paul Mensonides for the PP macro help
|
||||||
|
|
||||||
#define BOOST_SPIRIT_ADAPT_STRUCT_I(name, seq) \
|
#define BOOST_FUSION_ADAPT_STRUCT_I(name, seq) \
|
||||||
namespace boost { namespace fusion { namespace traits \
|
namespace boost { namespace fusion { namespace traits \
|
||||||
{ \
|
{ \
|
||||||
template <> \
|
template <> \
|
||||||
@ -56,11 +56,11 @@
|
|||||||
{ \
|
{ \
|
||||||
template <> \
|
template <> \
|
||||||
struct struct_size<name> : mpl::int_<BOOST_PP_SEQ_SIZE(seq)> {}; \
|
struct struct_size<name> : mpl::int_<BOOST_PP_SEQ_SIZE(seq)> {}; \
|
||||||
BOOST_PP_SEQ_FOR_EACH_I(BOOST_SPIRIT_ADAPT_STRUCT_C, name, seq) \
|
BOOST_PP_SEQ_FOR_EACH_I(BOOST_FUSION_ADAPT_STRUCT_C, name, seq) \
|
||||||
}}} \
|
}}} \
|
||||||
/***/
|
/***/
|
||||||
|
|
||||||
#define BOOST_SPIRIT_ADAPT_STRUCT_C(r, name, i, xy) \
|
#define BOOST_FUSION_ADAPT_STRUCT_C(r, name, i, xy) \
|
||||||
template <> \
|
template <> \
|
||||||
struct struct_member<name, i> \
|
struct struct_member<name, i> \
|
||||||
{ \
|
{ \
|
||||||
|
@ -36,7 +36,7 @@ namespace ns
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_SPIRIT_ADAPT_STRUCT(
|
BOOST_FUSION_ADAPT_STRUCT(
|
||||||
ns::point,
|
ns::point,
|
||||||
(int, x)
|
(int, x)
|
||||||
(int, y)
|
(int, y)
|
||||||
|
Reference in New Issue
Block a user