Thanks to Eric and Joel, it now works. Just for info, the solution:
 
// grammar forbidding address of for terminals
struct state_grammar : proto::not_<proto::address_of<proto::_> >
{};
// Forward-declare an expression wrapper
template<typename Expr>
struct make_state;
struct sm_domain
: proto::domain< proto::generator<make_state>, state_grammar >
{};
template<typename Expr>
struct make_state
: proto::extends<Expr, make_state<Expr>, sm_domain>
{
typedef
proto::extends<Expr, make_state<Expr>, sm_domain>
base_type;
// Needs a constructor
make_state(Expr const &e = Expr())
:
base_type(e)
{}
// Unhide Proto's overloaded assignment operator
using base_type::operator=;
};
 
Then, to define a terminal:
struct s1: make_state<proto::terminal<state_tag>::type>{};
 
Thanks a lot!
 
Regards,
 
Christophe


Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! Try it!