Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r60081 - in sandbox/statistics/detail: assign/boost/assign/auto_size/detail fusion/boost/statistics/detail/fusion/serialization fusion/libs/statistics/detail/fusion/example iterator iterator/boost iterator/boost/iterator iterator/libs iterator/libs/iterator iterator/libs/iterator/example serialization/boost/serialization/detail/inherit serialization/boost/serialization/detail/inherit/detail serialization/libs/serialization/detail/example
From: erwann.rogard_at_[hidden]
Date: 2010-03-02 16:15:35


Author: e_r
Date: 2010-03-02 16:15:33 EST (Tue, 02 Mar 2010)
New Revision: 60081
URL: http://svn.boost.org/trac/boost/changeset/60081

Log:
m
Added:
   sandbox/statistics/detail/iterator/
   sandbox/statistics/detail/iterator/boost/
   sandbox/statistics/detail/iterator/boost/iterator/
   sandbox/statistics/detail/iterator/boost/iterator/transform_iterator_deduce_sig_fp.hpp (contents, props changed)
   sandbox/statistics/detail/iterator/boost/iterator/transform_iterator_deduce_sig_uf.hpp (contents, props changed)
   sandbox/statistics/detail/iterator/libs/
   sandbox/statistics/detail/iterator/libs/iterator/
   sandbox/statistics/detail/iterator/libs/iterator/example/
   sandbox/statistics/detail/iterator/libs/iterator/example/deduce_sig.cpp (contents, props changed)
   sandbox/statistics/detail/iterator/libs/iterator/example/deduce_sig.h (contents, props changed)
   sandbox/statistics/detail/serialization/boost/serialization/detail/inherit/detail/inherit.hpp
      - copied unchanged from r59938, /sandbox/statistics/detail/serialization/boost/serialization/detail/inherit/inherit.hpp
   sandbox/statistics/detail/serialization/boost/serialization/detail/inherit/detail/inherit2.hpp
      - copied, changed from r59938, /sandbox/statistics/detail/serialization/boost/serialization/detail/inherit/inherit2.hpp
Removed:
   sandbox/statistics/detail/serialization/boost/serialization/detail/inherit/inherit.hpp
   sandbox/statistics/detail/serialization/boost/serialization/detail/inherit/inherit2.hpp
Text files modified:
   sandbox/statistics/detail/assign/boost/assign/auto_size/detail/assign_refence_copy.hpp | 7 +
   sandbox/statistics/detail/assign/boost/assign/auto_size/detail/auto_size.hpp | 17 ++--
   sandbox/statistics/detail/fusion/boost/statistics/detail/fusion/serialization/map.hpp | 41 ++++++++++++
   sandbox/statistics/detail/fusion/libs/statistics/detail/fusion/example/serialize.cpp | 135 +++++++++++++++++++++++++++------------
   sandbox/statistics/detail/serialization/boost/serialization/detail/inherit/detail/inherit2.hpp | 2
   sandbox/statistics/detail/serialization/boost/serialization/detail/inherit/include.hpp | 3
   sandbox/statistics/detail/serialization/boost/serialization/detail/inherit/inherit_linearly.hpp | 33 +++++----
   sandbox/statistics/detail/serialization/libs/serialization/detail/example/inherit_linearly.cpp | 6
   8 files changed, 170 insertions(+), 74 deletions(-)

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/detail/assign_refence_copy.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/detail/assign_refence_copy.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/detail/assign_refence_copy.hpp 2010-03-02 16:15:33 EST (Tue, 02 Mar 2010)
@@ -1,7 +1,7 @@
 //////////////////////////////////////////////////////////////////////////////
 // assign::detail::assign_reference_copy.hpp //
 // //
-// (C) Copyright 2010 M.P.G //
+// (C) Copyright 2010 Manuel Peinado Gallego //
 // 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) //
@@ -16,8 +16,9 @@
     // This is a reference wrapper whose assignment operator copies the value of
     // the rhs to the object pointed to.
     //
