[Phoenix] expression does not name a type

Dear all,
I can't understand why this test case is not compiling:
#include

Dear all,
I can't understand why this test case is not compiling:
#include
#include #include #include <iostream> using namespace boost::phoenix::placeholders; expression::argument<1>::type X;
On Sep 22, 2011, at 2:12 PM, Júlio Hoffimann wrote: try typename boost::phoenix::expression::argument<1>::type X; or something equivalent
int main ( int argc, char *argv[] ) { boost::function
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.
HTH, Gordon

Hi Gordon,
Thank you for your reply. Incredibly, somehow, i forget to combine the
boost::phoenix namespace. I think i did it mentally, but forget to compile.
:-P
Regards,
Júlio.
2011/9/22 Gordon Woodhull
On Sep 22, 2011, at 2:12 PM, Júlio Hoffimann wrote:
Dear all,
I can't understand why this test case is not compiling:
#include
#include #include #include <iostream> using namespace boost::phoenix::placeholders; expression::argument<1>::type X; try
typename boost::phoenix::expression::argument<1>::type X;
or something equivalent
int main ( int argc, char *argv[] ){ boost::function
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.
HTH, Gordon
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Gordon Woodhull
-
Júlio Hoffimann