Boost logo

Boost Users :

Subject: [Boost-users] [Phoenix] expression does not name a type
From: Júlio Hoffimann (julio.hoffimann_at_[hidden])
Date: 2011-09-22 14:12:41


Dear all,

I can't understand why this test case is not compiling:

#include <boost/function.hpp>#include
<boost/phoenix/core/argument.hpp>#include
<boost/phoenix/operator.hpp>#include <iostream>
 using namespace boost::phoenix::placeholders;
expression::argument<1>::type X;
 int main ( int argc, char *argv[] ){
    boost::function<int(int)> f;
    f = if_else( X == 0, X, X*2 );
    std::cout << f(0) << f(12) << std::endl;
    return 0;} // ---------- end of function main ----------

The error message says 'expression' does not name a type. I've tried
to explicitly play with boost::phoenix namespaces, but doesn't work.

Appreciate any help,

Júlio.

P.S.: Boost 1.47 / GCC 4.5



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net