- // In contrast to assign_reference whose assignement operator rebinds the
- // address of the internal pointer. For the same effect, here, use rebind().
+ // This is in contrast to assign_reference whose assignement operator
+ // rebinds the address of the internal pointer. For the same effect, here,
+ // use rebind().
     template< class T >
     struct assign_reference_copy
     {

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/detail/auto_size.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/detail/auto_size.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/detail/auto_size.hpp 2010-03-02 16:15:33 EST (Tue, 02 Mar 2010)
@@ -20,7 +20,7 @@
 
 // Creates a collection of references by deducing the number of arguments
 // at compile time. The functionality is controlled by parameter Ref which
-// specifies a reference_wrapper, and P, an abitrary policy, usually intended
+// specifies a reference wrapper, and P, an abitrary policy, usually intended
 // to expose a container interface.
 //
 // Note:
@@ -32,13 +32,13 @@
 //
 // Revision history:
 // March 1, 2010 : Factored the interface into a policy. Csv improved by
-// returning array::wrapper, not array::policy, to avoid a pointer.
+// returning array_wrapper, not array_policy, to avoid a pointer.
 // Feb 27, 2010 : Support for comma separated arguments (See csv.hpp)
 // Feb 25, 2010 : Complemented the boost::array interface
 // Feb 21, 2010 : Made member variables mutable and added constness to member
 // functions where appropriate.
 // Feb 9, 2010 :
-// - Added a template parameter for the reference_wrapper
+// - Added a template parameter for the reference wrapper
 // - The temporary array in the conversion operator is now assigned by calling
 // begin() and end() rather than write_to_array() to ensure consistency of
 // side effect.
@@ -51,8 +51,8 @@
             
     typedef boost::mpl::void_ top_;
             
- template<typename L,typename T,int N,template<typename> class Ref,
- typename P>
+ template<
+ typename L,typename T,int N,template<typename> class Ref,typename P>
     class expr;
 
     // ---- Policy meta classes --- //
@@ -76,16 +76,15 @@
 
     // ---- Collection builder ---- //
             
- template<typename E,typename T,int N,template<typename> class Ref,
- typename P>
+ template<
+ typename E,typename T,int N,template<typename> class Ref,typename P>
     struct next{
         typedef expr<E,T,N,Ref,P> expr_;
         typedef expr<expr_,T,N+1,Ref,P> type;
     };
 
     template<
- typename E,typename T,int N,template<typename> class Ref,typename P
- >
+ typename E,typename T,int N,template<typename> class Ref,typename P>
     class expr : public P::template apply<E,T,N,Ref>::type{
         typedef boost::mpl::int_<1> int_1_;
         typedef boost::mpl::int_<N> int_n_;

Modified: sandbox/statistics/detail/fusion/boost/statistics/detail/fusion/serialization/map.hpp
==============================================================================
--- sandbox/statistics/detail/fusion/boost/statistics/detail/fusion/serialization/map.hpp (original)
+++ sandbox/statistics/detail/fusion/boost/statistics/detail/fusion/serialization/map.hpp 2010-03-02 16:15:33 EST (Tue, 02 Mar 2010)
@@ -65,6 +65,47 @@
         split_free(ar, t, file_version);
     }
 
+ // n = 4
+
+ template<class Archive,
+ typename K1,typename K2,typename K3,typename K4,
+ typename D1,typename D2,typename D3,typename D4
+ >
+ void serialize(
+ Archive & ar,
+ boost::fusion::map<
+ boost::fusion::pair<K1,D1>,
+ boost::fusion::pair<K2,D2>,
+ boost::fusion::pair<K3,D3>,
+ boost::fusion::pair<K4,D4>
+ >& t,
+ const unsigned int file_version
+ )
+ {
+ split_free(ar, t, file_version);
+ }
+
+ // n = 5
+
+ template<class Archive,
+ typename K1,typename K2,typename K3,typename K4,typename K5,
+ typename D1,typename D2,typename D3,typename D4,typename D5
+ >
+ void serialize(
+ Archive & ar,
+ boost::fusion::map<
+ boost::fusion::pair<K1,D1>,
+ boost::fusion::pair<K2,D2>,
+ boost::fusion::pair<K3,D3>,
+ boost::fusion::pair<K4,D4>,
+ boost::fusion::pair<K5,D5>
+ >& t,
+ const unsigned int file_version
+ )
+ {
+ split_free(ar, t, file_version);
+ }
+
 }}
 
 #endif

Modified: sandbox/statistics/detail/fusion/libs/statistics/detail/fusion/example/serialize.cpp
==============================================================================
--- sandbox/statistics/detail/fusion/libs/statistics/detail/fusion/example/serialize.cpp (original)
+++ sandbox/statistics/detail/fusion/libs/statistics/detail/fusion/example/serialize.cpp 2010-03-02 16:15:33 EST (Tue, 02 Mar 2010)
@@ -23,7 +23,6 @@
 #include <boost/fusion/include/make_vector.hpp>
 
 #include <boost/statistics/detail/fusion/serialization/include.hpp>
