Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52863 - trunk/libs/spirit/test/qi
From: hartmut.kaiser_at_[hidden]
Date: 2009-05-09 16:57:57


Author: hkaiser
Date: 2009-05-09 16:57:57 EDT (Sat, 09 May 2009)
New Revision: 52863
URL: http://svn.boost.org/trac/boost/changeset/52863

Log:
Spirit: disambiguating phoenix::ref
Text files modified:
   trunk/libs/spirit/test/qi/symbols.cpp | 25 +++++++++++++------------
   1 files changed, 13 insertions(+), 12 deletions(-)

Modified: trunk/libs/spirit/test/qi/symbols.cpp
==============================================================================
--- trunk/libs/spirit/test/qi/symbols.cpp (original)
+++ trunk/libs/spirit/test/qi/symbols.cpp 2009-05-09 16:57:57 EDT (Sat, 09 May 2009)
@@ -40,7 +40,6 @@
     using boost::spirit::qi::rule;
     using boost::spirit::qi::lazy;
     using boost::spirit::qi::_r1;
- using boost::phoenix::ref;
 
     { // basics
         symbols<char, int> sym;
@@ -159,7 +158,7 @@
     }
 
     { // actions
- using boost::phoenix::ref;
+ namespace phx = boost::phoenix;
         using boost::spirit::_1;
 
         symbols<char, int> sym;
@@ -173,19 +172,19 @@
         ;
 
         int i;
- BOOST_TEST((test("Joel", sym[ref(i) = _1])));
+ BOOST_TEST((test("Joel", sym[phx::ref(i) = _1])));
         BOOST_TEST(i == 1);
- BOOST_TEST((test("Ruby", sym[ref(i) = _1])));
+ BOOST_TEST((test("Ruby", sym[phx::ref(i) = _1])));
         BOOST_TEST(i == 2);
- BOOST_TEST((test("Tenji", sym[ref(i) = _1])));
+ BOOST_TEST((test("Tenji", sym[phx::ref(i) = _1])));
         BOOST_TEST(i == 3);
- BOOST_TEST((test("Tutit", sym[ref(i) = _1])));
+ BOOST_TEST((test("Tutit", sym[phx::ref(i) = _1])));
         BOOST_TEST(i == 4);
- BOOST_TEST((test("Kim", sym[ref(i) = _1])));
+ BOOST_TEST((test("Kim", sym[phx::ref(i) = _1])));
         BOOST_TEST(i == 5);
- BOOST_TEST((test("Joey", sym[ref(i) = _1])));
+ BOOST_TEST((test("Joey", sym[phx::ref(i) = _1])));
         BOOST_TEST(i == 6);
- BOOST_TEST((!test("XXX", sym[ref(i) = _1])));
+ BOOST_TEST((!test("XXX", sym[phx::ref(i) = _1])));
     }
 
     { // construction from symbol array
@@ -253,6 +252,8 @@
     }
 
     {
+ namespace phx = boost::phoenix;
+
         symbols<char, int> sym;
         sym.add
             ("a", 1)
@@ -263,11 +264,11 @@
         r %= lazy(_r1);
 
         int i = 0;
- BOOST_TEST(test_attr("a", r(ref(sym)), i));
+ BOOST_TEST(test_attr("a", r(phx::ref(sym)), i));
         BOOST_TEST(i == 1);
- BOOST_TEST(test_attr("b", r(ref(sym)), i));
+ BOOST_TEST(test_attr("b", r(phx::ref(sym)), i));
         BOOST_TEST(i == 2);
- BOOST_TEST(!test("c", r(ref(sym))));
+ BOOST_TEST(!test("c", r(phx::ref(sym))));
     }
 
     return boost::report_errors();


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk