Boost logo

Boost :

Subject: [boost] [fusion] BOOST_FUSION_ADAPT_TPL_STRUCT
From: Greg Rubino (bibil.thaysose_at_[hidden])
Date: 2014-06-27 11:10:06


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<exists_tag> {
    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. Here's the error that I get when I try to
compile this code:

./include/query_tree.h:122:1: error: template parameters not used in
partial specialization:
./include/query_tree.h:122:1: error: ‘Oper’

Repeated 8 times. Any ideas?

Thanks,
Greg


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk