wrong library, FUSION, not SPIRIT

[SVN r37332]
This commit is contained in:
Joel de Guzman
2007-04-02 05:13:25 +00:00
parent bf05751f9e
commit 5e9e7f31a4
2 changed files with 12 additions and 12 deletions

View File

@ -29,21 +29,21 @@
#include <boost/mpl/int.hpp>
#include <utility>
#define BOOST_SPIRIT_ADAPT_STRUCT(name, bseq) \
BOOST_SPIRIT_ADAPT_STRUCT_I( \
name, BOOST_PP_CAT(BOOST_SPIRIT_ADAPT_STRUCT_X bseq, 0)) \
#define BOOST_FUSION_ADAPT_STRUCT(name, bseq) \
BOOST_FUSION_ADAPT_STRUCT_I( \
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_SPIRIT_ADAPT_STRUCT_Y(x, y) ((x, y)) BOOST_SPIRIT_ADAPT_STRUCT_X
#define BOOST_SPIRIT_ADAPT_STRUCT_X0
#define BOOST_SPIRIT_ADAPT_STRUCT_Y0
#define BOOST_FUSION_ADAPT_STRUCT_X(x, y) ((x, y)) BOOST_FUSION_ADAPT_STRUCT_Y
#define BOOST_FUSION_ADAPT_STRUCT_Y(x, y) ((x, y)) BOOST_FUSION_ADAPT_STRUCT_X
#define BOOST_FUSION_ADAPT_STRUCT_X0
#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.
// 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 \
{ \
template <> \
@ -56,11 +56,11 @@
{ \
template <> \
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 <> \
struct struct_member<name, i> \
{ \

View File

@ -36,7 +36,7 @@ namespace ns
};
}
BOOST_SPIRIT_ADAPT_STRUCT(
BOOST_FUSION_ADAPT_STRUCT(
ns::point,
(int, x)
(int, y)