On 09/21/2010 08:54 AM, Joel Falcou wrote:
On 20/09/10 22:57, Roland Bock wrote:
typedef proto::terminalproto::_::type terminal;
struct addition:
proto::or_
<
terminal,
proto::plus
{};
terminal is a terminal type, not a terminal grammar:
struct addition :
proto::or_< proto::terminalproto::_
, proto::plus
{};
That did not make a difference:
// -----------------------------------------------------------------
#include<complex>
#include
using namespace boost;
struct addition :
proto::or_
<
proto::terminalproto::_
, proto::plus
>
{};
struct equation:
proto::or_
<
proto::equal_to
>
{};
template<class Expr>
struct extension;
struct my_domain
: proto::domain<
proto::pod_generator< extension>
, equation
>
{};
template<class Expr>
struct extension
{
BOOST_PROTO_EXTENDS(
Expr
, extension<Expr>
, my_domain
)
};
int main()
{
extension i;
i == i; // ERROR
}
// -----------------------------------------------------------------
Regards,
Roland