-#include <boost/statistics/detail/fusion/serialization/map.hpp> // tmp
 #include <libs/statistics/detail/fusion/example/serialize.h>
 
 void example_serialize(std::ostream& os){
@@ -37,54 +36,104 @@
     typedef mpl::int_<0> k0_;
     typedef mpl::int_<1> k1_;
     typedef mpl::int_<2> k2_;
- typedef int d0_;
- typedef int d1_;
- typedef int d2_;
- typedef boost::fusion::pair<k0_,d0_> pair_;
- typedef boost::fusion::result_of::make_map<k0_,k1_,d0_,d1_>::type map01_;
- typedef boost::fusion::result_of::make_map<k2_,d2_>::type map2_;
- typedef boost::fusion::vector2<map01_,map2_> vec_map01_map2_;
- typedef boost::archive::text_iarchive ia_;
+ typedef int val_;
+ typedef boost::fusion::vector2<val_,val_> vec2_int_;
+
+ typedef boost::fusion::result_of::make_map<k0_,k1_,val_,val_>::type m01_;
+ typedef boost::fusion::result_of::make_map<k2_,val_>::type m2_;
+ typedef boost::fusion::vector2<m01_,m2_> vec_m01_m2_;
+ typedef std::ofstream ofs_;
     typedef boost::archive::text_oarchive oa_;
     typedef std::ifstream ifs_;
- typedef std::ofstream ofs_;
+ typedef boost::archive::text_iarchive ia_;
         typedef std::string str_;
 
- const str_ path = "./fusion_serialization";
- const d0_ d0 = 2;
- const d1_ d1 = 1;
- const d2_ d2 = 0;
-
- map01_ map01(
- boost::fusion::make_pair<k0_>(d0),
- boost::fusion::make_pair<k1_>(d1)
- );
- map2_ map2(
- boost::fusion::make_pair<k2_>(d2)
- );
- vec_map01_map2_ vec_map01_map2(map01,map2);
- {
- ofs_ ofs(path.c_str());
- oa_ oa(ofs);
- oa << vec_map01_map2;
+ const val_ d0 = 0;
+ const val_ d1 = 1;
+ const val_ d2 = 2;
+
+ const char* path1 = "./fusion_serialize_vec_int";
+ const char* path2 = "./fusion_serialize_map";
+ const char* path3 = "./fusion_serialize_vec_map";
+ {
+ vec2_int_ vec2_int(d0,d1);
+ {
+ ofs_ ofs(path1);
+ oa_ oa(ofs);
+ oa << vec2_int;
+ {
+ vec2_int_ vec2_int;
+ ifs_ ifs(path1);
+ ia_ ia(ifs);
+ // ia >> vec2_int_cpy;
+ //BOOST_ASSERT(
+ // boost::fusion::at_c<0>( vec2_int ) == d0
+ //);
+ //BOOST_ASSERT(
+ // boost::fusion::at_c<1>( vec2_int ) == d1
+ //);
+ }
+ }
     }
- {
- vec_map01_map2_ vec;
-
- ifs_ ifs(path.c_str());
- ia_ ia(ifs);
- ia >> vec;
- BOOST_ASSERT(
- boost::fusion::at_key<k0_>( boost::fusion::at_c<0>(vec) ) == d0
- );
- BOOST_ASSERT(
- boost::fusion::at_key<k1_>( boost::fusion::at_c<0>(vec) ) == d1
- );
- BOOST_ASSERT(
- boost::fusion::at_key<k2_>( boost::fusion::at_c<1>(vec) ) == d2
- );
+/*
+ {
+ const str_ path = "./fusion_serialize_map";
+ m01_ m01 = boost::fusion::make_map<k0_,k1_>(d0,d1);
+ m2_ m2 = boost::fusion::make_map<k2_>(d2);
+ {
+ ofs_ ofs(path.c_str());
+ oa_ oa(ofs);
+ oa << m01;
+ oa << m2;
+ {
+ m01_ m01;
+ m2_ m2;
+
+ ifs_ ifs(path.c_str());
+ ia_ ia(ifs);
+ ia >> m01;
+ BOOST_ASSERT(
+ boost::fusion::at_key<k0_>( m01 ) == d0
+ );
+ BOOST_ASSERT(
+ boost::fusion::at_key<k1_>( m01 ) == d1
+ );
+ ia >> m2;
+ BOOST_ASSERT(
+ boost::fusion::at_key<k2_>( m2 ) == d2
+ );
+ }
+ }
+ }
+ {
+ const str_ path = "./fusion_serialize_vec_maps";
+ m01_ m01 = boost::fusion::make_map<k0_,k1_>(d0,d1);
+ m2_ m2 = boost::fusion::make_map<k2_>(d2);
+ vec_m01_m2_ vec_m01_m2(m01,m2);
+
+ {
+ ofs_ ofs(path.c_str());
+ oa_ oa(ofs);
+ oa << vec_m01_m2;
+ }
+ {
+ vec_m01_m2_ vec;
+
+ ifs_ ifs(path.c_str());
+ ia_ ia(ifs);
+ ia >> vec;
+ BOOST_ASSERT(
+ boost::fusion::at_key<k0_>( boost::fusion::at_c<0>(vec) ) == d0
+ );
+ BOOST_ASSERT(
+ boost::fusion::at_key<k1_>( boost::fusion::at_c<0>(vec) ) == d1
+ );
+ BOOST_ASSERT(
+ boost::fusion::at_key<k2_>( boost::fusion::at_c<1>(vec) ) == d2
+ );
+ }
     }
-
+*/
         os << "<-" << std::endl;
 
 }

Added: sandbox/statistics/detail/iterator/boost/iterator/transform_iterator_deduce_sig_fp.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/detail/iterator/boost/iterator/transform_iterator_deduce_sig_fp.hpp 2010-03-02 16:15:33 EST (Tue, 02 Mar 2010)
@@ -0,0 +1,56 @@
+//////////////////////////////////////////////////////////////////////////////
+// iterator::transform_iterator::deduce_sig_fp.hpp //
+// //
+// (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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_ITERATOR_TRANSFORM_ITERATOR_DEDUCE_SIG_FP_ER_2010_HPP
+#define BOOST_ITERATOR_TRANSFORM_ITERATOR_DEDUCE_SIG_FP_ER_2010_HPP
+#include <boost/range.hpp>
+#include <boost/iterator/transform_iterator.hpp>
+#include <boost/iterator/iterator_traits.hpp>
+
+namespace boost
+{
+
+ namespace detail
+ {
+ namespace transform_iterator{
+
+ template<typename Return,class Iterator>
+ struct deduce_sig_fp{
+ typedef typename boost::iterator_reference<
+ Iterator>::type arg_;
+ typedef Return(*sig)(arg_);
+ typedef boost::transform_iterator<
+ sig,Iterator,Return> type;
+
+ static type call(Iterator it,sig fp){
+ return boost::make_transform_iterator(it,fp);
+ }
+ };
+
+ }// transform_iterator
+ }// detail
+
+ // Warning : dont use it yet.
+ // Deduces the function pointer passed as second argument
+ template <class Return, class Iterator>
+ typename detail::transform_iterator::deduce_sig_fp<
+ Return,Iterator>::type
+ make_transform_iterator2(
+ Iterator it,
+ typename detail::transform_iterator::deduce_sig_fp<
+ Return,Iterator>::sig fp
+ )
+ {
+ return detail::transform_iterator::deduce_sig_fp<
+ Return,Iterator>::call(it,fp);
+ }
+
+
+}// boost
+
+#endif
\ No newline at end of file

Added: sandbox/statistics/detail/iterator/boost/iterator/transform_iterator_deduce_sig_uf.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/detail/iterator/boost/iterator/transform_iterator_deduce_sig_uf.hpp 2010-03-02 16:15:33 EST (Tue, 02 Mar 2010)
@@ -0,0 +1,90 @@
+//////////////////////////////////////////////////////////////////////////////
+// iterator::transform_iterator::deduce_sig_uf.hpp //
+// //
+// (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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_ITERATOR_TRANSFORM_ITERATOR_DEDUCE_SIG_UF_ER_2010_HPP
+#define BOOST_ITERATOR_TRANSFORM_ITERATOR_DEDUCE_SIG_UF_ER_2010_HPP
+#include <boost/iterator/iterator_traits.hpp>
+#include <boost/iterator/transform_iterator.hpp>
+#include <boost/utility/result_of.hpp>
+
+namespace boost
+{
+
+ namespace detail
+ {
+ namespace transform_iterator{
+
+ template <class Iterator>
+ struct deduce_sig_uf
+ {
+ typedef typename boost::iterator_reference<Iterator>::type arg_;
+
+ template<typename UnaryFunc>
+ struct apply{
+ typedef typename boost::result_of<
+ UnaryFunc(arg_)>::type result_;
+
+ struct wrapper{
+ wrapper(const UnaryFunc& f):g(f){}
+
+ typedef result_ result_type;
+
+ template<typename T>
+ result_type operator()(const T& x)const{
+ return g(x);
+ }
+ private:
+ mutable UnaryFunc g; // MUST be contained
+ };
+
+ typedef boost::transform_iterator<wrapper,Iterator> type;
+
+ static type call(Iterator it,const UnaryFunc& f){
+ return boost::make_transform_iterator(it,wrapper(f));
+ }
+ };
+ };
+
+ }// transform_iterator
+ }// detail
+
+ // Activated if UnaryFun::result<F(Arg)>::type defined. See:
+ // http://www.boost.org/doc/libs/1_42_0/libs/utility/utility.htm#result_of
+ template <class UnaryFunc, class Iterator>
+ typename detail::transform_iterator::deduce_sig_uf<Iterator>
+ ::template apply<UnaryFunc>::type
+ make_transform_iterator2(
+ Iterator it,
+ UnaryFunc fun,
+ typename UnaryFunc::template result<UnaryFunc(
+ typename detail::transform_iterator::deduce_sig_uf<Iterator>::arg_
+ )>::type* = 0
+ )
+ {
+ typedef typename
+ detail::transform_iterator::deduce_sig_uf<Iterator> meta_;
+ return meta_::template apply<UnaryFunc>::call(it,fun);
+ }
+
+
+ // Activated if UnaryFun::result_type defined. See:
+ // http://www.boost.org/doc/libs/1_42_0/libs/utility/utility.htm#result_of
+ template <class UnaryFunc, class Iterator>
+ boost::transform_iterator<UnaryFunc,Iterator>
+ make_transform_iterator2(
+ Iterator it,
+ UnaryFunc fun,
+ typename UnaryFunc::result_type* = 0
+ )
+ {
+ return boost::make_transform_iterator(it,fun);
+ }
+
+}// boost
+
+#endif
\ No newline at end of file

Added: sandbox/statistics/detail/iterator/libs/iterator/example/deduce_sig.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/detail/iterator/libs/iterator/example/deduce_sig.cpp 2010-03-02 16:15:33 EST (Tue, 02 Mar 2010)
@@ -0,0 +1,104 @@
+//////////////////////////////////////////////////////////////////////////////
+// iterator::transform_iterator::deduce_sig.h //
+// //
+// (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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef LIBS_ITERATOR_TRANSFORM_ITERATOR_DEDUCE_SIG_FP_ER_2010_HPP
+#define LIBS_ITERATOR_TRANSFORM_ITERATOR_DEDUCE_SIG_FP_ER_2010_HPP
+#include <ostream>
+#include <vector>
+#include <boost/range.hpp>
+#include <boost/iterator/transform_iterator_deduce_sig_fp.hpp>
+#include <boost/iterator/transform_iterator_deduce_sig_uf.hpp>
+
+
+struct f{
+ struct result_impl{ typedef bool type; };
+
+ template<typename S>
+ struct result{};
+
+ template<typename F,typename T>
+ struct result<F(const T&)>:result_impl{};
+
+ template<typename F,typename T>
+ struct result<F(T&)>:result_impl{};
+
+ template<typename T>
+ bool operator()(const T& x)const{ return (x==0); }
+
+};
+
+struct g{
+ typedef bool result_type;
+
+ template<typename T>
+ bool operator()(const T& x)const{ return (x==0); }
+
+};
+
+template<typename T>
+bool is_zero(const T& x){ return (x==0); }
+
+void example_deduce_sig(std::ostream& os){
+ using namespace boost;
+
+ typedef int val_;
+ typedef std::vector<val_> vec_;
+ vec_ vec(10,0);
+ vec[3] = 1;
+ vec[6] = 2;
+ vec[9] = 3;
+
+// Cannot compile
+/*
+ std::copy(
+ make_transform_iterator(
+ boost::begin(vec),
+ g()
+ ),
+ make_transform_iterator(
+ boost::end(vec),
+ g()
+ ),
+ std::ostream_iterator<val_>(os," ")
+ );
+*/
+ std::copy(
+ make_transform_iterator2(
+ boost::begin(vec),
+ f()
+ ),
+ make_transform_iterator2(
+ boost::end(vec),
+ f()
+ ),
+ std::ostream_iterator<val_>(os," ")
+ );
+ os << std::endl;
+ std::copy(
+ make_transform_iterator2(
+ boost::begin(vec),
+ g()
+ ),
+ make_transform_iterator2(
+ boost::end(vec),
+ g()
+ ),
+ std::ostream_iterator<val_>(os," ")
+ );
+ os << std::endl;
+
+ typedef boost::range_iterator<const vec_>::type c_it_;
+
+ make_transform_iterator2<bool>(
+ boost::const_begin(vec), // will not compile with begin(vec);
+ is_zero
+ );
+
+}
+
+#endif
\ No newline at end of file

Added: sandbox/statistics/detail/iterator/libs/iterator/example/deduce_sig.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/detail/iterator/libs/iterator/example/deduce_sig.h 2010-03-02 16:15:33 EST (Tue, 02 Mar 2010)
@@ -0,0 +1,15 @@
+//////////////////////////////////////////////////////////////////////////////
+// iterator::transform_iterator::deduce_sig.h //
+// //
+// (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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef LIBS_ITERATOR_TRANSFORM_ITERATOR_DEDUCE_SIG_FP_ER_2010_HPP
+#define LIBS_ITERATOR_TRANSFORM_ITERATOR_DEDUCE_SIG_FP_ER_2010_HPP
+#include <ostream>
+
+void example_deduce_sig(std::ostream&);
+
+#endif
\ No newline at end of file

Copied: sandbox/statistics/detail/serialization/boost/serialization/detail/inherit/detail/inherit2.hpp (from r59938, /sandbox/statistics/detail/serialization/boost/serialization/detail/inherit/inherit2.hpp)
==============================================================================
--- /sandbox/statistics/detail/serialization/boost/serialization/detail/inherit/inherit2.hpp (original)
+++ sandbox/statistics/detail/serialization/boost/serialization/detail/inherit/detail/inherit2.hpp 2010-03-02 16:15:33 EST (Tue, 02 Mar 2010)
@@ -22,7 +22,7 @@
 
         // inherit2<T1,T2> innherits from the elements of {T1,T2} that are not of
     // type mpl::empty_base, and for those, forwards an argument pack at
- // construction, serialization.
+ // construction, and serialization.
     //
     // operator<<(ostream,) requires special formatting that is implemented in
     // detail/stream.hpp

Modified: sandbox/statistics/detail/serialization/boost/serialization/detail/inherit/include.hpp
==============================================================================
--- sandbox/statistics/detail/serialization/boost/serialization/detail/inherit/include.hpp (original)
+++ sandbox/statistics/detail/serialization/boost/serialization/detail/inherit/include.hpp 2010-03-02 16:15:33 EST (Tue, 02 Mar 2010)
@@ -10,6 +10,7 @@
 #ifndef BOOST_SERIALIZATION_DETAIL_INHERIT_INCLUDE_HPP_ER_2010
 #define BOOST_SERIALIZATION_DETAIL_INHERIT_INCLUDE_HPP_ER_2010
 
-#include <boost/serialization/detail/inherit_linearly.hpp>
+#include <boost/serialization/detail/inherit/inherit_linearly.hpp>
+#include <boost/serialization/detail/inherit/meta_inherit_linearly.hpp>
 
 #endif
\ No newline at end of file

Deleted: sandbox/statistics/detail/serialization/boost/serialization/detail/inherit/inherit.hpp
==============================================================================
--- sandbox/statistics/detail/serialization/boost/serialization/detail/inherit/inherit.hpp 2010-03-02 16:15:33 EST (Tue, 02 Mar 2010)
+++ (empty file)
@@ -1,83 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// serialization::detail::inherit::inherit.hpp //
-// //
-// //
-// (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) //
-//////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_SERIALIZATION_DETAIL_INHERIT_INHERIT_HPP_ER_2010
-#define BOOST_SERIALIZATION_DETAIL_INHERIT_INHERIT_HPP_ER_2010
-#include <boost/mpl/empty_base.hpp>
-#include <boost/serialization/base_object.hpp>
-#include <boost/serialization/detail/inherit/detail/inherit2.hpp>
-
-namespace boost{
-namespace serialization{
-namespace detail{
-
- // Warning : this class is probably deprecated and superseded by
- // inherit_linearly. It is retained temporarily for testing purposes.
- template<
- typename T1 = boost::mpl::empty_base,
- typename T2 = boost::mpl::empty_base,
- typename T3 = boost::mpl::empty_base,
- typename T4 = boost::mpl::empty_base,
- typename T5 = boost::mpl::empty_base
- >
- struct inherit :
- inherit2<
- T1,
- inherit2<
- T2,
- inherit2<
- T3,
- inherit2<T4,T5>
- >
- >
- >
- {
- typedef inherit2<
- T1,
- inherit2<
- T2,
- inherit2<
- T3,
- inherit2<T4,T5>
- >
- >
- > super_;
-
- typedef inherit<super_> type;
-
- inherit(){}
-
- template<typename Args>
- inherit(const Args& args):super_(args){}
-
- friend class boost::serialization::access;
- template<class Archive>
- void serialize(Archive & ar, const unsigned int version)
- {
- // serialize base class information
- ar & boost::serialization::base_object<super_>(*this);
- }
-
- };
-
- // If a, b, c are instances of the subset of non-empty bases in {T1,...,T5},
- // writes "(a,b,c)" to os
- template<typename A,typename B,
- typename T1,typename T2,typename T3,typename T4,typename T5>
- std::basic_ostream<A,B>&
- operator<<(std::basic_ostream<A,B>& os,const inherit<T1,T2,T3,T4,T5>& that){
- typedef typename inherit<T1,T2,T3,T4,T5>::super_ super_;
- return os << '(' << static_cast<const super_&>(that) << ')';
- }
-
-}// detail
-}// serialization
-}// boost
-
-#endif

Deleted: sandbox/statistics/detail/serialization/boost/serialization/detail/inherit/inherit2.hpp
==============================================================================
--- sandbox/statistics/detail/serialization/boost/serialization/detail/inherit/inherit2.hpp 2010-03-02 16:15:33 EST (Tue, 02 Mar 2010)
+++ (empty file)
@@ -1,128 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// serialization::detail::inherit::detail::inherit2.hpp //
-// //
-// //
-// (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) //
-//////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_SERIALIZATION_DETAIL_INHERIT_DETAIL_INHERIT2_HPP_ER_2010
-#define BOOST_SERIALIZATION_DETAIL_INHERIT_DETAIL_INHERIT2_HPP_ER_2010
-#include <boost/mpl/empty_base.hpp>
-#include <boost/concept/assert.hpp>
-#include <boost/accumulators/framework/accumulator_base.hpp>
-#include <boost/serialization/base_object.hpp>
-#include <boost/serialization/detail/inherit/detail/stream.hpp>
-#include <boost/serialization/detail/concept/serializable.hpp>
-
-namespace boost{
-namespace serialization{
-namespace detail{
-
- // inherit2<T1,T2> innherits from the elements of {T1,T2} that are not of
- // type mpl::empty_base, and for those, forwards an argument pack at
- // construction, serialization.
- //
- // operator<<(ostream,) requires special formatting that is implemented in
- // detail/stream.hpp
-
- template<typename T1,typename T2>
- struct inherit2 : T1, T2
- {
- typedef inherit2 type;
-
- inherit2(){}
-
- template<typename Args>
- inherit2(const Args& args):T1(args),T2(args){}
-
- private:
-
- friend class boost::serialization::access;
- template<class Archive>
- void serialize(Archive & ar, const unsigned int version)
- {
- BOOST_CONCEPT_ASSERT((concept::Serializable<T1>));
- BOOST_CONCEPT_ASSERT((concept::Serializable<T2>));
- ar & boost::serialization::base_object<T1>(*this);
- ar & boost::serialization::base_object<T2>(*this);
- }
- };
-
-
- template<typename T1>
- struct inherit2<T1,boost::mpl::empty_base> : T1
- {
- typedef inherit2 type;
-
- inherit2(){}
-
- template<typename Args>
- inherit2(const Args& args):T1(args){}
-
- private:
- typedef boost::mpl::empty_base empty_;
-
- friend class boost::serialization::access;
- template<class Archive>
- void serialize(Archive & ar, const unsigned int version)
- {
- BOOST_CONCEPT_ASSERT((concept::Serializable<T1>));
- ar & boost::serialization::base_object<T1>(*this);
- }
-
- };
-
- template<typename T2>
- struct inherit2<boost::mpl::empty_base,T2> : T2
- {
- typedef inherit2 type;
-
- inherit2(){}
-
- template<typename Args>
- inherit2(const Args& args):T2(args){}
-
- private:
-
- typedef boost::mpl::empty_base empty_;
-
- friend class boost::serialization::access;
- template<class Archive>
- void serialize(Archive & ar, const unsigned int version)
- {
- BOOST_CONCEPT_ASSERT((concept::Serializable<T2>));
- ar & boost::serialization::base_object<T2>(*this);
- }
- };
-
- template<>
- struct inherit2<boost::mpl::empty_base,boost::mpl::empty_base>
- {
- private:
- typedef boost::accumulators::dont_care dont_care_;
- public:
-
- typedef inherit2 type;
-
- inherit2(){}
-
- inherit2(dont_care_){}
-
- private:
- typedef boost::mpl::empty_base empty_;
-
- friend class boost::serialization::access;
- template<class Archive>
- void serialize(Archive & ar, const unsigned int version)
- {
- }
-
- };
-
-}// detail
-}// serialization
-}// boost
-
-#endif

Modified: sandbox/statistics/detail/serialization/boost/serialization/detail/inherit/inherit_linearly.hpp
==============================================================================
--- sandbox/statistics/detail/serialization/boost/serialization/detail/inherit/inherit_linearly.hpp (original)
+++ sandbox/statistics/detail/serialization/boost/serialization/detail/inherit/inherit_linearly.hpp 2010-03-02 16:15:33 EST (Tue, 02 Mar 2010)
@@ -12,6 +12,9 @@
 #include <boost/mpl/empty_base.hpp>
 #include <boost/mpl/reverse_fold.hpp>
 #include <boost/mpl/placeholders.hpp>
+#include <boost/mpl/aux_/na_fwd.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
 #include <boost/serialization/base_object.hpp>
 
 #include <boost/concept/assert.hpp>
@@ -21,19 +24,18 @@
 namespace serialization{
 namespace detail{
 
- // Merges serializable classes together into one that is also serializable.
- // In addition to a default constructor, one that takes an argument pack
- // forwards the latter to each of its components.
+ // This serializable class is the result of merging an mpl sequence, S, of
+ // serializable class types. It has
+ // - A contructor that takes an argument pack, and
+ // - Writes a comma separated list of its components to an output stream,
+ // provided each of its components has the corresponding interface.
     //
- // Requirements :
- // S is a sequence of non-empy-base serializable class types, optionally
- // with an argument pack constructor, and operator<< as needed.
- //
- // Usage : let arg denote an argument pack and T one element of S
- // inherit_linearly<S> obj(args);
- // static_cast<const S&>(obj);
- // oa << obj;
- // ia >> obj;
+ // Let arg denote an argument pack and T one element of S
+ // Construction : inherit_linearly<S> obj(args);
+ // Access: static_cast<const T&>(obj);
+ // Saving: oa << obj;
+ // Loading: ia >> obj;
+ // Description: os << obj
     //
     // See Boost.Parameter regarding argument pack.
     // See sandbox/statistics/data for a small application
@@ -44,10 +46,13 @@
     struct inherit_linearly : boost::mpl::reverse_fold<
             S,R,inherit2<boost::mpl::_2,boost::mpl::_1>
>::type{
- typedef typename boost::mpl::reverse_fold<
+
+ typedef S components;
+
+ typedef typename boost::mpl::reverse_fold<
                 S,R,inherit2<boost::mpl::_2,boost::mpl::_1>
>::type super_;
-
+
         inherit_linearly(){}
             
         template<typename Args>

Modified: sandbox/statistics/detail/serialization/libs/serialization/detail/example/inherit_linearly.cpp
==============================================================================
--- sandbox/statistics/detail/serialization/libs/serialization/detail/example/inherit_linearly.cpp (original)
+++ sandbox/statistics/detail/serialization/libs/serialization/detail/example/inherit_linearly.cpp 2010-03-02 16:15:33 EST (Tue, 02 Mar 2010)
@@ -9,7 +9,7 @@
 //////////////////////////////////////////////////////////////////////////////
 #include <fstream>
 #include <string>
-#include <boost/serialization/detail/inherit/inherit_linearly.hpp>
+#include <boost/serialization/detail/inherit/include.hpp>
 #include <boost/serialization/detail/inherit/detail/test_wrapper.hpp>
 #include <boost/serialization/string.hpp>
 #include <boost/mpl/vector.hpp>
@@ -65,8 +65,8 @@
         typedef ser::test_wrapper<data2_> wrap2_;
         typedef ser::test_wrapper<data3_> wrap3_;
         typedef ser::test_wrapper<data4_> wrap4_;
- typedef boost::mpl::vector<wrap1_,wrap2_,wrap3_,wrap4_> types_;
- typedef ser::inherit_linearly<types_> inlin_;
+ typedef ser::meta_inherit_linearly<
+ wrap1_, wrap2_, wrap3_, wrap4_>::type inlin_;
 
         data1_ v1 = -1;
     data2_ v2 = true;


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