|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r60559 - in sandbox/statistics/detail/assign: boost/assign/auto_size boost/assign/auto_size/chain boost/assign/auto_size/check libs/assign/example libs/assign/src
From: erwann.rogard_at_[hidden]
Date: 2010-03-13 12:56:23
Author: e_r
Date: 2010-03-13 12:56:22 EST (Sat, 13 Mar 2010)
New Revision: 60559
URL: http://svn.boost.org/trac/boost/changeset/60559
Log:
m
Text files modified:
sandbox/statistics/detail/assign/boost/assign/auto_size/chain/as_member.hpp | 2
sandbox/statistics/detail/assign/boost/assign/auto_size/chain/auto_convert.hpp | 14 +-
sandbox/statistics/detail/assign/boost/assign/auto_size/chain/mpl_check.hpp | 243 +++++++++++++++++++--------------------
sandbox/statistics/detail/assign/boost/assign/auto_size/chain/pair_range_traits.hpp | 6
sandbox/statistics/detail/assign/boost/assign/auto_size/chain/pair_traits.hpp | 9
sandbox/statistics/detail/assign/boost/assign/auto_size/chain/reference_traits.hpp | 22 ++-
sandbox/statistics/detail/assign/boost/assign/auto_size/chain_auto_convert.hpp | 2
sandbox/statistics/detail/assign/boost/assign/auto_size/check/ref_list_of.hpp | 9
sandbox/statistics/detail/assign/libs/assign/example/chain.cpp | 7
sandbox/statistics/detail/assign/libs/assign/src/main.cpp | 5
10 files changed, 163 insertions(+), 156 deletions(-)
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/chain/as_member.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/chain/as_member.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/chain/as_member.hpp 2010-03-13 12:56:22 EST (Sat, 13 Mar 2010)
@@ -20,7 +20,7 @@
template<typename D1,typename R>
struct result_of_chain_auto_convert
- : assign::result_of::chain_auto_convert::convert_wrapper<D1,R>{};
+ : assign::result_of::chain_auto_convert::apply_conversion<D1,R>{};
template<typename R>
typename result_of_chain_auto_convert<D,R>::type
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/chain/auto_convert.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/chain/auto_convert.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/chain/auto_convert.hpp 2010-03-13 12:56:22 EST (Sat, 13 Mar 2010)
@@ -64,8 +64,8 @@
{};
template<typename R1,typename R2>
- struct convert_wrapper
- : chain_auto_convert::generic<detail::pair_traits::meta::convert_wrapper,R1,R2>
+ struct apply_conversion
+ : chain_auto_convert::generic<detail::pair_traits::meta::apply_conversion,R1,R2>
{};
}// chain_auto_convert
@@ -86,19 +86,19 @@
return chain_auto_convert<Conv,const R1,const R2>(r1,r2);
}
- // default uses convert_wrapper
+ // default uses apply_conversion
template<typename R1,typename R2>
- typename result_of::chain_auto_convert::convert_wrapper<R1,R2>::type
+ typename result_of::chain_auto_convert::apply_conversion<R1,R2>::type
chain_auto_convert(R1& r1,R2& r2){
- typedef result_of::chain_auto_convert::convert_wrapper<R1,R2> caller_;
+ typedef result_of::chain_auto_convert::apply_conversion<R1,R2> caller_;
return caller_::call(r1,r2);
}
template<typename R1,typename R2>
- typename result_of::chain_auto_convert::convert_wrapper<
+ typename result_of::chain_auto_convert::apply_conversion<
const R1,const R2>::type
chain_auto_convert(const R1& r1,const R2& r2){
- typedef result_of::chain_auto_convert::convert_wrapper<
+ typedef result_of::chain_auto_convert::apply_conversion<
const R1,const R2> caller_;
return caller_::call(r1,r2);
}
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/chain/mpl_check.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/chain/mpl_check.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/chain/mpl_check.hpp 2010-03-13 12:56:22 EST (Sat, 13 Mar 2010)
@@ -22,29 +22,28 @@
namespace detail{
namespace chain_mpl_check{
- template<typename T> struct dummy_wrapper;
-}
-
-template<typename T>
-struct is_ref_wrapper<
- chain_mpl_check::dummy_wrapper<T>
- > : boost::mpl::bool_<true>{};
-
-namespace ref_wrapper_traits{
- template<typename T>
- struct tag_of<chain_mpl_check::dummy_wrapper<T> >{
- typedef tag::default_ type;
- };
-}// ref_wrapper_traits
-
-namespace chain_mpl_check{
-
template<typename T>
struct dummy_wrapper{
operator T& ()const{ return *this->ref; }
private:
T* ref;
};
+}// chain_mpl_check
+namespace conversion_traits{
+
+ template<typename T>
+ struct tag_of< chain_mpl_check::dummy_wrapper<T> >
+ : tag::reference_to_inner_value{};
+
+}// conversion_traits
+namespace inner_value_traits{
+
+ template<typename T>
+ struct tag_of< chain_mpl_check::dummy_wrapper<T> >
+ : tag::nested_parameter{};
+
+}// inner_value_traits
+namespace chain_mpl_check{
template<typename T,bool is = true>
struct assert_cond{
@@ -60,10 +59,10 @@
struct assert_eq
: assert_cond<boost::is_same<T,U>,is>{};
-namespace convert_wrapper{
+namespace apply_conversion{
template<typename T>
- struct helper : reference_traits::convert_wrapper<T> {};
+ struct helper : reference_traits::convert_to<T> {};
template<typename T,typename U,bool is = true>
struct assert_eq
@@ -72,11 +71,11 @@
}
namespace pair_traits{
-namespace convert_wrapper{
+namespace apply_conversion{
template<typename T,typename U>
struct helper :
- detail::pair_traits::meta::convert_wrapper::template apply<T,U> {};
+ detail::pair_traits::meta::apply_conversion::template apply<T,U> {};
template<typename T,typename U,typename V,bool is = true>
struct assert_eq
@@ -94,7 +93,7 @@
namespace pair_range_traits{
template<typename R1,typename R2>
- struct helper : detail::pair_range_traits::convert_wrapper<R1,R2>{};
+ struct helper : detail::pair_range_traits::apply_conversion<R1,R2>{};
template<typename R1,typename R2,typename T>
struct assert_eq : chain_mpl_check::assert_eq<
@@ -145,113 +144,113 @@
typedef const awcv_ cawcv_;
typedef const acwcv_ cacwcv_;
- convert_wrapper::assert_eq< v_, v_ >();
- convert_wrapper::assert_eq< cv_, cv_ >();
- convert_wrapper::assert_eq< r_, r_ >();
- convert_wrapper::assert_eq< cr_, cr_ >();
-
- convert_wrapper::assert_eq< wv_, r_ >();
- convert_wrapper::assert_eq< wcv_, cr_ >();
+ apply_conversion::assert_eq< v_, v_ >();
+ apply_conversion::assert_eq< cv_, cv_ >();
+ apply_conversion::assert_eq< r_, r_ >();
+ apply_conversion::assert_eq< cr_, cr_ >();
+
+ apply_conversion::assert_eq< wv_, r_ >();
+ apply_conversion::assert_eq< wcv_, cr_ >();
- convert_wrapper::assert_eq< cwv_, r_ >();
- convert_wrapper::assert_eq< cwcv_, cr_ >();
+ apply_conversion::assert_eq< cwv_, r_ >();
+ apply_conversion::assert_eq< cwcv_, cr_ >();
- convert_wrapper::assert_eq< rwv_, r_ >();
- convert_wrapper::assert_eq< rwcv_, cr_ >();
+ apply_conversion::assert_eq< rwv_, r_ >();
+ apply_conversion::assert_eq< rwcv_, cr_ >();
- convert_wrapper::assert_eq< crwv_, r_ >();
- convert_wrapper::assert_eq< crwcv_, cr_ >();
+ apply_conversion::assert_eq< crwv_, r_ >();
+ apply_conversion::assert_eq< crwcv_, cr_ >();
namespace pt = pair_traits;
- pt::convert_wrapper::assert_eq< v_, v_, v_ >();
- pt::convert_wrapper::assert_eq< v_, cv_, cv_ >();
- pt::convert_wrapper::assert_eq< v_, r_, v_ >();
- pt::convert_wrapper::assert_eq< v_, cr_, cv_ >();
- pt::convert_wrapper::assert_eq< v_, wv_, v_ >();
- pt::convert_wrapper::assert_eq< v_, wcv_, cv_ >();
- pt::convert_wrapper::assert_eq< v_, cwv_, v_ >();
- pt::convert_wrapper::assert_eq< v_, cwcv_, cv_ >();
- pt::convert_wrapper::assert_eq< v_, rwv_, v_ >();
- pt::convert_wrapper::assert_eq< v_, rwcv_, cv_ >();
- pt::convert_wrapper::assert_eq< v_, crwv_, v_ >();
- pt::convert_wrapper::assert_eq< v_, crwcv_, cv_ >();
-
- pt::convert_wrapper::assert_eq< cv_, cv_, cv_ >();
- pt::convert_wrapper::assert_eq< cv_, r_, cv_ >();
- pt::convert_wrapper::assert_eq< cv_, cr_, cv_ >();
- pt::convert_wrapper::assert_eq< cv_, wv_, cv_ >();
- pt::convert_wrapper::assert_eq< cv_, wcv_, cv_ >();
- pt::convert_wrapper::assert_eq< cv_, cwv_, cv_ >();
- pt::convert_wrapper::assert_eq< cv_, cwcv_, cv_ >();
- pt::convert_wrapper::assert_eq< cv_, rwv_, cv_ >();
- pt::convert_wrapper::assert_eq< cv_, rwcv_, cv_ >();
- pt::convert_wrapper::assert_eq< cv_, crwv_, cv_ >();
- pt::convert_wrapper::assert_eq< cv_, crwcv_, cv_ >();
-
- pt::convert_wrapper::assert_eq< r_, r_, r_ >();
- pt::convert_wrapper::assert_eq< r_, cr_, cr_ >();
- pt::convert_wrapper::assert_eq< r_, wv_, r_ >();
- pt::convert_wrapper::assert_eq< r_, wcv_, cr_ >();
- pt::convert_wrapper::assert_eq< r_, cwv_, r_ >();
- pt::convert_wrapper::assert_eq< r_, cwcv_, cr_ >();
- pt::convert_wrapper::assert_eq< r_, rwv_, r_ >();
- pt::convert_wrapper::assert_eq< r_, rwcv_, cr_ >();
- pt::convert_wrapper::assert_eq< r_, crwv_, r_ >();
- pt::convert_wrapper::assert_eq< r_, crwcv_, cr_ >();
-
- pt::convert_wrapper::assert_eq< cr_, cr_, cr_ >();
- pt::convert_wrapper::assert_eq< cr_, wv_, cr_ >();
- pt::convert_wrapper::assert_eq< cr_, wcv_, cr_ >();
- pt::convert_wrapper::assert_eq< cr_, cwv_, cr_ >();
- pt::convert_wrapper::assert_eq< cr_, cwcv_, cr_ >();
- pt::convert_wrapper::assert_eq< cr_, rwv_, cr_ >();
- pt::convert_wrapper::assert_eq< cr_, rwcv_, cr_ >();
- pt::convert_wrapper::assert_eq< cr_, crwv_, cr_ >();
- pt::convert_wrapper::assert_eq< cr_, crwcv_, cr_ >();
-
- pt::convert_wrapper::assert_eq< wv_, wv_, r_ >();
- pt::convert_wrapper::assert_eq< wv_, wcv_, cr_ >();
- pt::convert_wrapper::assert_eq< wv_, cwv_, r_ >();
- pt::convert_wrapper::assert_eq< wv_, cwcv_, cr_ >();
- pt::convert_wrapper::assert_eq< wv_, rwv_, r_ >();
- pt::convert_wrapper::assert_eq< wv_, rwcv_, cr_ >();
- pt::convert_wrapper::assert_eq< wv_, crwv_, r_ >();
- pt::convert_wrapper::assert_eq< wv_, crwcv_, cr_ >();
-
- pt::convert_wrapper::assert_eq< wcv_, wcv_, cr_ >();
- pt::convert_wrapper::assert_eq< wcv_, cwv_, cr_ >();
- pt::convert_wrapper::assert_eq< wcv_, cwcv_, cr_ >();
- pt::convert_wrapper::assert_eq< wcv_, rwv_, cr_ >();
- pt::convert_wrapper::assert_eq< wcv_, rwcv_, cr_ >();
- pt::convert_wrapper::assert_eq< wcv_, crwv_, cr_ >();
- pt::convert_wrapper::assert_eq< wcv_, crwcv_, cr_ >();
-
- pt::convert_wrapper::assert_eq< cwv_, cwv_, r_ >();
- pt::convert_wrapper::assert_eq< cwv_, cwcv_, cr_ >();
- pt::convert_wrapper::assert_eq< cwv_, rwv_, r_ >();
- pt::convert_wrapper::assert_eq< cwv_, rwcv_, cr_ >();
- pt::convert_wrapper::assert_eq< cwv_, crwv_, r_ >();
- pt::convert_wrapper::assert_eq< cwv_, crwcv_, cr_ >();
-
- pt::convert_wrapper::assert_eq< cwcv_, cwcv_, cr_ >();
- pt::convert_wrapper::assert_eq< cwcv_, rwv_, cr_ >();
- pt::convert_wrapper::assert_eq< cwcv_, rwcv_, cr_ >();
- pt::convert_wrapper::assert_eq< cwcv_, crwv_, cr_ >();
- pt::convert_wrapper::assert_eq< cwcv_, crwcv_, cr_ >();
-
- pt::convert_wrapper::assert_eq< rwv_, rwv_, r_ >();
- pt::convert_wrapper::assert_eq< rwv_, rwcv_, cr_ >();
- pt::convert_wrapper::assert_eq< rwv_, crwv_, r_ >();
- pt::convert_wrapper::assert_eq< rwv_, crwcv_, cr_ >();
-
- pt::convert_wrapper::assert_eq< rwcv_, rwcv_, cr_ >();
- pt::convert_wrapper::assert_eq< rwcv_, crwv_, cr_ >();
- pt::convert_wrapper::assert_eq< rwcv_, crwcv_, cr_ >();
+ pt::apply_conversion::assert_eq< v_, v_, v_ >();
+ pt::apply_conversion::assert_eq< v_, cv_, cv_ >();
+ pt::apply_conversion::assert_eq< v_, r_, v_ >();
+ pt::apply_conversion::assert_eq< v_, cr_, cv_ >();
+ pt::apply_conversion::assert_eq< v_, wv_, v_ >();
+ pt::apply_conversion::assert_eq< v_, wcv_, cv_ >();
+ pt::apply_conversion::assert_eq< v_, cwv_, v_ >();
+ pt::apply_conversion::assert_eq< v_, cwcv_, cv_ >();
+ pt::apply_conversion::assert_eq< v_, rwv_, v_ >();
+ pt::apply_conversion::assert_eq< v_, rwcv_, cv_ >();
+ pt::apply_conversion::assert_eq< v_, crwv_, v_ >();
+ pt::apply_conversion::assert_eq< v_, crwcv_, cv_ >();
+
+ pt::apply_conversion::assert_eq< cv_, cv_, cv_ >();
+ pt::apply_conversion::assert_eq< cv_, r_, cv_ >();
+ pt::apply_conversion::assert_eq< cv_, cr_, cv_ >();
+ pt::apply_conversion::assert_eq< cv_, wv_, cv_ >();
+ pt::apply_conversion::assert_eq< cv_, wcv_, cv_ >();
+ pt::apply_conversion::assert_eq< cv_, cwv_, cv_ >();
+ pt::apply_conversion::assert_eq< cv_, cwcv_, cv_ >();
+ pt::apply_conversion::assert_eq< cv_, rwv_, cv_ >();
+ pt::apply_conversion::assert_eq< cv_, rwcv_, cv_ >();
+ pt::apply_conversion::assert_eq< cv_, crwv_, cv_ >();
+ pt::apply_conversion::assert_eq< cv_, crwcv_, cv_ >();
+
+ pt::apply_conversion::assert_eq< r_, r_, r_ >();
+ pt::apply_conversion::assert_eq< r_, cr_, cr_ >();
+ pt::apply_conversion::assert_eq< r_, wv_, r_ >();
+ pt::apply_conversion::assert_eq< r_, wcv_, cr_ >();
+ pt::apply_conversion::assert_eq< r_, cwv_, r_ >();
+ pt::apply_conversion::assert_eq< r_, cwcv_, cr_ >();
+ pt::apply_conversion::assert_eq< r_, rwv_, r_ >();
+ pt::apply_conversion::assert_eq< r_, rwcv_, cr_ >();
+ pt::apply_conversion::assert_eq< r_, crwv_, r_ >();
+ pt::apply_conversion::assert_eq< r_, crwcv_, cr_ >();
+
+ pt::apply_conversion::assert_eq< cr_, cr_, cr_ >();
+ pt::apply_conversion::assert_eq< cr_, wv_, cr_ >();
+ pt::apply_conversion::assert_eq< cr_, wcv_, cr_ >();
+ pt::apply_conversion::assert_eq< cr_, cwv_, cr_ >();
+ pt::apply_conversion::assert_eq< cr_, cwcv_, cr_ >();
+ pt::apply_conversion::assert_eq< cr_, rwv_, cr_ >();
+ pt::apply_conversion::assert_eq< cr_, rwcv_, cr_ >();
+ pt::apply_conversion::assert_eq< cr_, crwv_, cr_ >();
+ pt::apply_conversion::assert_eq< cr_, crwcv_, cr_ >();
+
+ pt::apply_conversion::assert_eq< wv_, wv_, r_ >();
+ pt::apply_conversion::assert_eq< wv_, wcv_, cr_ >();
+ pt::apply_conversion::assert_eq< wv_, cwv_, r_ >();
+ pt::apply_conversion::assert_eq< wv_, cwcv_, cr_ >();
+ pt::apply_conversion::assert_eq< wv_, rwv_, r_ >();
+ pt::apply_conversion::assert_eq< wv_, rwcv_, cr_ >();
+ pt::apply_conversion::assert_eq< wv_, crwv_, r_ >();
+ pt::apply_conversion::assert_eq< wv_, crwcv_, cr_ >();
+
+ pt::apply_conversion::assert_eq< wcv_, wcv_, cr_ >();
+ pt::apply_conversion::assert_eq< wcv_, cwv_, cr_ >();
+ pt::apply_conversion::assert_eq< wcv_, cwcv_, cr_ >();
+ pt::apply_conversion::assert_eq< wcv_, rwv_, cr_ >();
+ pt::apply_conversion::assert_eq< wcv_, rwcv_, cr_ >();
+ pt::apply_conversion::assert_eq< wcv_, crwv_, cr_ >();
+ pt::apply_conversion::assert_eq< wcv_, crwcv_, cr_ >();
+
+ pt::apply_conversion::assert_eq< cwv_, cwv_, r_ >();
+ pt::apply_conversion::assert_eq< cwv_, cwcv_, cr_ >();
+ pt::apply_conversion::assert_eq< cwv_, rwv_, r_ >();
+ pt::apply_conversion::assert_eq< cwv_, rwcv_, cr_ >();
+ pt::apply_conversion::assert_eq< cwv_, crwv_, r_ >();
+ pt::apply_conversion::assert_eq< cwv_, crwcv_, cr_ >();
+
+ pt::apply_conversion::assert_eq< cwcv_, cwcv_, cr_ >();
+ pt::apply_conversion::assert_eq< cwcv_, rwv_, cr_ >();
+ pt::apply_conversion::assert_eq< cwcv_, rwcv_, cr_ >();
+ pt::apply_conversion::assert_eq< cwcv_, crwv_, cr_ >();
+ pt::apply_conversion::assert_eq< cwcv_, crwcv_, cr_ >();
+
+ pt::apply_conversion::assert_eq< rwv_, rwv_, r_ >();
+ pt::apply_conversion::assert_eq< rwv_, rwcv_, cr_ >();
+ pt::apply_conversion::assert_eq< rwv_, crwv_, r_ >();
+ pt::apply_conversion::assert_eq< rwv_, crwcv_, cr_ >();
+
+ pt::apply_conversion::assert_eq< rwcv_, rwcv_, cr_ >();
+ pt::apply_conversion::assert_eq< rwcv_, crwv_, cr_ >();
+ pt::apply_conversion::assert_eq< rwcv_, crwcv_, cr_ >();
- pt::convert_wrapper::assert_eq< crwv_, crwv_, r_ >();
- pt::convert_wrapper::assert_eq< crwv_, crwcv_, cr_ >();
+ pt::apply_conversion::assert_eq< crwv_, crwv_, r_ >();
+ pt::apply_conversion::assert_eq< crwv_, crwcv_, cr_ >();
- pt::convert_wrapper::assert_eq< crwv_, crwcv_, cr_ >();
+ pt::apply_conversion::assert_eq< crwv_, crwcv_, cr_ >();
namespace prt = pair_range_traits;
prt::assert_checks<awv_,awv_>();
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/chain/pair_range_traits.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/chain/pair_range_traits.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/chain/pair_range_traits.hpp 2010-03-13 12:56:22 EST (Sat, 13 Mar 2010)
@@ -44,7 +44,7 @@
typedef typename boost::remove_const<c_>::type val_;
typedef detail::is_ref_wrapper<val_> is_wrapper;
- // Expected : (!is_wrapper::value), if Conv = convert_wrapper,
+ // Expected : (!is_wrapper::value), if Conv = apply_conversion,
// usually, but not necessarilly, for ex if a ref-wrapper point to
// another ref-wrapper.
};
@@ -57,8 +57,8 @@
{};
template<typename R1,typename R2>
- struct convert_wrapper
- : pair_range_traits::generic<pair_traits::meta::convert_wrapper,R1,R2>
+ struct apply_conversion
+ : pair_range_traits::generic<pair_traits::meta::apply_conversion,R1,R2>
{};
}// pair_range_traits
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/chain/pair_traits.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/chain/pair_traits.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/chain/pair_traits.hpp 2010-03-13 12:56:22 EST (Sat, 13 Mar 2010)
@@ -17,6 +17,7 @@
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/type_traits/remove_reference.hpp>
+#include <boost/assign/auto_size/chain/conversion_traits.hpp>
#include <boost/assign/auto_size/chain/reference_traits.hpp>
// Maps (T,U) to a type that both are convertible to. In particular, T and U
@@ -90,9 +91,9 @@
};
template<typename T,typename U>
- struct convert_wrapper : pair_traits::ignore_wrapper<
- typename reference_traits::convert_wrapper<T>::type,
- typename reference_traits::convert_wrapper<U>::type
+ struct apply_conversion : pair_traits::ignore_wrapper<
+ typename reference_traits::convert_to<T>::type,
+ typename reference_traits::convert_to<U>::type
>{};
namespace meta{
@@ -103,7 +104,7 @@
struct apply : M<T,U>{};
};
struct ignore_wrapper : meta::helper<pair_traits::ignore_wrapper>{};
- struct convert_wrapper : meta::helper<pair_traits::convert_wrapper>{};
+ struct apply_conversion : meta::helper<pair_traits::apply_conversion>{};
}
}// pair_traits
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/chain/reference_traits.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/chain/reference_traits.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/chain/reference_traits.hpp 2010-03-13 12:56:22 EST (Sat, 13 Mar 2010)
@@ -14,12 +14,16 @@
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/mpl/or.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/type_traits/remove_reference.hpp>
-#include <boost/assign/auto_size/chain/is_reference_wrapper.hpp>
-#include <boost/assign/auto_size/chain/reference_wrapper_traits.hpp>
+//#include <boost/assign/auto_size/chain/is_reference_wrapper.hpp>
+//#include <boost/assign/auto_size/chain/reference_wrapper_traits.hpp>
-// Map T, a reference or a reference_wrapper, to a convertible type.
+#include <boost/assign/auto_size/chain/conversion_traits.hpp>
+
+// Let T = U or U&, and U = V or const V. Maps T to a convertible type using the
+// information provided by the conversion traits
namespace boost{
namespace assign{
@@ -52,13 +56,13 @@
};
template<typename T>
- struct convert_wrapper{
+ struct convert_to{
typedef typename reference_traits::remove_cref<T>::type value_;
- typedef typename detail::is_ref_wrapper<value_>::type is_rw_;
- typedef typename boost::mpl::eval_if_c<
- is_rw_::value,
- ref_wrapper_traits::convertible_to<value_>,
- boost::mpl::identity<T>
+ typedef typename conversion_traits::convert_to<value_>::type to_;
+ typedef typename boost::mpl::if_c<
+ boost::is_same<to_,value_>::value,
+ T,
+ to_
>::type type;
};
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/chain_auto_convert.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/chain_auto_convert.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/chain_auto_convert.hpp 2010-03-13 12:56:22 EST (Sat, 13 Mar 2010)
@@ -10,6 +10,6 @@
#define BOOST_ASSIGN_AUTO_CHAIN_AUTO_CONVERT_ER_2010_HPP
#include <boost/assign/auto_size/chain/auto_convert.hpp>
-#include <boost/assign/auto_size/reference_wrapper/chain_traits.hpp>
+#include <boost/assign/auto_size/reference_wrapper/conversion_traits.hpp>
#endif
\ No newline at end of file
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-13 12:56:22 EST (Sat, 13 Mar 2010)
@@ -136,11 +136,10 @@
{
val_ a, b, c, d, e, f, g, h;
BOOST_AUTO(tmp1,ref_list_of(a)(b)(c)(d));
- // BOOST_AUTO(tmp2,cref_list_of(e)(f)(g)(h)); // For now (rvalue otherwise)
- check_chain(
- tmp1,
- cref_list_of(e)(f)(g)(h),
- a,b,c,d,e,f,g,h);
+ //check_chain(
+ // tmp1,
+ // cref_list_of(e)(f)(g)(h),
+ // a,b,c,d,e,f,g,h);
}
// TODO comparison operators
Modified: sandbox/statistics/detail/assign/libs/assign/example/chain.cpp
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/example/chain.cpp (original)
+++ sandbox/statistics/detail/assign/libs/assign/example/chain.cpp 2010-03-13 12:56:22 EST (Sat, 13 Mar 2010)
@@ -19,7 +19,7 @@
void example_chain(std::ostream& os)
{
- boost::assign::detail::chain_mpl_check::compound();
+ //boost::assign::detail::chain_mpl_check::compound();
using namespace boost::assign;
using namespace boost::assign::detail;
@@ -31,9 +31,10 @@
ar_ ar; ar.assign( -1 );
BOOST_AUTO(tmp1,ref_list_of(a)(b)(c)(d));
BOOST_AUTO(tmp2,cref_list_of(e)(f)(g)(h));
-
+
os << *boost::begin(ref_list_of(e)(f)(g)(h).chain_auto_convert(cref_list_of(e)(f)(g)(h))) << std::endl;
- //detail::add_const(tmp1).chain_auto_convert(tmp2));
+
+ // //detail::add_const(tmp1).chain_auto_convert(tmp2));
/*
os << *boost::next(boost::begin(tmp3),0) << std::endl;// EXC_BAD_ACCESS if add_const
os << *boost::next(boost::begin(tmp3),1) << std::endl;
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-13 12:56:22 EST (Sat, 13 Mar 2010)
@@ -3,14 +3,17 @@
#include <boost/assign/auto_size/check/ref_list_of.hpp>
#include <boost/assign/auto_size/check/ref_csv.hpp>
#undef BOOST_ASSIGN_CHECK_EQUAL
+#include <libs/assign/example/chain.h>
int main (int argc, char * const argv[]) {
- boost::assign::detail::auto_size::check_ref_list_of<int>();
+ //boost::assign::detail::auto_size::check_ref_list_of<int>();
std::cout << "check_ref_list_of : ok" << std::endl;
//boost::assign::detail::auto_size::check_ref_csv<int>();
//std::cout << "check_ref_csv : ok" << std::endl;
+ example_chain(std::cout);
+
return 0;
}
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