|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r60825 - in sandbox/statistics/detail/assign: boost/assign/auto_size/check boost/assign/auto_size/range libs/assign/doc libs/assign/src libs/assign/test
From: erwann.rogard_at_[hidden]
Date: 2010-03-25 11:57:31
Author: e_r
Date: 2010-03-25 11:57:29 EDT (Thu, 25 Mar 2010)
New Revision: 60825
URL: http://svn.boost.org/trac/boost/changeset/60825
Log:
m
Text files modified:
sandbox/statistics/detail/assign/boost/assign/auto_size/check/all.hpp | 67 ++++++++++++++++++++++++---------------
sandbox/statistics/detail/assign/boost/assign/auto_size/check/constants.hpp | 3 +
sandbox/statistics/detail/assign/boost/assign/auto_size/check/converter.hpp | 8 ++++
sandbox/statistics/detail/assign/boost/assign/auto_size/check/example1.hpp | 3 -
sandbox/statistics/detail/assign/boost/assign/auto_size/check/ref_csv.hpp | 7 ++-
sandbox/statistics/detail/assign/boost/assign/auto_size/check/ref_list_of.hpp | 7 ++-
sandbox/statistics/detail/assign/boost/assign/auto_size/range/chain_convert.hpp | 4 +-
sandbox/statistics/detail/assign/boost/assign/auto_size/range/convert_range.hpp | 42 +++++++++++++-----------
sandbox/statistics/detail/assign/libs/assign/doc/compilers_tested.txt | 11 +++++
sandbox/statistics/detail/assign/libs/assign/src/main.cpp | 13 +++++--
sandbox/statistics/detail/assign/libs/assign/test/ref_csv.cpp | 24 +++----------
sandbox/statistics/detail/assign/libs/assign/test/ref_list_of.cpp | 15 ++------
12 files changed, 116 insertions(+), 88 deletions(-)
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/check/all.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/check/all.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/check/all.hpp 2010-03-25 11:57:29 EDT (Thu, 25 Mar 2010)
@@ -1,5 +1,5 @@
//////////////////////////////////////////////////////////////////////////////
-// assign::detail::auto_size::check_all.hpp //
+// assign::detail::auto_size::check::all.hpp //
// //
// (C) Copyright 2010 Erwann Rogard //
// Use, modification and distribution are subject to the //
@@ -17,52 +17,67 @@
#include <boost/array.hpp>
#include <boost/assign/auto_size/check/constants.hpp>
-
+#include <boost/assign/auto_size/check/example1.hpp>
+#include <boost/assign/auto_size/check/iterator.hpp>
#include <boost/assign/auto_size/check/array.hpp>
+#include <boost/assign/auto_size/check/copy_iterator.hpp>
+#include <boost/assign/auto_size/check/copy_array.hpp>
+#include <boost/assign/auto_size/check/rebind_array.hpp>
#include <boost/assign/auto_size/check/comparison_op.hpp>
#include <boost/assign/auto_size/check/converter.hpp>
-#include <boost/assign/auto_size/check/copy_array.hpp>
-#include <boost/assign/auto_size/check/copy_iterator.hpp>
-#include <boost/assign/auto_size/check/example1.hpp>
#include <boost/assign/auto_size/check/fifo.hpp>
-#include <boost/assign/auto_size/check/iterator.hpp>
#include <boost/assign/auto_size/check/lifo.hpp>
-#include <boost/assign/auto_size/check/rebind_array.hpp>
-#include <boost/assign/auto_size/check/example2.hpp>
#include <boost/assign/auto_size/check/chain_convert_r.hpp>
#include <boost/assign/auto_size/check/chain_convert_l.hpp>
+#include <boost/assign/auto_size/check/example2.hpp>
+
+#define BOOST_ASSIGN_AS_CHECK_fun_tpl(suffix) \
+ template<typename T> void \
+ BOOST_PP_CAT(check_,BOOST_PP_CAT(BOOST_ASSIGN_AS_CHECK_infix,BOOST_PP_CAT(_,suffix))) \
+/**/
-#define BOOST_ASSIGN_AS_CHECK_all(fun) \
namespace boost{ \
namespace assign{ \
namespace detail{ \
namespace auto_size{ \
- \
-template<typename T> \
-void fun(){ \
- BOOST_ASSIGN_AS_CHECK_example1 \
- BOOST_ASSIGN_AS_CHECK_iterator \
- BOOST_ASSIGN_AS_CHECK_array \
- BOOST_ASSIGN_AS_CHECK_copy_iterator \
- BOOST_ASSIGN_AS_CHECK_copy_array \
- BOOST_ASSIGN_AS_CHECK_rebind_array \
- BOOST_ASSIGN_AS_CHECK_comparison_op \
- BOOST_ASSIGN_AS_CHECK_converter(std::list<T>) \
- BOOST_ASSIGN_AS_CHECK_converter(std::vector<T>) \
+ BOOST_ASSIGN_AS_CHECK_fun_tpl(example1)() \
+ BOOST_ASSIGN_AS_CHECK_example1 \
+ BOOST_ASSIGN_AS_CHECK_fun_tpl(iterator)() \
+ BOOST_ASSIGN_AS_CHECK_iterator \
+ BOOST_ASSIGN_AS_CHECK_fun_tpl(array)() \
+ BOOST_ASSIGN_AS_CHECK_array \
+ BOOST_ASSIGN_AS_CHECK_fun_tpl(copy_iterator)() \
+ BOOST_ASSIGN_AS_CHECK_copy_iterator \
+ BOOST_ASSIGN_AS_CHECK_fun_tpl(copy_array)() \
+ BOOST_ASSIGN_AS_CHECK_copy_array \
+ BOOST_ASSIGN_AS_CHECK_fun_tpl(rebind_array)() \
+ BOOST_ASSIGN_AS_CHECK_rebind_array \
+ BOOST_ASSIGN_AS_CHECK_fun_tpl(comparison_op)() \
+ BOOST_ASSIGN_AS_CHECK_comparison_op \
+ BOOST_ASSIGN_AS_CHECK_fun_tpl(converter_list)() \
+ BOOST_ASSIGN_AS_CHECK_converter(std::list<T>) \
+ BOOST_ASSIGN_AS_CHECK_fun_tpl(converter_vector)() \
+ BOOST_ASSIGN_AS_CHECK_converter(std::vector<T>) \
+ BOOST_ASSIGN_AS_CHECK_fun_tpl(converter_array)() \
+ BOOST_ASSIGN_AS_CHECK_converter_array \
+ BOOST_ASSIGN_AS_CHECK_fun_tpl(converter_set)() \
+ BOOST_ASSIGN_AS_CHECK_converter_sorted(std::set<T>) \
+ BOOST_ASSIGN_AS_CHECK_fun_tpl(adapter_stack)() \
BOOST_ASSIGN_AS_CHECK_adapter_lifo(std::stack<T>) \
+ BOOST_ASSIGN_AS_CHECK_fun_tpl(adapter_queue)() \
BOOST_ASSIGN_AS_CHECK_adapter_fifo(std::queue<T>) \
- typedef boost::array<T,8> ar8_; \
- BOOST_ASSIGN_AS_CHECK_converter(ar8_) \
- BOOST_ASSIGN_AS_CHECK_converter_sorted(std::set<T>) \
+ BOOST_ASSIGN_AS_CHECK_fun_tpl(chain_convert_r)() \
BOOST_ASSIGN_AS_CHECK_chain_convert_r \
+ BOOST_ASSIGN_AS_CHECK_fun_tpl(chain_convert_l)() \
BOOST_ASSIGN_AS_CHECK_chain_convert_l \
+ BOOST_ASSIGN_AS_CHECK_fun_tpl(example2)() \
BOOST_ASSIGN_AS_CHECK_example2 \
} \
-void BOOST_PP_CAT(fun,_int)(){ fun<int>(); } \
-} \
} \
} \
} \
/**/
+#undef BOOST_ASSIGN_AS_CHECK_fun_tpl
+
#endif
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/check/constants.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/check/constants.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/check/constants.hpp 2010-03-25 11:57:29 EDT (Thu, 25 Mar 2010)
@@ -29,7 +29,8 @@
const int h = 7; // 6
// array
- boost::array<int,8> array(){
+ boost::array<int,8> array()
+ {
typedef boost::array<int,8> ar_;
ar_ ar;
ar[0] = a; ar[1] = b; ar[2] = c;
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/check/converter.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/check/converter.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/check/converter.hpp 2010-03-25 11:57:29 EDT (Thu, 25 Mar 2010)
@@ -38,4 +38,12 @@
check_iterator_sorted_impl(boost::begin(elems)); \
} \
/**/
+
+#define BOOST_ASSIGN_AS_CHECK_converter_array \
+{ \
+ typedef boost::array<T,8> ar8_; \
+ BOOST_ASSIGN_AS_CHECK_converter(ar8_) \
+} \
+/**/
+
#endif
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/check/example1.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/check/example1.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/check/example1.hpp 2010-03-25 11:57:29 EDT (Thu, 25 Mar 2010)
@@ -8,6 +8,7 @@
//////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_ASSIGN_DETAIL_AUTO_SIZE_CHECK_EXAMPLE1_ER_2010_HPP
#define BOOST_ASSIGN_DETAIL_AUTO_SIZE_CHECK_EXAMPLE1_ER_2010_HPP
+#include <iostream>
#include <boost/range/algorithm/max_element.hpp>
#define BOOST_ASSIGN_AS_CHECK_example1 \
@@ -30,5 +31,3 @@
/**/
#endif
-
-
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/check/ref_csv.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/check/ref_csv.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/check/ref_csv.hpp 2010-03-25 11:57:29 EDT (Thu, 25 Mar 2010)
@@ -10,7 +10,6 @@
#define BOOST_ASSIGN_DETAIL_AUTO_SIZE_CHECK_REF_CSV_ER_2010_HPP
#include <boost/assign/auto_size/ref_csv.hpp>
#include <boost/assign/auto_size/ref_rebind_csv.hpp>
-#include <boost/assign/auto_size/check/all.hpp>
#define BOOST_ASSIGN_AS_CHECK_ref1(a) ref_csv(a)
#define BOOST_ASSIGN_AS_CHECK_ref2(a,b) ref_csv(a,b)
@@ -32,7 +31,9 @@
#define BOOST_ASSIGN_AS_CHECK_ref_rebind3(a,b,c) ref_rebind_csv(a,b,c)
-BOOST_ASSIGN_AS_CHECK_all(check_ref_csv)
+#define BOOST_ASSIGN_AS_CHECK_infix ref_csv
+
+#include <boost/assign/auto_size/check/all.hpp>
#undef BOOST_ASSIGN_AS_CHECK_ref1
#undef BOOST_ASSIGN_AS_CHECK_ref2
@@ -54,6 +55,8 @@
#undef BOOST_ASSIGN_AS_CHECK_ref_rebind3
+#undef BOOST_ASSIGN_AS_CHECK_infix
+
#endif
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/check/ref_list_of.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/check/ref_list_of.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/check/ref_list_of.hpp 2010-03-25 11:57:29 EDT (Thu, 25 Mar 2010)
@@ -10,7 +10,6 @@
#define BOOST_ASSIGN_DETAIL_AUTO_SIZE_CHECK_REF_LIST_OF_ER_2010_HPP
#include <boost/assign/auto_size/ref_list_of.hpp>
#include <boost/assign/auto_size/ref_rebind_list_of.hpp>
-#include <boost/assign/auto_size/check/all.hpp>
#define BOOST_ASSIGN_AS_CHECK_ref1(a) ref_list_of(a)
#define BOOST_ASSIGN_AS_CHECK_ref2(a,b) ref_list_of(a)(b)
@@ -32,7 +31,9 @@
#define BOOST_ASSIGN_AS_CHECK_ref_rebind3(a,b,c) ref_rebind_list_of(a)(b)(c)
-BOOST_ASSIGN_AS_CHECK_all(check_ref_list_of)
+#define BOOST_ASSIGN_AS_CHECK_infix ref_list_of
+
+#include <boost/assign/auto_size/check/all.hpp>
#undef BOOST_ASSIGN_AS_CHECK_ref1
#undef BOOST_ASSIGN_AS_CHECK_ref2
@@ -54,6 +55,8 @@
#undef BOOST_ASSIGN_AS_CHECK_ref_rebind3
+#undef BOOST_ASSIGN_AS_CHECK_infix
+
#endif
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/range/chain_convert.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/range/chain_convert.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/range/chain_convert.hpp 2010-03-25 11:57:29 EDT (Thu, 25 Mar 2010)
@@ -119,10 +119,10 @@
// rvalue constructors
explicit expr(const Rng1& r1)
- :impl_(convert_range<V,R>(r1))
+ :impl_(convert_range<V,R,Rng1>(r1))
{}
explicit expr(const E& e,const Rng1& r1)
- :impl_(e,convert_range<V,R>(r1))
+ :impl_(e,convert_range<V,R,Rng1>(r1))
{}
// unary operators
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/range/convert_range.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/range/convert_range.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/range/convert_range.hpp 2010-03-25 11:57:29 EDT (Thu, 25 Mar 2010)
@@ -93,37 +93,41 @@
return caller_::call( r );
}
-/*
- // operator|
+namespace adaptor{
+ template<typename V,typename R> struct convert_range{};
+}
+
+ // operator|
+ // Warning : not tested.
- template<typename T,typename Rng>
- inline typename detail::result_of::convert_range<Rng,T>::type
- operator|( Rng& r, const detail::adaptor::convert_range<T>& f )
+ template<typename V,typename R,typename Rng>
+ inline typename detail::result_of::convert_range<Rng,V,R>::type
+ operator|( Rng& r, const adaptor::convert_range<V,R>& a )
{
- return convert_range<T>(r);
+ return convert_range<V,R,Rng>(r);
}
- template<typename T,typename Rng>
- inline typename detail::result_of::convert_range<const Rng,T>::type
- operator|( const Rng& r, const detail::adaptor::convert_range<T>& f )
+ template<typename V,typename Rng>
+ inline typename detail::result_of::convert_range<Rng,V>::type
+ operator|( Rng& r, const adaptor::convert_range<V,use_default>& a )
{
- return convert_range<T>(r);
+ return convert_range<V,use_default,Rng>(r);
}
- template<typename Rng>
- inline typename detail::result_of::convert_range<Rng>::type
- operator|( Rng& r, const detail::adaptor::convert_range<>& f )
+ template<typename V,typename R,typename Rng>
+ inline typename detail::result_of::convert_range<const Rng,V,R>::type
+ operator|( const Rng& r, const adaptor::convert_range<V,R>& a )
{
- return convert_range(r);
+ return convert_range<V,R,Rng>(r);
}
- template<typename Rng>
- inline typename detail::result_of::convert_range<const Rng>::type
- operator|( const Rng& r, const detail::adaptor::convert_range<>& f )
+ template<typename V,typename Rng>
+ inline typename detail::result_of::convert_range<const Rng,V>::type
+ operator|( const Rng& r, const adaptor::convert_range<V,use_default>& a )
{
- return convert_range(r);
+ return convert_range<V,use_default,Rng>(r);
}
-*/
+
}// assign
}// boost
Modified: sandbox/statistics/detail/assign/libs/assign/doc/compilers_tested.txt
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/doc/compilers_tested.txt (original)
+++ sandbox/statistics/detail/assign/libs/assign/doc/compilers_tested.txt 2010-03-25 11:57:29 EDT (Thu, 25 Mar 2010)
@@ -1,5 +1,6 @@
Platform Compiler Boost version Date Tested
Mac OS X 10.6 gcc 4.2 boost_1_41_0 March 24th, 2010
+Ubuntu 9.10 gcc 4.4 boost_1_41_0 March 24th, 2010
Win7-32 V6.1.7100 Dev-C++ 5.0 beta 9.2 - Mingw/GCC 3.4.2 boost_1_41_0 March 1st, 2010
Win7-32 V6.1.7100 Visual Studio 2010 boost_1_41_0 March 1st, 2010
@@ -9,4 +10,12 @@
March 24th/OSX:
/trunk/libs/assign/test$ sudo bjam toolset=darwin debug
**passed** ../../../bin.v2/libs/assign/test/ref_list_of.test/darwin-4.2.1/debug/ref_list_of.test
-**passed** ../../../bin.v2/libs/assign/test/ref_csv.test/darwin-4.2.1/debug/ref_csv.test
\ No newline at end of file
+**passed** ../../../bin.v2/libs/assign/test/ref_csv.test/darwin-4.2.1/debug/ref_csv.test
+
+March 24th/Ubuntu/GCC
+/trunk/libs/assign/test$ sudo bjam toolset=gcc debug
+**passed** ../../../bin.v2/libs/assign/test/ref_list_of.test/gcc-4.4.1/debug/ref_list_of.test
+**passed** ../../../bin.v2/libs/assign/test/ref_csv.test/gcc-4.4.1/debug/ref_csv.test
+
+TODO :
+- fix warning: comparison between signed and unsigned integer expressions
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-03-25 11:57:29 EDT (Thu, 25 Mar 2010)
@@ -1,7 +1,7 @@
#include <iostream>
#define BOOST_ASSIGN_CHECK_EQUAL(a,b) BOOST_ASSERT(a==b)
#include <boost/assign/auto_size/check/ref_list_of.hpp>
-#include <boost/assign/auto_size/check/ref_csv.hpp>
+//#include <boost/assign/auto_size/check/ref_csv.hpp>
#undef BOOST_ASSIGN_CHECK_EQUAL
#include <libs/assign/example/range.h>
@@ -9,10 +9,15 @@
using namespace boost::assign::detail::auto_size;
- check_ref_list_of_int();
+ void (*fp)();
+
+ fp = check_ref_list_of_example1<int>;
+
+ (*fp)();
+
std::cout << "check_ref_list_of : ok" << std::endl;
- check_ref_csv_int();
- std::cout << "check_csv : ok" << std::endl;
+ //check_ref_csv_int();
+ //std::cout << "check_csv : ok" << std::endl;
example_range(std::cout);
Modified: sandbox/statistics/detail/assign/libs/assign/test/ref_csv.cpp
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/test/ref_csv.cpp (original)
+++ sandbox/statistics/detail/assign/libs/assign/test/ref_csv.cpp 2010-03-25 11:57:29 EDT (Thu, 25 Mar 2010)
@@ -1,11 +1,4 @@
-//////////////////////////////////////////////////////////////////////////////
-// assign::test::ref_csv.cpp //
-// //
-// (C) Copyright 2010 Erwann Rogard //
-// Use, modification and distribution are subject to the //
-// Boost Software License, Version 1.0. (See accompanying file //
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) //
-//////////////////////////////////////////////////////////////////////////////
+
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
@@ -18,16 +11,11 @@
#define BOOST_ASSIGN_CHECK_EQUAL(a,b) BOOST_CHECK_EQUAL(a,b)
#include <boost/assign/auto_size/check/ref_csv.hpp>
#include <boost/test/unit_test.hpp>
-using boost::unit_test::test_suite;
-
-test_suite* init_unit_test_suite( int argc, char* argv[] )
-{
- test_suite* test = BOOST_TEST_SUITE( "List Test Suite" );
-
- using namespace boost::assign::detail::auto_size;
- test->add( BOOST_TEST_CASE( &check_ref_csv_int ) );
- return test;
-}
+#include <boost/assign/auto_size/check/unit_testing.hpp>
+#define BOOST_ASSIGN_AS_CHECK_infix ref_csv
+ BOOST_ASSIGN_AS_CHECK_TEST_SUITE
+#undef BOOST_ASSIGN_AS_CHECK_infix
#undef BOOST_ASSIGN_CHECK_EQUAL
+
Modified: sandbox/statistics/detail/assign/libs/assign/test/ref_list_of.cpp
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/test/ref_list_of.cpp (original)
+++ sandbox/statistics/detail/assign/libs/assign/test/ref_list_of.cpp 2010-03-25 11:57:29 EDT (Thu, 25 Mar 2010)
@@ -11,18 +11,11 @@
#define BOOST_ASSIGN_CHECK_EQUAL(a,b) BOOST_CHECK_EQUAL(a,b)
#include <boost/assign/auto_size/check/ref_list_of.hpp>
#include <boost/test/unit_test.hpp>
-using boost::unit_test::test_suite;
-
-test_suite* init_unit_test_suite( int argc, char* argv[] )
-{
- test_suite* test = BOOST_TEST_SUITE( "List Test Suite" );
- using namespace boost::assign::detail::auto_size;
- test->add( BOOST_TEST_CASE( &check_ref_list_of_int ) );
-
- return test;
-}
+#include <boost/assign/auto_size/check/unit_testing.hpp>
+#define BOOST_ASSIGN_AS_CHECK_infix ref_list_of
+ BOOST_ASSIGN_AS_CHECK_TEST_SUITE
+#undef BOOST_ASSIGN_AS_CHECK_infix
#undef BOOST_ASSIGN_CHECK_EQUAL
-
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