|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r59964 - in sandbox/statistics/detail/assign: boost/assign/auto_size libs/assign/example
From: erwann.rogard_at_[hidden]
Date: 2010-02-27 17:45:53
Author: e_r
Date: 2010-02-27 17:45:52 EST (Sat, 27 Feb 2010)
New Revision: 59964
URL: http://svn.boost.org/trac/boost/changeset/59964
Log:
m
Text files modified:
sandbox/statistics/detail/assign/boost/assign/auto_size/ref_list_of.hpp | 1 +
sandbox/statistics/detail/assign/libs/assign/example/cref_list_of2.cpp | 27 +++++++++++----------------
2 files changed, 12 insertions(+), 16 deletions(-)
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/ref_list_of.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/ref_list_of.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/ref_list_of.hpp 2010-02-27 17:45:52 EST (Sat, 27 Feb 2010)
@@ -46,6 +46,7 @@
return cref_list_of(a)(b)(c);
}
+
}// assign
}// boost
Modified: sandbox/statistics/detail/assign/libs/assign/example/cref_list_of2.cpp
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/example/cref_list_of2.cpp (original)
+++ sandbox/statistics/detail/assign/libs/assign/example/cref_list_of2.cpp 2010-02-27 17:45:52 EST (Sat, 27 Feb 2010)
@@ -33,25 +33,20 @@
ints_ ints;
{ os << "->Testing work in progress : csv " << std::endl;
- typedef detail::auto_size::result_of_copy<const int,2>::type res_;
+ typedef detail::auto_size::result_of_copy<const int,3>::type res_;
+
{
- BOOST_AUTO(tmp, cref_list_of(a)(b)(3));
-// res_ res1(tmp); //calls copy constructor
-// BOOST_ASSERT(res1[0] == a);
-// BOOST_ASSERT(res1[1] == b);
-// BOOST_ASSERT(res1[2] == c);
- }
- {
-// res_ res2= ( cref_list_of(a)(b)(3) ); // what constructor?!
-// BOOST_ASSERT(res2[0] == a);
-// BOOST_ASSERT(res2[1] == b);
-// BOOST_ASSERT(res2[2] == 3);
+ res_ res = cref_list_of(a)(b)(3);
+ BOOST_ASSERT(res[0] == a);
+ BOOST_ASSERT(res[1] == b);
+ BOOST_ASSERT(res[2] == 3);
}
{
- BOOST_AUTO(res3,cref_list_of(a,b,c)); // what contructor is called?!
- BOOST_ASSERT(res3[0] != a); //wrong
- BOOST_ASSERT(res3[1] != b); //wrong
- BOOST_ASSERT(res3[2] == c); //correct
+ // BUG
+ res_ res = cref_list_of(a,b,c);
+ BOOST_ASSERT(res[0] != a); //wrong
+ BOOST_ASSERT(res[1] != b); //wrong
+ BOOST_ASSERT(res[2] == c); //correct
}
os << "<-" << std::endl;
}
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