[fusion] BOOST_FUSION_ADAPT_TPL_STRUCT
Hello all,
I'm trying to do something like this with fusion:
struct exists_tag {};
template <typename A>
struct unary {
type_a m_name;
};
template <>
struct unary
On 6/27/14, 11:10 PM, Greg Rubino wrote:
Hello all,
I'm trying to do something like this with fusion:
struct exists_tag {};
template <typename A> struct unary { type_a m_name; };
template <> struct unary
{ type_b m_name; }; BOOST_FUSION_ADAPT_TPL_STRUCT((A), (unary)(A), (type_a)(m_name)); BOOST_FUSION_ADAPT_TPL_STRUCT((), (unary)(exists_tag), (type_b)(m_name));
I'm not sure if I'm way off here, or if there is some way to accomplish this that I'm just not seeing.
Why do you need to adapt the specialization? If you adapt the main template, fusion can pickup all the specializations just fine. Regards, -- Joel de Guzman http://www.ciere.com http://boost-spirit.com http://www.cycfi.com/
Thanks Joel. I'll try that. I was just trying to make it more complicated.
On Jun 29, 2014 3:41 PM, "Joel de Guzman"
On 6/27/14, 11:10 PM, Greg Rubino wrote:
Hello all,
I'm trying to do something like this with fusion:
struct exists_tag {};
template <typename A> struct unary { type_a m_name; };
template <> struct unary
{ type_b m_name; }; BOOST_FUSION_ADAPT_TPL_STRUCT((A), (unary)(A), (type_a)(m_name)); BOOST_FUSION_ADAPT_TPL_STRUCT((), (unary)(exists_tag), (type_b)(m_name));
I'm not sure if I'm way off here, or if there is some way to accomplish this that I'm just not seeing.
Why do you need to adapt the specialization? If you adapt the main template, fusion can pickup all the specializations just fine.
Regards, -- Joel de Guzman http://www.ciere.com http://boost-spirit.com http://www.cycfi.com/
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/ mailman/listinfo.cgi/boost
participants (2)
-
Greg Rubino
-
Joel de Guzman