Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56609 - trunk/libs/fusion/test/sequence
From: hartmut.kaiser_at_[hidden]
Date: 2009-10-05 18:29:10


Author: hkaiser
Date: 2009-10-05 18:29:10 EDT (Mon, 05 Oct 2009)
New Revision: 56609
URL: http://svn.boost.org/trac/boost/changeset/56609

Log:
Fusion: fixing nview tests
Text files modified:
   trunk/libs/fusion/test/sequence/nview.cpp | 32 +++++++++++++++++---------------
   1 files changed, 17 insertions(+), 15 deletions(-)

Modified: trunk/libs/fusion/test/sequence/nview.cpp
==============================================================================
--- trunk/libs/fusion/test/sequence/nview.cpp (original)
+++ trunk/libs/fusion/test/sequence/nview.cpp 2009-10-05 18:29:10 EDT (Mon, 05 Oct 2009)
@@ -28,48 +28,48 @@
     (double, double_)
 );
 
-using namespace boost::fusion;
+namespace fusion = boost::fusion;
 
 template <typename Sequence>
-bool check_size(Sequence& s, int seqsize)
+bool check_size(Sequence const& s, int seqsize)
 {
- return size(s) == seqsize;
+ return fusion::size(s) == seqsize;
 }
 
 template <typename Sequence, typename T>
-bool check_deref_begin(Sequence& s, T val)
+bool check_deref_begin(Sequence const& s, T val)
 {
- return deref(begin(s)) == val;
+ return fusion::deref(fusion::begin(s)) == val;
 }
 
 template <typename Sequence, typename T>
-bool check_deref_next(Sequence& s, T val)
+bool check_deref_next(Sequence const& s, T val)
 {
- return deref(next(begin(s))) == val;
+ return fusion::deref(fusion::next(fusion::begin(s))) == val;
 }
 
 template <int N, typename Sequence, typename T>
-bool check_deref_advance(Sequence& s, T val)
+bool check_deref_advance(Sequence const& s, T val)
 {
- return deref(advance_c<N>(begin(s))) == val;
+ return fusion::deref(fusion::advance_c<N>(fusion::begin(s))) == val;
 }
 
 template <typename Sequence, typename T>
-bool check_deref_prior(Sequence& s, T val)
+bool check_deref_prior(Sequence const& s, T val)
 {
- return deref(prior(end(s))) == val;
+ return fusion::deref(fusion::prior(fusion::end(s))) == val;
 }
 
 template <int N, typename Sequence, typename T>
-bool check_at(Sequence& s, T val)
+bool check_at(Sequence const& s, T val)
 {
- return at_c<N>(s) == val;
+ return fusion::at_c<N>(s) == val;
 }
 
 template <typename Sequence>
-bool check_distance(Sequence& s, int val)
+bool check_distance(Sequence const& s, int val)
 {
- return distance(begin(s), end(s)) == val;
+ return fusion::distance(fusion::begin(s), fusion::end(s)) == val;
 }
 
 int main()
@@ -79,6 +79,8 @@
     t.string_ = "test";
     t.double_ = 2.0;
 
+ using fusion::as_nview;
+
     // check size()
     {
         BOOST_TEST(check_size(as_nview<0>(t), 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