From b14725184648918de9eebc8298769e60a7ca01a7 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Wed, 11 May 2011 14:45:30 +0000 Subject: [PATCH] [phoenix] fixed factorial example [SVN r71870] --- example/factorial.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/example/factorial.cpp b/example/factorial.cpp index 82ba198..619a5f0 100644 --- a/example/factorial.cpp +++ b/example/factorial.cpp @@ -15,12 +15,12 @@ struct factorial_impl template struct result; - template + template struct result : result {}; - template + template struct result { typedef Arg type; @@ -37,9 +37,10 @@ struct factorial_impl int main() { + using boost::phoenix::arg_names::arg1; boost::phoenix::function factorial; - using namespace boost::phoenix::arg_names::arg1; int i = 4; + std::cout << factorial(i)() << std::endl; std::cout << factorial(arg1)(i) << std::endl; return 0; }