Boost logo

Boost Users :

Subject: [Boost-users] fusion struct adapted, latest trunk changes
From: Hicham Mouline (hicham_at_[hidden])
Date: 2010-02-24 05:17:32


Christopher,

I had a temporary tweak to boost\fusion\adapted\struct\adapt_struct.hpp and boost\fusion\adapted\struct\extension.hpp

where I added a
  struct_member_name template
 that returned the const char * name of a given member of the struct.

In boost\fusion\adapted\struct\extension.hpp, there was the primary template

  template <typename Struct, int i>
  struct_member_name;

and in boost\fusion\adapted\struct\adapt_struct.hpp, I added in the BOOST_FUSION_ADAPT_STRUCT_C macro (given to me by Joel) the following:

    template <> \
    struct struct_member_name<name, i> \
    { \
        typedef char const* type; \
        static type call() \
        { \
            return BOOST_PP_STRINGIZE(BOOST_PP_TUPLE_ELEM(2, 1, xy)); \
        } \
    };

I had promised Joel I would add this to the other adapted "things" (other headers).
Then a user API (not extension API) would be added to access these.

1. temporarily, which files should I add this tweak to (boost\fusion\adapted\struct\extension.hpp is gone)
2. I understand your changes are about adapting class/struct templates. Where should I add this tweak to if I wish to use it for adapted templates,

regards,


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net