|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r59608 - in sandbox/statistics/detail/assign: boost/assign libs/assign/example libs/assign/src libs/assign/test
From: erwann.rogard_at_[hidden]
Date: 2010-02-09 19:33:56
Author: e_r
Date: 2010-02-09 19:33:55 EST (Tue, 09 Feb 2010)
New Revision: 59608
URL: http://svn.boost.org/trac/boost/changeset/59608
Log:
m
Text files modified:
sandbox/statistics/detail/assign/boost/assign/cref_list_of2.hpp | 44 ++++++++++++++++++++--------------------
sandbox/statistics/detail/assign/libs/assign/example/cref_list_of2.cpp | 22 ++++++++++----------
sandbox/statistics/detail/assign/libs/assign/example/cref_list_of2.h | 4 +-
sandbox/statistics/detail/assign/libs/assign/src/main.cpp | 4 +-
sandbox/statistics/detail/assign/libs/assign/test/cref_list_of2_speed.cpp | 28 ++++++++++++------------
sandbox/statistics/detail/assign/libs/assign/test/cref_list_of2_speed.h | 4 +-
6 files changed, 53 insertions(+), 53 deletions(-)
Modified: sandbox/statistics/detail/assign/boost/assign/cref_list_of2.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/cref_list_of2.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/cref_list_of2.hpp 2010-02-09 19:33:55 EST (Tue, 09 Feb 2010)
@@ -1,5 +1,5 @@
//////////////////////////////////////////////////////////////////////////////
-// assign::cref_list_of2.hpp //
+// assign::cref_list_of.hpp //
// //
// (C) Copyright 2010 Erwann Rogard //
// Use, modification and distribution are subject to the //
@@ -27,16 +27,16 @@
// the number of items to be specified in advance and uses copy semantics
// for the assignment operator.
// Usage 1:
- // std::vector<T> vec = cref_list_of2(a)(b)(c);
+ // std::vector<T> vec = cref_list_of(a)(b)(c);
// Usage 2:
- // boost::fill( ref_list_of2(a)(b)(c) , 0);
+ // boost::fill( ref_list_of(a)(b)(c) , 0);
//
- // For rebind semantics use ref_bind_list_of2(a)(b)(c)
+ // For rebind semantics use ref_rebind_list_of(a)(b)(c)
//
// Acknowledgement: The idea of this class was developed in collaboration
// with M.P.G
-namespace cref_list_of2_impl{
+namespace cref_list_of_impl{
typedef boost::mpl::void_ top_;
@@ -172,44 +172,44 @@
template<typename T>
struct first{
- typedef cref_list_of2_impl::expr<
- cref_list_of2_impl::top_,T,1> type;
+ typedef cref_list_of_impl::expr<
+ cref_list_of_impl::top_,T,1> type;
};
template<typename T>
struct bind_first{
- typedef cref_list_of2_impl::expr<
- cref_list_of2_impl::top_,T,1,ref_bind> type;
+ typedef cref_list_of_impl::expr<
+ cref_list_of_impl::top_,T,1,ref_bind> type;
};
-}// cref_list_of2_impl
+}// cref_list_of_impl
template<typename T>
- typename cref_list_of2_impl::first<const T>::type
- cref_list_of2(const T& t){
- typedef typename cref_list_of2_impl::first<const T>::type expr_;
+ typename cref_list_of_impl::first<const T>::type
+ cref_list_of(const T& t){
+ typedef typename cref_list_of_impl::first<const T>::type expr_;
return expr_(t);
}
template<typename T>
- typename cref_list_of2_impl::first<T>::type
- ref_list_of2(T& t){
- typedef typename cref_list_of2_impl::first<T>::type expr_;
+ typename cref_list_of_impl::first<T>::type
+ ref_list_of(T& t){
+ typedef typename cref_list_of_impl::first<T>::type expr_;
return expr_(t);
}
template<typename T>
- typename cref_list_of2_impl::bind_first<const T>::type
- cref_bind_list_of2(const T& t){
- typedef typename cref_list_of2_impl::bind_first<const T>::type expr_;
+ typename cref_list_of_impl::bind_first<const T>::type
+ cref_rebind_list_of(const T& t){
+ typedef typename cref_list_of_impl::bind_first<const T>::type expr_;
return expr_(t);
}
template<typename T>
- typename cref_list_of2_impl::bind_first<T>::type
- ref_bind_list_of2(T& t){
- typedef typename cref_list_of2_impl::bind_first<T>::type expr_;
+ typename cref_list_of_impl::bind_first<T>::type
+ ref_rebind_list_of(T& t){
+ typedef typename cref_list_of_impl::bind_first<T>::type expr_;
return expr_(t);
}
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-09 19:33:55 EST (Tue, 09 Feb 2010)
@@ -1,5 +1,5 @@
//////////////////////////////////////////////////////////////////////////////
-// example::cref_list_of2.cpp //
+// example::cref_list_of.cpp //
// //
// (C) Copyright 2010 Erwann Rogard //
// Use, modification and distribution are subject to the //
@@ -14,7 +14,7 @@
#include <boost/assign/list_of.hpp>
#include <libs/assign/example/cref_list_of2.h>
-void example_cref_list_of2(std::ostream& os)
+void example_cref_list_of(std::ostream& os)
{
os << "-> example_cref_listof2 : ";
using namespace boost::assign;
@@ -38,14 +38,14 @@
BOOST_ASSERT(array[1] == b);
BOOST_ASSERT(array[2] == c);
- // cref_list_of2
+ // cref_list_of
ints.clear();
- ints = cref_list_of2(a)(b)(3);
+ ints = cref_list_of(a)(b)(3);
BOOST_ASSERT(ints[0] == a);
BOOST_ASSERT(ints[1] == b);
BOOST_ASSERT(ints[2] == c);
array = array0;
- array = cref_list_of2(a)(b)(3);
+ array = cref_list_of(a)(b)(3);
BOOST_ASSERT(array[0] == a);
BOOST_ASSERT(array[1] == b);
BOOST_ASSERT(array[2] == c);
@@ -53,7 +53,7 @@
ints.clear();
BOOST_AUTO(
tmp,
- cref_list_of2(a)(b)(3)
+ cref_list_of(a)(b)(3)
);
ints = ints_(boost::begin(tmp),boost::end(tmp));
BOOST_ASSERT(ints[0] == a);
@@ -61,14 +61,14 @@
BOOST_ASSERT(ints[2] == c);
}
- // ref_list_of2
+ // ref_list_of
ints.clear();
- ints = ref_list_of2(a)(b)(c);
+ ints = ref_list_of(a)(b)(c);
BOOST_ASSERT(ints[0] == a);
BOOST_ASSERT(ints[1] == b);
BOOST_ASSERT(ints[2] == c);
array = array0;
- array = ref_list_of2(a)(b)(c);
+ array = ref_list_of(a)(b)(c);
BOOST_ASSERT(array[0] == a);
BOOST_ASSERT(array[1] == b);
BOOST_ASSERT(array[2] == c);
@@ -76,7 +76,7 @@
ints.clear();
BOOST_AUTO(
tmp,
- ref_list_of2(a)(b)(c)
+ ref_list_of(a)(b)(c)
);
ints = ints_(boost::begin(tmp),boost::end(tmp));
BOOST_ASSERT(ints[0] == a);
@@ -92,7 +92,7 @@
ints.clear();
BOOST_AUTO(
tmp,
- cref_bind_list_of2(a)(b)(c)
+ cref_rebind_list_of(a)(b)(c)
);
{
ints = tmp;
Modified: sandbox/statistics/detail/assign/libs/assign/example/cref_list_of2.h
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/example/cref_list_of2.h (original)
+++ sandbox/statistics/detail/assign/libs/assign/example/cref_list_of2.h 2010-02-09 19:33:55 EST (Tue, 09 Feb 2010)
@@ -1,5 +1,5 @@
//////////////////////////////////////////////////////////////////////////////
-// example::cref_list_of2.h //
+// example::cref_list_of.h //
// //
// (C) Copyright 2010 Erwann Rogard //
// Use, modification and distribution are subject to the //
@@ -10,6 +10,6 @@
#define LIBS_ASSIGN_EXAMPLE_CREF_LIST_OF2_ER_2010_HPP
#include <ostream>
-void example_cref_list_of2(std::ostream&);
+void example_cref_list_of(std::ostream&);
#endif
\ No newline at end of file
Modified: sandbox/statistics/detail/assign/libs/assign/src/main.cpp
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/src/main.cpp (original)
+++ sandbox/statistics/detail/assign/libs/assign/src/main.cpp 2010-02-09 19:33:55 EST (Tue, 09 Feb 2010)
@@ -4,8 +4,8 @@
int main (int argc, char * const argv[]) {
- example_cref_list_of2(std::cout);
- //test_cref_list_of2_speed(std::cout);
+ example_cref_list_of(std::cout);
+ test_cref_list_of_speed(std::cout);
return 0;
}
Modified: sandbox/statistics/detail/assign/libs/assign/test/cref_list_of2_speed.cpp
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/test/cref_list_of2_speed.cpp (original)
+++ sandbox/statistics/detail/assign/libs/assign/test/cref_list_of2_speed.cpp 2010-02-09 19:33:55 EST (Tue, 09 Feb 2010)
@@ -1,5 +1,5 @@
//////////////////////////////////////////////////////////////////////////////
-// test::cref_list_of2_speed.cpp //
+// test::cref_list_of_speed.cpp //
// //
//////////////////////////////////////////////////////////////////////////////
#include <iostream>
@@ -35,7 +35,7 @@
return result;
}
-void test_cref_list_of2_speed(std::ostream& os)
+void test_cref_list_of_speed(std::ostream& os)
{
os << "-> test_cref_listof2_speed : " << std::endl;
@@ -58,12 +58,12 @@
timer_ timer;
for(int i = 0; i < n; ++i)
{
- BOOST_AUTO(rng, boost::assign::cref_list_of2(v[0]));
+ BOOST_AUTO(rng, boost::assign::cref_list_of(v[0]));
int sz = (int)rng.size();
if(sz != N)
os << "ERROR\n";
}
- os << "cref_list_of2(" << N << ") => ";
+ os << "cref_list_of(" << N << ") => ";
}
{
timer_ timer;
@@ -84,12 +84,12 @@
timer_ timer;
for(int i = 0; i < n; ++i)
{
- BOOST_AUTO(rng, boost::assign::cref_list_of2(v[0])(v[1])(v[2]));
+ BOOST_AUTO(rng, boost::assign::cref_list_of(v[0])(v[1])(v[2]));
int sz = (int)rng.size();
if(sz != N)
os << "ERROR\n";
}
- os << "cref_list_of2(" << N << ") => ";
+ os << "cref_list_of(" << N << ") => ";
}
{
timer_ timer;
@@ -111,12 +111,12 @@
timer_ timer;
for(int i = 0; i < n; ++i)
{
- BOOST_AUTO(rng, boost::assign::cref_list_of2(v[0])(v[1])(v[2])(v[3])(v[4])(v[5])(v[6])(v[7])(v[8])(v[9]));
+ BOOST_AUTO(rng, boost::assign::cref_list_of(v[0])(v[1])(v[2])(v[3])(v[4])(v[5])(v[6])(v[7])(v[8])(v[9]));
int sz = (int)rng.size();
if(sz != N)
os << "ERROR\n";
}
- os << "cref_list_of2(" << N << ") => ";
+ os << "cref_list_of(" << N << ") => ";
}
{
timer_ timer;
@@ -138,14 +138,14 @@
timer_ timer;
for(int i = 0; i < n; ++i)
{
- BOOST_AUTO(rng, boost::assign::cref_list_of2(v[0])(v[1])(v[2])(v[3])(v[4])(v[5])(v[6])(v[7])(v[8])(v[9])
+ BOOST_AUTO(rng, boost::assign::cref_list_of(v[0])(v[1])(v[2])(v[3])(v[4])(v[5])(v[6])(v[7])(v[8])(v[9])
(v[10])(v[11])(v[12])(v[13])(v[14])(v[15])(v[16])(v[17])(v[18])(v[19])
(v[20])(v[21])(v[22])(v[23])(v[24])(v[25])(v[26])(v[27])(v[28])(v[29]));
int sz = (int)rng.size();
if(sz != N)
os << "ERROR\n";
}
- os << "cref_list_of2(" << N << ") => ";
+ os << "cref_list_of(" << N << ") => ";
}
{
timer_ timer;
@@ -169,7 +169,7 @@
timer_ timer;
for(int i = 0; i < n; ++i)
{
- BOOST_AUTO(rng, boost::assign::cref_list_of2( v[0])( v[1])( v[2])( v[3])( v[4])( v[5])( v[6])( v[7])( v[8])( v[9])
+ BOOST_AUTO(rng, boost::assign::cref_list_of( v[0])( v[1])( v[2])( v[3])( v[4])( v[5])( v[6])( v[7])( v[8])( v[9])
(v[10])(v[11])(v[12])(v[13])(v[14])(v[15])(v[16])(v[17])(v[18])(v[19])
(v[20])(v[21])(v[22])(v[23])(v[24])(v[25])(v[26])(v[27])(v[28])(v[29])
(v[30])(v[31])(v[32])(v[33])(v[34])(v[35])(v[36])(v[37])(v[38])(v[39])
@@ -181,7 +181,7 @@
if(sz != N)
os << "ERROR\n";
}
- os << "cref_list_of2(" << N << ") => ";
+ os << "cref_list_of(" << N << ") => ";
}
{
timer_ timer;
@@ -210,7 +210,7 @@
timer_ timer;
for(int i = 0; i < n; ++i)
{
- BOOST_AUTO(rng, boost::assign::cref_list_of2( v[0])( v[1])( v[2])( v[3])( v[4])( v[5])( v[6])( v[7])( v[8])( v[9])
+ BOOST_AUTO(rng, boost::assign::cref_list_of( v[0])( v[1])( v[2])( v[3])( v[4])( v[5])( v[6])( v[7])( v[8])( v[9])
(v[10])(v[11])(v[12])(v[13])(v[14])(v[15])(v[16])(v[17])(v[18])(v[19])
(v[20])(v[21])(v[22])(v[23])(v[24])(v[25])(v[26])(v[27])(v[28])(v[29])
(v[30])(v[31])(v[32])(v[33])(v[34])(v[35])(v[36])(v[37])(v[38])(v[39])
@@ -230,7 +230,7 @@
if(sz != N)
os << "ERROR\n";
}
- os << "cref_list_of2(" << N << ") => ";
+ os << "cref_list_of(" << N << ") => ";
}
{
timer_ timer;
Modified: sandbox/statistics/detail/assign/libs/assign/test/cref_list_of2_speed.h
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/test/cref_list_of2_speed.h (original)
+++ sandbox/statistics/detail/assign/libs/assign/test/cref_list_of2_speed.h 2010-02-09 19:33:55 EST (Tue, 09 Feb 2010)
@@ -1,11 +1,11 @@
//////////////////////////////////////////////////////////////////////////////
-// test::cref_list_of2_speed.h //
+// test::cref_list_of_speed.h //
// //
//////////////////////////////////////////////////////////////////////////////
#ifndef LIBS_ASSIGN_TEST_CREF_LIST_OF2_SPEED_ER_2010_H
#define LIBS_ASSIGN_TEST_CREF_LIST_OF2_SPEED_ER_2010_H
#include <ostream>
-void test_cref_list_of2_speed(std::ostream&);
+void test_cref_list_of_speed(std::ostream&);
#endif
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