Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64699 - in trunk/libs/spirit/test: karma qi
From: mr.chr.schmidt_at_[hidden]
Date: 2010-08-09 15:24:50


Author: cschmidt
Date: 2010-08-09 15:24:48 EDT (Mon, 09 Aug 2010)
New Revision: 64699
URL: http://svn.boost.org/trac/boost/changeset/64699

Log:
fixed initialization of one-element fusion sequences
Text files modified:
   trunk/libs/spirit/test/karma/pattern2.cpp | 4 ++--
   trunk/libs/spirit/test/karma/sequence.cpp | 2 +-
   trunk/libs/spirit/test/qi/rule.cpp | 4 ++--
   3 files changed, 5 insertions(+), 5 deletions(-)

Modified: trunk/libs/spirit/test/karma/pattern2.cpp
==============================================================================
--- trunk/libs/spirit/test/karma/pattern2.cpp (original)
+++ trunk/libs/spirit/test/karma/pattern2.cpp 2010-08-09 15:24:48 EDT (Mon, 09 Aug 2010)
@@ -105,7 +105,7 @@
         using boost::fusion::vector;
         karma::rule<outiter_type, vector<int>()> r = int_;
 
- vector<int> v = 1;
+ vector<int> v(1);
         BOOST_TEST(test("1", r, v));
     }
 
@@ -113,7 +113,7 @@
         using boost::fusion::vector;
         karma::rule<outiter_type, space_type, vector<int>()> r = int_;
 
- vector<int> v = 1;
+ vector<int> v(1);
         BOOST_TEST(test_delimited("1 ", r, v, space));
     }
 

Modified: trunk/libs/spirit/test/karma/sequence.cpp
==============================================================================
--- trunk/libs/spirit/test/karma/sequence.cpp (original)
+++ trunk/libs/spirit/test/karma/sequence.cpp 2010-08-09 15:24:48 EDT (Mon, 09 Aug 2010)
@@ -80,7 +80,7 @@
 
         {
             // a single element fusion sequence
- fusion::vector<char> attr = 'a';
+ fusion::vector<char> attr('a');
             BOOST_TEST((test("ab", char_ << 'b', attr)));
         }
 

Modified: trunk/libs/spirit/test/qi/rule.cpp
==============================================================================
--- trunk/libs/spirit/test/qi/rule.cpp (original)
+++ trunk/libs/spirit/test/qi/rule.cpp 2010-08-09 15:24:48 EDT (Mon, 09 Aug 2010)
@@ -471,7 +471,7 @@
         using boost::fusion::at_c;
         rule<const char*, vector<int>()> r = int_;
 
- vector<int> v = 0;
+ vector<int> v(0);
         BOOST_TEST(test_attr("1", r, v) && at_c<0>(v) == 1);
     }
 
@@ -480,7 +480,7 @@
         using boost::fusion::at_c;
         rule<const char*, vector<unsigned int>()> r = uint_;
 
- vector<unsigned int> v = 0;
+ vector<unsigned int> v(0);
         BOOST_TEST(test_attr("1", r, v) && at_c<0>(v) == 1);
     }
 


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