Boost logo

Boost Users :

Subject: [Boost-users] [proto] extends example not compiling
From: alfC (alfredo.correa_at_[hidden])
Date: 2009-12-15 23:18:19

Is this example, contained in the boost.Proto manual supposed to

#include <boost/proto/core.hpp>
#include <boost/proto/context.hpp>
#include <boost/proto/debug.hpp>

template<class T, class Dummy = boost::proto::is_proto_expr>
struct my_complex
        typename boost::proto::terminal<std::complex<T> >::type
      , my_complex<T>
      , boost::proto::default_domain

int main()
    my_complex<int> c0, c1;

    c0 + c1; // OK, operator+ found now!

I get this error (with gcc 4.3 and gcc 4.4):
proto_complex.cpp:10: error: expected nested-name-specifier before
proto_complex.cpp:10: error: two or more data types in declaration of
proto_complex.cpp:10: error: ‘proto_base_expr’ has not been declared
proto_complex.cpp:10: error: ‘proto_base_expr’ has not been declared

The strangest thing is that when I replace the macro by its explicit
code the code seems to compile.

Thank you,

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at