|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r69966 - in sandbox/assign_v2: boost/assign/v2/put boost/assign/v2/put/adapter boost/assign/v2/put/deque boost/assign/v2/put/fun boost/assign/v2/put/modifier boost/assign/v2/put/pipe libs/assign/v2/src libs/assign/v2/test libs/assign/v2/test/put libs/assign/v2/test/put/modifier libs/assign/v2/test/put/pipe libs/assign/v2/test/put/pipe/modifier
From: erwann.rogard_at_[hidden]
Date: 2011-03-13 22:34:49
Author: e_r
Date: 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
New Revision: 69966
URL: http://svn.boost.org/trac/boost/changeset/69966
Log:
upd assign_v2
Text files modified:
sandbox/assign_v2/boost/assign/v2/put/adapter/crtp.hpp | 59 +-------------
sandbox/assign_v2/boost/assign/v2/put/adapter/fwd.hpp | 3
sandbox/assign_v2/boost/assign/v2/put/deque.hpp | 1
sandbox/assign_v2/boost/assign/v2/put/deque/adapter.hpp | 149 -------------------------------------
sandbox/assign_v2/boost/assign/v2/put/deque/csv_deque.hpp | 35 ++++++--
sandbox/assign_v2/boost/assign/v2/put/deque/deque.hpp | 160 ++++++++++++++++++++++++++++++++++++---
sandbox/assign_v2/boost/assign/v2/put/fun/deduce.hpp | 29 ++++--
sandbox/assign_v2/boost/assign/v2/put/fun/modulo.hpp | 8 +-
sandbox/assign_v2/boost/assign/v2/put/modifier/iterate.hpp | 13 +-
sandbox/assign_v2/boost/assign/v2/put/modifier/lookup.hpp | 3
sandbox/assign_v2/boost/assign/v2/put/modifier/modulo.hpp | 22 ++--
sandbox/assign_v2/boost/assign/v2/put/modifier/repeat.hpp | 4
sandbox/assign_v2/boost/assign/v2/put/pipe/csv_put.hpp | 11 +-
sandbox/assign_v2/boost/assign/v2/put/pipe/put.hpp | 13 ++
sandbox/assign_v2/boost/assign/v2/put/pipe/range.hpp | 72 -----------------
sandbox/assign_v2/boost/assign/v2/put/put.hpp | 52 +++++++------
sandbox/assign_v2/libs/assign/v2/src/main.cpp | 10 -
sandbox/assign_v2/libs/assign/v2/test/put.cpp | 6
sandbox/assign_v2/libs/assign/v2/test/put/deque.cpp | 52 +++++-------
sandbox/assign_v2/libs/assign/v2/test/put/fun.cpp | 21 ++--
sandbox/assign_v2/libs/assign/v2/test/put/modifier/deduce.cpp | 2
sandbox/assign_v2/libs/assign/v2/test/put/modifier/iterate.cpp | 39 ++++-----
sandbox/assign_v2/libs/assign/v2/test/put/modifier/lookup.cpp | 36 ++++----
sandbox/assign_v2/libs/assign/v2/test/put/modifier/repeat.cpp | 17 ++--
sandbox/assign_v2/libs/assign/v2/test/put/modifier/standard.cpp | 21 ++--
sandbox/assign_v2/libs/assign/v2/test/put/pipe/args_list.cpp | 3
sandbox/assign_v2/libs/assign/v2/test/put/pipe/fun.cpp | 1
sandbox/assign_v2/libs/assign/v2/test/put/pipe/modifier/iterate.cpp | 1
sandbox/assign_v2/libs/assign/v2/test/put/pipe/modifier/lookup.cpp | 5
sandbox/assign_v2/libs/assign/v2/test/put/pipe/modifier/repeat.cpp | 1
sandbox/assign_v2/libs/assign/v2/test/put/pipe/modifier/standard.cpp | 19 ++--
sandbox/assign_v2/libs/assign/v2/test/put/pipe/put.cpp | 12 +-
sandbox/assign_v2/libs/assign/v2/test/put/ptr.cpp | 23 +++--
sandbox/assign_v2/libs/assign/v2/test/put/put.cpp | 77 ++++++++++---------
34 files changed, 446 insertions(+), 534 deletions(-)
Modified: sandbox/assign_v2/boost/assign/v2/put/adapter/crtp.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/adapter/crtp.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/adapter/crtp.hpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -137,13 +137,13 @@
};
template<typename /*<<Container>>*/C, typename /*<<Functor>>*/F, typename /*<<Modifier tag>>*/Tag, typename /*<<Derived type>>*/D>
- class crtp
+ class adapter_crtp
//<-
: public fun_holder<F>
, public modifier_holder<Tag>
#if !BOOST_ASSIGN_V2_ENABLE_CPP0X
, public functor_aux::crtp_unary_and_up<
- crtp<C, F, Tag, D>,
+ adapter_crtp<C, F, Tag, D>,
::boost::mpl::always< D const& >
>
#endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
@@ -162,14 +162,12 @@
public:
- typedef
- /*<-*/BOOST_ASSIGN_V2_IGNORE(/*->*/ adapter_modifier<Tag> /*<-*/)
- typename modifier_holder_::modifier_type /*->*/
+ typedef /*<-*/ typename modifier_holder_::modifier_type BOOST_ASSIGN_V2_IGNORE(/*->*/ adapter_modifier<Tag> /*<-*/)/*->*/
modifier_type;
- crtp(){}
- explicit crtp( F const& f )/*<-*/ : fun_holder_( f ){}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
- explicit crtp( F const& f, modifier_type const& m )/*<-*/
+ adapter_crtp(){}
+ explicit adapter_crtp( F const& f )/*<-*/ : fun_holder_( f ){}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+ explicit adapter_crtp( F const& f, modifier_type const& m )/*<-*/
: fun_holder_( f ), modifier_holder_( m ){}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
typedef D const& result_type;
@@ -197,7 +195,7 @@
#else
protected:
typedef functor_aux::crtp_unary_and_up<
- crtp,
+ adapter_crtp,
::boost::mpl::always<result_type>
> super_t;
@@ -300,46 +298,3 @@
}// boost
#endif // BOOST_ASSIGN_V2_PUT_ADAPTER_CRTP_ER_2010_HPP
-
-//[semantics_put_adapter_crtp
-/*`
-[*Notation]
-
-[variablelist
- [
- [`cont`]
- [ Instance of `C`, supplied by the derived class ]
- ]
- [
- [`f`]
- [ Internal copy of instance of type `F`]
- ]
- [
- [`__put_modifier__`]
- [ Internal copy of instance of type `put_aux::adapter_modifier<Tag>`]
- ]
- [
- [`__put_adapter__`]
- [ Instance of `D` ]
- ]
-]
-
-[*Expressions]
-
-[table
- [[Expression][Side effect][Result]]
- [
- [ `__put_adapter__( args... ) ` ]
- [ `__put_modifier__.impl( cont, f( args... ) )` ]
- [ A reference to `__put_adapter__` ]
- ]
- [
- [ `__put_adapter__( as_arg_list( range ) ) ` ]
- [ `__put_adapter__( arg )` for each `arg` in `range` ]
- [ A reference to `__put_adapter__`]
- ]
-]
-
-*/
-//]
-
Modified: sandbox/assign_v2/boost/assign/v2/put/adapter/fwd.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/adapter/fwd.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/adapter/fwd.hpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -15,7 +15,8 @@
namespace v2{
namespace put_aux{
- template<typename C, typename F, typename Tag, typename D> class crtp;
+ template<typename C, typename F, typename Tag, typename D>
+ class adapter_crtp;
}// put_aux
}// v2
Modified: sandbox/assign_v2/boost/assign/v2/put/deque.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/deque.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/deque.hpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -9,7 +9,6 @@
//////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_ASSIGN_V2_PUT_DEQUE_ER_2010_HPP
#define BOOST_ASSIGN_V2_PUT_DEQUE_ER_2010_HPP
-#include <boost/assign/v2/put/deque/adapter.hpp>
#include <boost/assign/v2/put/deque/conversion.hpp>
#include <boost/assign/v2/put/deque/csv_deque.hpp>
#include <boost/assign/v2/put/deque/deque.hpp>
Modified: sandbox/assign_v2/boost/assign/v2/put/deque/adapter.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/deque/adapter.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/deque/adapter.hpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -1,148 +1 @@
-//////////////////////////////////////////////////////////////////////////////
-// Boost.Assign v2 //
-// //
-// Copyright (C) 2003-2004 Thorsten Ottosen //
-// Copyright (C) 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_ASSIGN_V2_PUT_DEQUE_ADAPTER_ER_2010_HPP
-#define BOOST_ASSIGN_V2_PUT_DEQUE_ADAPTER_ER_2010_HPP
-#include <deque>
-#include <boost/assign/v2/put/adapter/crtp.hpp>
-#include <boost/assign/v2/put/adapter/modifier.hpp>
-#include <boost/assign/v2/put/adapter/replace_parameter.hpp>
-#include <boost/assign/v2/put/deque/fwd.hpp>
-#include <boost/range/begin.hpp>
-#include <boost/range/end.hpp>
-#include <boost/range/iterator.hpp>
-#include <boost/range/size.hpp>
-#include <boost/range/size_type.hpp>
-
-namespace boost{
-namespace assign{
-namespace v2{
-namespace put_aux{
-
- template<typename T>
- struct deque_impl{ typedef std::deque<T> type; };
-
- template<typename T, typename F, typename Tag>
- class deque_adapter :
- public crtp<
- typename deque_impl<T>::type, F, Tag,
- deque_adapter<T, F, Tag>
- >
- {
- typedef typename deque_impl<T>::type impl_;
- typedef impl_ const cimpl_;
- typedef crtp<impl_, F, Tag, deque_adapter> put_crtp_;
-
- typedef put_aux::adapter_modifier<Tag> modifier_;
-
- public:
-
- typedef T value_type;
- typedef typename boost::range_size<impl_>::type size_type;
- typedef typename boost::range_iterator<impl_>::type iterator;
- typedef typename boost::range_iterator<cimpl_>::type const_iterator;
-
- // Construct
- deque_adapter(){}
- explicit deque_adapter(const F& f) : put_crtp_( f ){}
- explicit deque_adapter(impl_ const& v, F const& f): put_crtp_( f ), impl( v )
- {
- // Required by crtp when Tag or F is modified.
- }
-
- explicit deque_adapter( impl_ const& v, F const& f, modifier_ const& m )
- : put_crtp_( f, m ), impl( v )
- {
- // Required by crtp when Tag or F is modified.
- }
-
- // Deque interface
- iterator begin(){
- return boost::begin( this->impl );
- }
- iterator end(){
- return boost::end( this->impl );
- }
- const_iterator begin()const{
- return boost::begin( this->impl );
- }
- const_iterator end()const{
- return boost::end( this->impl );
- }
-
- typedef typename impl_::reference reference;
- typedef typename impl_::const_reference const_reference;
- typedef typename impl_::difference_type difference_type;
-
- size_type size()const{
- return this->container().size();
- }
- size_type max_size()const{
- return this->container().max_size();
- }
- bool empty()const{
- return this->container().empty();
- }
- reference operator[](size_type n){
- return this->container()[n];
- }
- const_reference operator[](size_type n)const{
- return this->container()[n];
- }
- reference front(){
- return this->container().front();
- }
- const_reference front()const{
- return this->container().front();
- }
- reference back(){
- return this->container().back();
- }
- const_reference back()const{
- return this->container().back();
- }
- void pop_front(){
- this->container().pop_front();
- }
- void pop_back(){
- this->container().pop_back();
- }
- void swap(deque_adapter& that){
- this->container().swap( that.container() );
- }
-
- // Note : the modifiers such as push_back() are ommitted as they
- // accessible through the put interface.
-
- impl_& container()const{ return this->impl; }
- protected:
- mutable impl_ impl;
-
- };
-
- template<typename T, typename F, typename Tag>
- struct replace_fun< deque_adapter<T, F, Tag> >
- {
- template<typename F1>
- struct apply{ typedef deque_adapter<T, F1, Tag> type; };
- };
-
- template<typename T, typename F, typename Tag>
- struct replace_modifier_tag< deque_adapter<T, F, Tag> >
- {
- template<typename Tag1>
- struct apply{ typedef deque_adapter<T, F, Tag1> type; };
- };
-
-}// put_aux
-}// v2
-}// assign
-}// boost
-
-#endif // BOOST_ASSIGN_V2_PUT_DEQUE_ADAPTER_ER_2010_HPP
+// TODO remove file
\ No newline at end of file
Modified: sandbox/assign_v2/boost/assign/v2/put/deque/csv_deque.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/deque/csv_deque.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/deque/csv_deque.hpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -10,6 +10,7 @@
#ifndef BOOST_ASSIGN_V2_PUT_DEQUE_CSV_DEQUE_ER_2010_HPP
#define BOOST_ASSIGN_V2_PUT_DEQUE_CSV_DEQUE_ER_2010_HPP
#include <boost/assign/v2/detail/config/enable_cpp0x.hpp>
+#include <boost/assign/v2/detail/pp/ignore.hpp>
#include <boost/assign/v2/put/deque/deque.hpp>
#include <boost/type_traits/decay.hpp>
#include <boost/type_traits/remove_cv.hpp>
@@ -21,23 +22,37 @@
namespace assign{
namespace v2{
namespace put_aux{
-namespace result_of{
+
+ template<typename T>
+ struct csv_deque_value : boost::decay<
+ typename boost::remove_cv<T>::type
+ >{};
+namespace result_of{
+
template<typename T>
- struct csv_deque : result_of::deque<
- typename boost::decay<
- typename boost::remove_cv<T>::type
- >::type
+ struct csv_deque: result_of::deque<
+ typename csv_deque_value<T>::type
>{};
}// result_of
}// put_aux
+//[syntax_put_deque_csv_deque
+
+ template<typename T>
+ struct csv_deque_value/*<-*/
+ : put_aux::csv_deque_value<T>
+ {}/*->*/;
+
namespace result_of{
template<typename T>
- struct csv_deque : put_aux::result_of::deque<T>{};
+ struct csv_deque/*<-*/
+ : put_aux::result_of::deque<T>
+ {}/*->*/;
}// result_of
+//<-
#if BOOST_ASSIGN_V2_ENABLE_CPP0X
namespace put_aux{
@@ -50,15 +65,17 @@
r( t );
csv_deque_impl<T>(r, std::forward<Args>( args )... );
}
-
+//->
template<typename T, typename... Args>
typename result_of::csv_deque<T>::type
- csv_deque(const T& t, Args const& ... args)
+ csv_deque(const T& t, Args const& ... args)/*<-*/
{
result_of::csv_deque<T>::type result;
csv_deque_impl<T>(result, t, args...);
return result;
- }
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+//]
}// put_aux
using put_aux::deque;
Modified: sandbox/assign_v2/boost/assign/v2/put/deque/deque.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/deque/deque.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/deque/deque.hpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -9,12 +9,21 @@
//////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_ASSIGN_V2_PUT_DEQUE_DEQUE_ER_2010_HPP
#define BOOST_ASSIGN_V2_PUT_DEQUE_DEQUE_ER_2010_HPP
+#include <deque>
+#include <boost/assign/v2/put/adapter/crtp.hpp>
+#include <boost/assign/v2/put/adapter/modifier.hpp>
+#include <boost/assign/v2/put/adapter/replace_parameter.hpp>
+#include <boost/assign/v2/put/deque/fwd.hpp>
#include <boost/assign/v2/detail/config/enable_cpp0x.hpp>
#include <boost/assign/v2/detail/keyword/nil.hpp>
+#include <boost/assign/v2/detail/pp/ignore.hpp>
#include <boost/assign/v2/put/fun/deduce.hpp>
#include <boost/assign/v2/put/modifier/deduce.hpp>
-//#include <boost/assign/v2/put/deque/fwd.hpp>
-#include <boost/assign/v2/put/deque/adapter.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/iterator.hpp>
+#include <boost/range/size.hpp>
+#include <boost/range/size_type.hpp>
#include <boost/type_traits/remove_cv.hpp>
#if BOOST_ASSIGN_V2_ENABLE_CPP0X
#include <utility>
@@ -23,49 +32,172 @@
namespace boost{
namespace assign{
namespace v2{
+//[syntax_put_deque_deque
namespace put_aux{
+
+ template<typename T>
+ struct /*<<Meta-function>>*/deque_impl{ typedef /*<-*/std::deque<T> BOOST_ASSIGN_V2_IGNORE(/*->*/unspecified /*<-*/)/*->*/type; };
+
+ template<typename T, typename F, typename Tag>
+ class deque_adapter
+//<-
+ : public adapter_crtp<
+ typename deque_impl<T>::type, F, Tag,
+ deque_adapter<T, F, Tag>
+ >
+//->
+ {
+//<-
+ typedef typename deque_impl<T>::type impl_;
+ typedef impl_ const cimpl_;
+ typedef adapter_crtp<impl_, F, Tag, deque_adapter> put_crtp_;
+
+ typedef put_aux::adapter_modifier<Tag> modifier_;
+//->
+ public:
+
+ typedef T value_type;
+ typedef /*<-*/typename boost::range_size<impl_>::type BOOST_ASSIGN_V2_IGNORE(/*->*/unspecified /*<-*/)/*->*/size_type;
+ typedef /*<-*/typename boost::range_iterator<impl_>::type BOOST_ASSIGN_V2_IGNORE(/*->*/unspecified /*<-*/)/*->*/iterator;
+ typedef /*<-*/typename boost::range_iterator<cimpl_>::type BOOST_ASSIGN_V2_IGNORE(/*->*/unspecified /*<-*/)/*->*/const_iterator;
+
+ // Construct
+ deque_adapter()/*<-*/
+ {}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+ explicit deque_adapter( impl_ const& cont, F const& f, modifier_ const& m )/*<-*/
+ : put_crtp_( f, m ), impl( cont )
+ {}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+ // Deque interface
+ iterator begin()/*<-*/{
+ return boost::begin( this->impl );
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+ iterator end()/*<-*/{
+ return boost::end( this->impl );
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+ const_iterator begin()const/*<-*/{
+ return boost::begin( this->impl );
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+ const_iterator end()const/*<-*/{
+ return boost::end( this->impl );
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+ typedef /*<-*/typename impl_::reference BOOST_ASSIGN_V2_IGNORE(/*->*/ unspecified /*<-*/)reference;
+ typedef /*<-*/typename impl_::const_reference BOOST_ASSIGN_V2_IGNORE(/*->*/ unspecified /*<-*/)const_reference;
+ typedef /*<-*/typename impl_::difference_type BOOST_ASSIGN_V2_IGNORE(/*->*/ unspecified /*<-*/)difference_type;
+
+ size_type size()const/*<-*/{
+ return this->container().size();
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+ size_type max_size()const/*<-*/{
+ return this->container().max_size();
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+ bool empty()const/*<-*/{
+ return this->container().empty();
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)
+ reference operator[](size_type n)/*<-*/{
+ return this->container()[n];
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+ const_reference operator[](size_type n)const/*<-*/{
+ return this->container()[n];
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+ reference front()/*<-*/{
+ return this->container().front();
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+ const_reference front()const/*<-*/{
+ return this->container().front();
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+ reference back()/*<-*/{
+ return this->container().back();
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+ const_reference back()const/*<-*/{
+ return this->container().back();
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+ void pop_front()/*<-*/{
+ this->container().pop_front();
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+ void pop_back()/*<-*/{
+ this->container().pop_back();
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+ void swap(deque_adapter& that)/*<-*/{
+ this->container().swap( that.container() );
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+ impl_& container()const/*<-*/{
+ return this->impl;
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+//<-
+ protected:
+ mutable impl_ impl;
+//->
+ };
+
+ template<typename T, typename F, typename Tag>
+ struct /*<<Meta-function class>>*/replace_fun< deque_adapter<T, F, Tag> >/*<-*/
+ {
+ template<typename F1>
+ struct apply{ typedef deque_adapter<T, F1, Tag> type; };
+ }/*->*/;
+
+ template<typename T, typename F, typename Tag>
+ struct /*<<Meta-function class>>*/replace_modifier_tag< deque_adapter<T, F, Tag> >/*<-*/
+ {
+ template<typename Tag1>
+ struct apply{ typedef deque_adapter<T, F, Tag1> type; };
+ }/*->*/;
+
+//<-
namespace result_of{
template<typename T>
struct deque
{
typedef typename boost::remove_cv<T>::type t_;
- typedef typename put_aux::deque_impl<t_>::type impl_;
- typedef typename put_aux::deduce_fun<impl_>::type f_;
- typedef typename put_aux::deduce_modifier_tag<impl_>::type modifier_tag_;
- typedef put_aux::deque_adapter<t_,f_,modifier_tag_> type;
+ typedef typename deque_impl<t_>::type impl_;
+ typedef typename deduce_fun<impl_>::type f_;
+ typedef typename deduce_modifier_tag<impl_>::type modifier_tag_;
+ typedef deque_adapter<t_,f_,modifier_tag_> type;
};
}// result_of
+//<-
+}// put_aux
+//->
+namespace put_aux{
+//<-
template<typename T>
typename result_of::deque<T>::type
- deque( keyword_aux::nil )
+ deque( keyword_aux::nil )/*<-*/
{
return typename result_of::deque<T>::type();
- }
-
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+//<-
}// put_aux
+//->
namespace result_of{
template<typename T>
- struct deque
+ struct /*<<Meta-function>>*/deque/*<-*/
: put_aux::result_of::deque<T>
- {};
+ {}/*->*/;
}// result_of
+//<-
#if BOOST_ASSIGN_V2_ENABLE_CPP0X
namespace put_aux{
+//->
template<typename T, typename...Args>
typename result_of::deque<T>::type
- deque(Args&&...args)
+ deque(Args&&...args)/*<-*/
{
return deque<T>( v2::_nil )( std::forward<Args>(args)... );
- }
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+//]
}// put_aux
-
using put_aux::deque;
#endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
Modified: sandbox/assign_v2/boost/assign/v2/put/fun/deduce.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/fun/deduce.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/fun/deduce.hpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -18,31 +18,40 @@
namespace boost{
namespace assign{
namespace v2{
+//[syntax_put_fun_deduce
namespace put_aux{
- template<typename C>
- struct deduce_fun_pointer
+ template<typename /*<<Pointer-container>>*/C>
+ struct /*<<Meta-function mapping the `C`'s pointer-type to a factory thereof>>*/ deduce_fun_pointer
{
+//<-
typedef typename v2::container_traits::value<C>::type value_type;
typedef functor_aux::new_<value_type> type;
+//->
};
- template<typename C>
- struct deduce_fun_value
+ template<typename /*<<Value-container>>*/C>
+ struct /*<<Meta-function mapping `C`'s value-type to a factory thereof>>*/ deduce_fun_value
{
+//<-
typedef typename v2::container_traits::value<C>::type value_type;
typedef functor_aux::constructor<value_type> type;
+//->
};
- template<typename C>
- struct deduce_fun : boost::mpl::eval_if<
- container_traits::is_ptr_container<C>,
- deduce_fun_pointer<C>,
- deduce_fun_value<C>
- >
+ template<typename /*<<Either of a value or pointer-container>>*/C>
+ struct /*<<Meta-function mapping `C`s element-type to a factory thereof>>*/deduce_fun
+//<-
+ : boost::mpl::eval_if<
+ container_traits::is_ptr_container<C>,
+ deduce_fun_pointer<C>,
+ deduce_fun_value<C>
+ >
+//->
{};
}// put_aux
+//]
}// v2
}// assign
}// boost
Modified: sandbox/assign_v2/boost/assign/v2/put/fun/modulo.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/fun/modulo.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/fun/modulo.hpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -48,7 +48,7 @@
template<typename C, typename F, typename Tag, typename D, typename F1>
typename ::boost::mpl::apply1<result_of::modulo_fun<D>, F1>::type
operator%(
- crtp<C, F, Tag, D> const& lhs,
+ adapter_crtp<C, F, Tag, D> const& lhs,
modulo_fun<F1> const& rhs
)
{
@@ -70,7 +70,7 @@
namespace{
const put_aux::keyword_fun _fun = put_aux::keyword_fun();
}
-//[syntax_put_fun
+//[syntax_put_fun_modulo
namespace result_of{
template<typename D>
@@ -96,8 +96,8 @@
namespace v2{\
namespace put_aux{\
\
- template<typename T>\
- modulo_fun< FUN > BOOST_PP_CAT(_,NAME)(){ return v2::_fun = FUN(); }\
+ template<typename T>\
+ modulo_fun< FUN > BOOST_PP_CAT(_,NAME)(){ return v2::_fun = FUN(); }\
\
}\
using put_aux::BOOST_PP_CAT(_,NAME);\
Modified: sandbox/assign_v2/boost/assign/v2/put/modifier/iterate.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/modifier/iterate.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/modifier/iterate.hpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -12,6 +12,7 @@
#include <cstddef>
#include <boost/assign/v2/detail/keyword/ignore.hpp>
#include <boost/assign/v2/detail/config/enable_cpp0x.hpp>
+#include <boost/assign/v2/detail/pp/ignore.hpp>
#include <boost/assign/v2/put/adapter/modifier.hpp>
#include <boost/call_traits.hpp>
#include <boost/shared_ptr.hpp>
@@ -26,7 +27,6 @@
namespace v2{
namespace modifier_tag{
- // TODO think of lambda expression
struct iterate_arg
{
@@ -38,11 +38,11 @@
result_type operator()()const{ return this->i++; }
typedef iterate_arg type;
-
+
private:
mutable result_type i;
- };
+ };
template<typename Arg = iterate_arg::type > struct iterate{};
@@ -57,7 +57,7 @@
typedef Arg arg_;
// storing a copy of lambda::something has caused pbs, hence ptr
typedef boost::shared_ptr<arg_> ptr_;
-
+
public:
adapter_modifier(): ptr( new arg_() ){}
@@ -68,6 +68,7 @@
{}
#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+
template<typename C, typename T>
typename boost::disable_if<
boost::is_reference<T>,
@@ -76,7 +77,7 @@
impl(C& cont, T&& t )const
{
cont.at( (*this->ptr)() ) = std::move( t );
- }
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
#endif
@@ -92,7 +93,7 @@
{
cont.replace( this->arg_() , t);
}
-
+
protected:
ptr_ ptr;
Modified: sandbox/assign_v2/boost/assign/v2/put/modifier/lookup.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/modifier/lookup.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/modifier/lookup.hpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -10,6 +10,7 @@
#ifndef BOOST_ASSIGN_V2_PUT_MODIFIER_LOOKUP_ER_2010_HPP
#define BOOST_ASSIGN_V2_PUT_MODIFIER_LOOKUP_ER_2010_HPP
#include <boost/assign/v2/detail/keyword/ignore.hpp>
+#include <boost/assign/v2/detail/pp/ignore.hpp>
#include <boost/assign/v2/put/adapter/modifier.hpp>
#include <boost/call_traits.hpp>
#include <boost/shared_ptr.hpp>
@@ -44,7 +45,7 @@
#if BOOST_ASSIGN_V2_ENABLE_CPP0X
template<typename C, typename T>
- void impl(C& cont, T&& t )const
+ void impl(C& cont, T&& key )const
{
cont[ key ] = (*this->ptr)( cont[ std::forward<T>( key ) ] );
}
Modified: sandbox/assign_v2/boost/assign/v2/put/modifier/modulo.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/modifier/modulo.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/modifier/modulo.hpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -29,12 +29,12 @@
modulo_modifier(){}
modulo_modifier(Arg arg)/*<-*/
- :arg_( arg )
+ :arg_( arg )
{}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
Arg const& arg()const/*<-*/
{
- return this->arg_;
+ return this->arg_;
}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
template<typename Arg1>
@@ -52,7 +52,7 @@
template<typename Keyword, typename Arg>
struct /*<<Meta-function class to be specialized on Keyword>>*/ meta_modifier_tag
{
- template<typename /*<<Inherits `crtp<>` >>*/ D>
+ template<typename /*<<Inherits `adapter_crtp<>` >>*/ D>
struct /*<<Returns a modifier-tag>>*/ apply;
};
@@ -68,13 +68,13 @@
template<typename Keyword, typename Arg>
struct apply
//<-
- : ::boost::mpl::apply1<
- meta_,
- typename ::boost::mpl::apply1<
- put_aux::meta_modifier_tag<Keyword, Arg>,
- D
- >::type
- >
+ : ::boost::mpl::apply1<
+ meta_,
+ typename ::boost::mpl::apply1<
+ put_aux::meta_modifier_tag<Keyword, Arg>,
+ D
+ >::type
+ >
//->
{};
@@ -89,7 +89,7 @@
Keyword, Arg
>::type
operator%(
- crtp<C, F, Tag, D> const& lhs,
+ adapter_crtp<C, F, Tag, D> const& lhs,
modulo_modifier<Keyword, Arg> const& rhs
)/*<-*/
{
Modified: sandbox/assign_v2/boost/assign/v2/put/modifier/repeat.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/modifier/repeat.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/modifier/repeat.hpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -11,6 +11,7 @@
#define BOOST_ASSIGN_V2_PUT_MODIFIER_REPEAT_ER_2010_HPP
#include <cstddef>
#include <boost/assign/v2/detail/config/enable_cpp0x.hpp>
+#include <boost/assign/v2/detail/pp/ignore.hpp>
#if BOOST_ASSIGN_V2_ENABLE_CPP0X
#include <utility>
#include <boost/utility/enable_if.hpp>
@@ -23,8 +24,7 @@
namespace v2{
namespace modifier_tag{
- template<typename /*<<Arg is the modifier-tag of the implementation to override>>*/ Arg>
- struct repeat{};
+ template<typename Tag> struct repeat{};
}// modifier_tag
namespace put_aux{
Modified: sandbox/assign_v2/boost/assign/v2/put/pipe/csv_put.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/pipe/csv_put.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/pipe/csv_put.hpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -9,6 +9,7 @@
//////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_ASSIGN_V2_PUT_PIPE_CSV_PUT_ER_2010_HPP
#define BOOST_ASSIGN_V2_PUT_PIPE_CSV_PUT_ER_2010_HPP
+#include <boost/assign/v2/detail/pp/ignore.hpp>
#include <boost/assign/v2/ref/array/as_arg_list.hpp>
#include <boost/assign/v2/ref/list/as_modulo_list.hpp>
#include <boost/assign/v2/put/put.hpp>
@@ -17,6 +18,7 @@
namespace boost{
namespace assign{
namespace v2{
+//[syntax_put_pipe_csv_put
namespace put_pipe_aux{
template<typename C,
@@ -24,7 +26,7 @@
C& operator|(C& cont, put_pipe_aux::arg_list<
ParList, N, U
> const& arg_list
- )
+ )/*<-*/
{
v2::ref::as_arg_list(
@@ -36,13 +38,14 @@
);
return cont;
- }
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
}// put_pipe_aux
- put_pipe_aux::arg_list_generator<> const _csv_put
- = put_pipe_aux::arg_list_generator<>();
+ put_pipe_aux::arg_list_generator<> const _csv_put/*<-*/
+ = put_pipe_aux::arg_list_generator<>()/*->*/;
+//]
}// v2
}// assign
}// boost
Modified: sandbox/assign_v2/boost/assign/v2/put/pipe/put.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/pipe/put.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/pipe/put.hpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -9,6 +9,7 @@
//////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_ASSIGN_V2_PUT_PIPE_PUT_ER_2010_HPP
#define BOOST_ASSIGN_V2_PUT_PIPE_PUT_ER_2010_HPP
+#include <boost/assign/v2/detail/pp/ignore.hpp>
#include <boost/assign/v2/ref/list/as_modulo_list.hpp>
#include <boost/assign/v2/ref/list_tuple/as_args_list.hpp>
#include <boost/assign/v2/put/put.hpp>
@@ -17,6 +18,7 @@
namespace boost{
namespace assign{
namespace v2{
+//[syntax_put_pipe_put
namespace put_pipe_aux{
template<
@@ -30,7 +32,7 @@
put_pipe_aux::args_list<
ParList, ArgsList, enable_pars
> const& args_list_
- ){
+ )/*<-*/{
ref::as_args_list(
ref::as_modulo_list<ParList>(
put( cont ), args_list_.par_list_cont()
@@ -38,14 +40,19 @@
args_list_.args_list_cont()
);
return cont;
- }
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
}// put_pipe_aux
+//<-
namespace{
+//->
- put_pipe_aux::args_list<> const _put = put_pipe_aux::args_list<>();
+ put_pipe_aux::args_list<> const _put /*<-*/= put_pipe_aux::args_list<>()/*->*/;
+//<-
}
+//->
+//]
}// v2
}// assign
}// boost
Modified: sandbox/assign_v2/boost/assign/v2/put/pipe/range.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/pipe/range.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/pipe/range.hpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -1,71 +1 @@
-// TODO keep in working copy
-/*
-//////////////////////////////////////////////////////////////////////////////
-// Boost.Assign v2 //
-// //
-// Copyright (C) 2003-2004 Thorsten Ottosen //
-// Copyright (C) 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_ASSIGN_V2_PUT_PIPE_RANGE_ER_2010_HPP
-#define BOOST_ASSIGN_V2_PUT_PIPE_RANGE_ER_2010_HPP
-#include <boost/assign/v2/put/container/put_range.hpp>
-#include <boost/assign/v2/ref/wrapper/copy.hpp>
-#include <boost/type.hpp>
-
-namespace boost{
-namespace assign{
-namespace v2{
-namespace put_range_aux
-{
- template<typename R>
- class helper1 : ref::copy_wrapper<R const>::type
- {
- typedef typename ref::copy_wrapper<R const>::type super_t;
-
- public:
-
- helper1(R const& range) : super_t( range ){}
-
- typename super_t::result_of_get_type
- range()const{ return this->get(); }
-
- private:
- helper1();
- };
-
- struct helper2
- {
- helper2(){}
- template<typename R>
- helper1<R> operator()(const R& range)const
- {
- typedef helper1<R> result_;
- return result_( range );
- }
- };
-
- template<typename C, typename R>
- C& operator|(C& cont, put_range_aux::helper1<R> const& h)
- {
- return put_range( cont, h.range() );
- }
-
- template<typename C, typename R>
- C operator|( ::boost::type<C>, put_range_aux::helper1<R> const& h)
- {
- return put_range<C>( h.range() );
- }
-
-}// put_range_aux
-namespace{
- put_range_aux::helper2 const _put_range = put_range_aux::helper2();
-}
-}// v2
-}// assign
-}// boost
-
-#endif // BOOST_ASSIGN_V2_PUT_PIPE_RANGE_ER_2010_HPP
-*/
+// TODO remove file
Modified: sandbox/assign_v2/boost/assign/v2/put/put.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/put.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/put.hpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -12,6 +12,7 @@
#include <boost/assign/v2/put/adapter/crtp.hpp>
#include <boost/assign/v2/put/adapter/modifier.hpp>
#include <boost/assign/v2/put/adapter/replace_parameter.hpp>
+#include <boost/assign/v2/detail/pp/ignore.hpp>
#include <boost/assign/v2/put/fun/deduce.hpp>
#include <boost/assign/v2/put/modifier/deduce.hpp>
#include <boost/assign/v2/ref/wrapper/copy.hpp>
@@ -19,76 +20,79 @@
namespace boost{
namespace assign{
namespace v2{
+//[syntax_put_put
namespace put_aux{
template<typename C, typename F, typename Tag>
class container_adapter
+//<-
: protected ref::wrapper< ref::assign_tag::copy, C >
- , public put_aux::crtp< C, F, Tag, container_adapter<C, F, Tag> >
+ , public put_aux::adapter_crtp< C, F, Tag, container_adapter<C, F, Tag> >
+//->
{
- typedef put_aux::crtp< C, F, Tag, container_adapter > super2_t;
-
+//<-
+ typedef put_aux::adapter_crtp< C, F, Tag, container_adapter > super2_t;
+//->
public:
- typedef typename super2_t::result_type result_type;
-
+ typedef /*<-*/ typename super2_t::result_type BOOST_ASSIGN_V2_IGNORE(/*->*/ unspecified /*<-*/) /*->*/result_type;
+//<-
protected:
typedef put_aux::adapter_modifier<Tag> modifier_;
typedef ref::assign_tag::copy assign_tag_;
typedef ref::wrapper<assign_tag_,C> super1_t;
-
+//->
public:
- container_adapter(){}
- explicit container_adapter( C& cont ) : super1_t( cont ) {}
- explicit container_adapter( C& cont, F const& f, modifier_ const& m )
+ container_adapter()/*<-*/
+ {}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+ explicit container_adapter( C& cont )/*<-*/
+ : super1_t( cont )
+ {}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+ explicit container_adapter( C& cont, F const& f, modifier_ const& m )/*<-*/
: super1_t( cont ), super2_t( f, m )
{
// This constructor is required in conjunction with modulo
- }
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
- C& container()const{
+ C& container()const/*<-*/{
return static_cast<super1_t const&>(*this).get();
- }
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
};
template<typename C, typename F, typename Tag>
- struct replace_fun< put_aux::container_adapter<C, F, Tag> >
- {
+ struct /*<<Meta-function class>>*/replace_fun< put_aux::container_adapter<C, F, Tag> >{/*<-*/
template<typename F1>
struct apply{ typedef put_aux::container_adapter<C, F1, Tag> type; };
- };
+ /*->*/};
template<typename C, typename F, typename Tag>
- struct replace_modifier_tag< put_aux::container_adapter<C, F, Tag> >
- {
+ struct /*<<Meta-function class>>*/replace_modifier_tag< put_aux::container_adapter<C, F, Tag> >{/*<-*/
template<typename Tag1>
struct apply{ typedef put_aux::container_adapter<C, F, Tag1> type; };
- };
+ /*->*/};
}// put_aux
-//synopsis_put_container
namespace result_of{
template<typename C>
- struct put
- {
+ struct /*<<Meta-function>>*/put{/*<-*/
typedef typename put_aux::deduce_fun<C>::type f_;
typedef typename put_aux::deduce_modifier_tag<C>::type modifier_tag_;
typedef put_aux::container_adapter<C, f_, modifier_tag_> type;
- };
+ /*->*/};
}// result_of
template<typename C>
typename result_of::put<C>::type
- put( C& cont )
+ put( C& cont )/*<-*/
{
typedef typename result_of::put<C>::type result_;
return result_( cont );
- }
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
//]
}// v2
Modified: sandbox/assign_v2/libs/assign/v2/src/main.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/src/main.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/src/main.cpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -2,7 +2,7 @@
// Test
//#include <libs/assign/v2/test/detail.h>
//#include <libs/assign/v2/test/ref.h>
-#include <libs/assign/v2/test/mix.h>
+//#include <libs/assign/v2/test/mix.h>
#include <libs/assign/v2/test/put.h>
//#include <libs/assign/v2/test/utility.h>
//#include <libs/assign/v2/test/other.h>
@@ -48,12 +48,8 @@
using namespace test_assign_v2;
xxx_put::test();
//xxx_mix::test();
- /*
- xxx_put::test();
- xxx_ref::test();
- xxx_utility::test();
- xxx_other::test();
- */
+ //xxx_ref::test();
+ //xxx_utility::test();
}
/*
Modified: sandbox/assign_v2/libs/assign/v2/test/put.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put.cpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -7,12 +7,12 @@
// 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 <libs/assign/v2/test/put/container.h>
#include <libs/assign/v2/test/put/deque.h>
#include <libs/assign/v2/test/put/modifier.h>
#include <libs/assign/v2/test/put/fun.h>
#include <libs/assign/v2/test/put/pipe.h>
#include <libs/assign/v2/test/put/ptr.h>
+#include <libs/assign/v2/test/put/put.h>
#include <libs/assign/v2/test/put.h>
namespace test_assign_v2{
@@ -20,13 +20,13 @@
void test()
{
- xxx_container::test();
//xxx_deduce::test();
- //xxx_deque::test();
+ xxx_deque::test();
xxx_fun::test();
xxx_modifier::test();
xxx_pipe::test();
//xxx_ptr::test();
+ xxx_put::test();
}
}// xxx_put
Modified: sandbox/assign_v2/libs/assign/v2/test/put/deque.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/deque.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/deque.cpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -10,9 +10,10 @@
#include <string>
#include <boost/array.hpp>
#include <boost/tuple/tuple.hpp>
+#include <boost/assign/v2/detail/config/check.hpp>
+#include <boost/assign/v2/detail/pp/ignore.hpp>
#include <boost/assign/v2/put/deque/csv_deque.hpp>
#include <boost/assign/v2/put/deque/deque.hpp>
-#include <boost/assign/v2/detail/config/check.hpp>
#include <libs/assign/v2/test/put/deque.h>
@@ -22,51 +23,40 @@
void test()
{
+
using namespace boost;
namespace as2 = assign::v2;
{
- // http://bioinfo.mbb.yale.edu/~mbg/dom/fun3/area-codes/
- //[deque_tuple_ref
- typedef const char us_state_ [3]; us_state_ ct = "CT", nj = "NJ", ny = "NY";
- typedef int area_code_; typedef boost::tuple<us_state_/*<<Notice the reference>>*/&, area_code_> data_;
- as2::result_of::deque< data_ >::type tri_state_area = /*Calls `tri_state.push_back( data_( s, c ) )` for [^( s, c ) = ( ny, 212 )( ny, 718 )( ny, 516 )( ny, 914 )( nj, 210 )( nj, 908 )( nj, 609 )( ct, 203 ) ]*/as2::deque<data_>( ny, 212 )( ny, 718 )( ny, 516 )( ny, 914 )( nj, 210 )( nj, 908 )( nj, 609 )( ct, 203 );
-
- using namespace boost;
- BOOST_ASSIGN_V2_CHECK( get<0>( tri_state_area.front() ) == ny );
- BOOST_ASSIGN_V2_CHECK( get<1>( tri_state_area.front() ) == 212 );
- BOOST_ASSIGN_V2_CHECK( get<0>( tri_state_area.back() ) == ct );
- BOOST_ASSIGN_V2_CHECK( get<1>( tri_state_area.back() ) == 203 );
- //]
- }
- {
- //[deque_str
- typedef std::string str_;
- BOOST_ASSIGN_V2_CHECK(
- str_( as2::deque<const char*>( "x" )( "y" )( "z" )[1] ) == "y"
- );
- //]
- }
- {
- //[csv_deque
+ //[test_put_deque_ints
+ {
+ typedef as2::result_of::deque<int>::type C;
+ C empty_cont = as2::deque<int>( as2::_nil );
+
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ empty_cont( 72 )( 31 )( 48 ).front() == 72 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ as2::deque<int>( 72 )( 31 )( 48 ).back() == 48 );
+ }
typedef as2::result_of::csv_deque<int>::type C;
{
C cont = as2::csv_deque( 72, 31, 48 );
- BOOST_ASSIGN_V2_CHECK( cont.front() == 72 );
- BOOST_ASSIGN_V2_CHECK( cont.back() == 48 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ cont.front() == 72 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ cont.back() == 48 );
}
{
- C cont = as2::csv_deque( 72, 31 )/* Thanks to `result_of::csv_deque<int>::type == result_of::deque<int>::type`*/( 48 );
+ C cont = as2::csv_deque( 72, 31 )/*<<This seeming oddity is possible thanks to `result_of::csv_deque<int>::type == result_of::deque<int>::type`>>*/( 48 );
- BOOST_ASSIGN_V2_CHECK( cont.front() == 72 );
- BOOST_ASSIGN_V2_CHECK( cont.back() == 48 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ cont.front() == 72 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ cont.back() == 48 );
}
//]
}
{
- //[csv_deque_str
+ //[test_put_deque_str_literal
typedef std::string str_;
- BOOST_ASSIGN_V2_CHECK(
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/
+ str_( as2::deque<const char*>( "x" )( "y" )( "z" )[1] ) == "y"
+ );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/
str_( as2::csv_deque( "x", "y", "z" )[1] ) == "y"
);
//]
Modified: sandbox/assign_v2/libs/assign/v2/test/put/fun.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/fun.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/fun.cpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -13,6 +13,7 @@
#include <vector>
#include <boost/array.hpp>
#include <boost/assign/v2/detail/config/check.hpp>
+#include <boost/assign/v2/detail/pp/ignore.hpp>
#include <boost/assign/v2/put/put.hpp>
#include <boost/assign/v2/put/deque.hpp>
#include <boost/assign/v2/put/fun.hpp>
@@ -50,8 +51,8 @@
as2::put( incr ) % ( as2::_fun = f() )
)( 1 )( 2 )( 3 )( 4 )( 5 );
- BOOST_ASSIGN_V2_CHECK( incr.front() == ( 2 ) );
- BOOST_ASSIGN_V2_CHECK( incr.back() == ( 6 ) );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/incr.front() == ( 2 ) );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/incr.back() == ( 6 ) );
// TODO fix Bug :
// LLVM 1.5 - Release mode, EXC_BAD_ACCESS, stl_vector.h #602
}
@@ -66,32 +67,32 @@
using namespace lambda;
namespace as2 = assign::v2;
{
- //[modulo_fun_math
+ //[test_put_fun_math
std::vector<double> exponent;
typedef function<double(double)> f_;
(
as2::put( exponent ) % ( as2::_fun = f_( log10 ) )
- )/*<<Calls `exponent.push_back( log10( 1000.0 ) )`>>*/( 1000.0 )( 10.0 )( 10000.0 )( 1.0 )( 100.0 );
+ )/*<<Equivalent to `as2::put( exponent )( log10( 1000.0 ) )( log10( 10.0 ) )( log10( 10000.0 ) )( log10( 1.0 ) )( log10( 100.0 ) )`>>*/( 1000.0 )( 10.0 )( 10000.0 )( 1.0 )( 100.0 );
double eps = numeric::bounds<double>::smallest();
- BOOST_ASSIGN_V2_CHECK( fabs( exponent.front() - 3.0 ) < eps );
- BOOST_ASSIGN_V2_CHECK( fabs( exponent.back() - 2.0 ) < eps );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/fabs( exponent.front() - 3.0 ) < eps );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/fabs( exponent.back() - 2.0 ) < eps );
//]
}
{
- //[modulo_fun_deque
+ //[test_put_fun_recursive
int i = 1, k = 1;
BOOST_AUTO(
factorials, (
as2::deque<int>( as2::_nil ) % (
as2::_fun = ( var(k) *= ( var(i)++ ) )
)
- )()()()()()
+ )/*<<Equivalent to `factorials( k *= i++ )` for i = 1, ..., 5>>*/()()()()()
);
- BOOST_ASSIGN_V2_CHECK( factorials.front() == ( 1 ) );
- BOOST_ASSIGN_V2_CHECK( factorials.back() == ( 120 ) );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/factorials.front() == ( 1 ) );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/factorials.back() == ( 120 ) );
//]
}
Modified: sandbox/assign_v2/libs/assign/v2/test/put/modifier/deduce.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/modifier/deduce.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/modifier/deduce.cpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -16,8 +16,8 @@
#include <vector>
#include <string>
#include <boost/array.hpp>
+#include <boost/assign/v2/detail/pp/ignore.hpp>
#include <boost/type_traits/is_same.hpp>
-
#include <boost/ptr_container/ptr_array.hpp>
#include <boost/ptr_container/ptr_deque.hpp>
#include <boost/ptr_container/ptr_list.hpp>
Modified: sandbox/assign_v2/libs/assign/v2/test/put/modifier/iterate.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/modifier/iterate.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/modifier/iterate.cpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -8,6 +8,11 @@
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) //
//////////////////////////////////////////////////////////////////////////////
#include <boost/array.hpp>
+#include <boost/assign/v2/detail/config/check.hpp>
+#include <boost/assign/v2/detail/pp/ignore.hpp>
+#include <boost/assign/v2/put/modifier/iterate.hpp>
+#include <boost/assign/v2/put/put.hpp>
+#include <boost/assign/v2/put/deque.hpp>
#include <boost/lambda/lambda.hpp>
#include <boost/lambda/bind.hpp>
#include <boost/lambda/construct.hpp>
@@ -15,11 +20,6 @@
#include <boost/mpl/apply.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/typeof/typeof.hpp>
-
-#include <boost/assign/v2/detail/config/check.hpp>
-#include <boost/assign/v2/put/modifier/iterate.hpp>
-#include <boost/assign/v2/put/put.hpp>
-#include <boost/assign/v2/put/deque.hpp>
#include <libs/assign/v2/test/put/modifier/iterate.h>
#include <iostream>
@@ -35,7 +35,7 @@
using namespace lambda;
namespace as2 = assign::v2;
{
- //[iterate_meta
+ //[test_put_modifier_iterate_meta
typedef as2::put_aux::keyword_iterate keyword_;
typedef as2::modifier_tag::iterate_arg arg_;
typedef as2::put_aux::modulo_modifier<keyword_, arg_> modulo_;
@@ -46,23 +46,22 @@
typedef as2::modifier_tag::iterate<arg_> tag1_;
typedef as2::put_aux::replace_modifier_tag<put_> meta2_;
typedef ::boost::mpl::apply1<meta2_, tag1_>::type result2_;
- BOOST_MPL_ASSERT((is_same<result1_, result2_>));
+ BOOST_MPL_ASSERT(( is_same<result1_, result2_> ));
//]
}
{
-
- //[iterate
+ //[test_put_modifier_iterate_shifted
typedef int T; array<T, 4> powers; powers[0] = 1; powers[1] = 10;
int i = 2; ( as2::put( powers ) % ( as2::_iterate = var( i )++ ) )( 100 )( 1000 );
- BOOST_ASSIGN_V2_CHECK( powers[0] == 1 );
- BOOST_ASSIGN_V2_CHECK( powers[1] == 10 );
- BOOST_ASSIGN_V2_CHECK( powers[2] == 100 );
- BOOST_ASSIGN_V2_CHECK( powers[3] == 1000 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/powers[0] == 1 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/powers[1] == 10 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/powers[2] == 100 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/powers[3] == 1000 );
//]
}
{
- //[iterate_meta_deque
+ //[test_put_modifier_iterate_meta_deque
typedef as2::put_aux::keyword_iterate keyword_;
typedef as2::modifier_tag::iterate_arg arg_;
typedef as2::put_aux::modulo_modifier<keyword_, arg_> modulo_;
@@ -72,11 +71,11 @@
typedef as2::modifier_tag::iterate<arg_> tag1_;
typedef as2::put_aux::replace_modifier_tag<put_> meta2_;
typedef ::boost::mpl::apply1<meta2_, tag1_>::type result2_;
- BOOST_MPL_ASSERT((is_same<result1_, result2_>));
+ BOOST_MPL_ASSERT(( is_same<result1_, result2_> ));
//]
}
{
- //[iterate_deque
+ //[test_put_modifier_iterate_shifted_deque
as2::result_of::deque<int>::type missing_tail = as2::deque<int>( 1 )( 10 )( -1 )( -1 );
int i = 2;
@@ -85,10 +84,10 @@
( missing_tail % ( as2::_iterate = var( i )++ ) )( 100 )( 1000 )
);
- BOOST_ASSIGN_V2_CHECK( powers[0] == 1 );
- BOOST_ASSIGN_V2_CHECK( powers[1] == 10 );
- BOOST_ASSIGN_V2_CHECK( powers[2] == 100 );
- BOOST_ASSIGN_V2_CHECK( powers[3] == 1000 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/powers[0] == 1 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/powers[1] == 10 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/powers[2] == 100 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/powers[3] == 1000 );
//]
}
}
Modified: sandbox/assign_v2/libs/assign/v2/test/put/modifier/lookup.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/modifier/lookup.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/modifier/lookup.cpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -10,18 +10,18 @@
#include <map>
#include <string>
#include <cmath>
+#include <boost/assign/v2/detail/config/check.hpp>
+#include <boost/assign/v2/detail/pp/ignore.hpp>
+#include <boost/assign/v2/put/fun.hpp>
+#include <boost/assign/v2/put/modifier/lookup.hpp>
+#include <boost/assign/v2/put/put.hpp>
+#include <boost/assign/v2/put/deque.hpp>
#include <boost/lambda/lambda.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/mpl/apply.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/typeof/typeof.hpp>
#include <boost/tuple/tuple.hpp>
-
-#include <boost/assign/v2/detail/config/check.hpp>
-#include <boost/assign/v2/put/fun.hpp>
-#include <boost/assign/v2/put/modifier/lookup.hpp>
-#include <boost/assign/v2/put/put.hpp>
-#include <boost/assign/v2/put/deque.hpp>
#include <libs/assign/v2/test/put/modifier/lookup.h>
namespace test_assign_v2{
@@ -35,7 +35,7 @@
using namespace lambda;
namespace as2 = assign::v2;
{
- //[lookup_meta
+ //[test_put_modifier_lookup_meta
typedef BOOST_TYPEOF(_1) arg_;
typedef as2::put_aux::keyword_lookup keyword_;
typedef as2::put_aux::modulo_modifier<keyword_, arg_> modulo_;
@@ -50,18 +50,16 @@
//]
}
{
- //[lookup
- typedef std::map<std::string, int> C; C cal;
- (
- as2::put( cal )/*<<Calls `cal.insert( C::value_type( "feb", 28 ) )`>>*/( "feb", 28 )( "apr", 30 )( "jun", 30 )( "sep", 30 )( "nov", 30 )/*<<Without this parameter, the compiler would complain that the subsequent argument (`"jan"`) is not convertible to `C::key_type`>>*/% ( as2::_fun = _1 ) % ( as2::_lookup = (_1 = 31) )
- )/*<<Calls `cal["jan"] = 31`>>*/( "jan" )( "mar" )( "may" )( "jul" )( "aug" )( "oct" )( "dec" );
+ //[test_put_modifier_lookup_days_in_each_month
+ typedef std::map<std::string, int> C; C year; ( as2::put( year )( "feb", 28 )( "apr", 30 )( "jun", 30 )( "sep", 30 )( "nov", 30 )
+ % ( as2::_fun = _1 ) % ( as2::_lookup = ( _1 = 31 ) ) )/*<<Calls `year["jan"] = 31` etc.>>*/( "jan" )( "mar" )( "may" )( "jul" )( "aug" )( "oct" )( "dec" );
- BOOST_ASSIGN_V2_CHECK( cal["jan"] == 31 );
- BOOST_ASSIGN_V2_CHECK( cal["dec"] == 31 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/year["jan"] == 31 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/year["dec"] == 31 );
//]
}
{
- //[lookup_meta_deque
+ //[test_put_modifier_lookup_meta_deque
typedef BOOST_TYPEOF(_1) arg_;
typedef as2::put_aux::keyword_lookup keyword_;
typedef as2::put_aux::modulo_modifier<keyword_, arg_> modulo_;
@@ -75,16 +73,16 @@
//]
}
{
- //[lookup_deque
+ //[test_put_modifier_lookup_days_in_each_month_deque
BOOST_AUTO(
days_in_first_quater,
(
as2::deque<int>( 31 )( 31 )( 31 ) % ( as2::_lookup = ( _1 -= 3 ) )
)( 1 )
);
- BOOST_ASSIGN_V2_CHECK( days_in_first_quater[0] == 31 );
- BOOST_ASSIGN_V2_CHECK( days_in_first_quater[1] == 28 );
- BOOST_ASSIGN_V2_CHECK( days_in_first_quater[2] == 31 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/days_in_first_quater[0] == 31 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/days_in_first_quater[1] == 28 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/days_in_first_quater[2] == 31 );
//]
}
}
Modified: sandbox/assign_v2/libs/assign/v2/test/put/modifier/repeat.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/modifier/repeat.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/modifier/repeat.cpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -10,6 +10,7 @@
#include <vector>
#include <boost/typeof/typeof.hpp>
#include <boost/assign/v2/detail/config/check.hpp>
+#include <boost/assign/v2/detail/pp/ignore.hpp>
#include <boost/assign/v2/put/modifier/push_front.hpp>
#include <boost/assign/v2/put/modifier/repeat.hpp>
#include <boost/assign/v2/put/put.hpp>
@@ -26,26 +27,26 @@
using namespace boost;
namespace as2 = assign::v2;
{
- //[repeat_simple
+ //[test_put_modifier_repeat_simple
std::vector<int> cont;
( as2::put( cont ) % ( as2::_repeat = 2 ) )( 72 )( 31 )( 48 );
- BOOST_ASSIGN_V2_CHECK( cont.size() == 6 );
- BOOST_ASSIGN_V2_CHECK( cont.front() == 72 );
- BOOST_ASSIGN_V2_CHECK( cont.back() == 48 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/cont.size() == 6 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/cont.front() == 72 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/cont.back() == 48 );
//]
}
{
- //[repeat_compose_deque
+ //[test_put_modifier_repeat_compose
BOOST_AUTO(
cont, (
as2::deque<int>( as2::_nil ) % as2::_push_front % ( as2::_repeat = 2 )
)( 72 )( 31 )( 48 )
);
- BOOST_ASSIGN_V2_CHECK( boost::size( cont ) == 6 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/boost::size( cont ) == 6 );
//]
- BOOST_ASSIGN_V2_CHECK( cont.front() == 48 );
- BOOST_ASSIGN_V2_CHECK( cont.back() == 72 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/cont.front() == 48 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/cont.back() == 72 );
}
}
Modified: sandbox/assign_v2/libs/assign/v2/test/put/modifier/standard.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/modifier/standard.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/modifier/standard.cpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -13,6 +13,7 @@
#include <set>
#include <string>
#include <boost/assign/v2/detail/config/check.hpp>
+#include <boost/assign/v2/detail/pp/ignore.hpp>
#include <boost/assign/v2/put/modifier/standard.hpp>
#include <boost/assign/v2/put/put.hpp>
#include <boost/assign/v2/put/deque.hpp>
@@ -63,24 +64,24 @@
// TODO abs()<eps
- BOOST_ASSIGN_V2_CHECK( boost::lower_bound( sqrt2, 1.41 ) == boost::begin( sqrt2 ) );
- BOOST_ASSIGN_V2_CHECK( boost::upper_bound( sqrt2, 1.41421 ) == boost::end( sqrt2 ) );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/boost::lower_bound( sqrt2, 1.41 ) == boost::begin( sqrt2 ) );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/boost::upper_bound( sqrt2, 1.41421 ) == boost::end( sqrt2 ) );
//]
}
{
//[test_put_modifier_push
std::queue<int> fifo; ( as2::put( fifo ) % as2::_push )( 72 )( 31 )( 48 );
- BOOST_ASSIGN_V2_CHECK( fifo.front() == 72 );
- BOOST_ASSIGN_V2_CHECK( fifo.back() == 48 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/fifo.front() == 72 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/fifo.back() == 48 );
//]
}
{
//[test_put_modifier_insert
std::set<std::string> letters; ( as2::put( letters ) % as2::_insert )( "d" )( "a" )( "c" )( "b" );
- BOOST_ASSIGN_V2_CHECK( letters.lower_bound( "a" ) == boost::begin( letters ) );
- BOOST_ASSIGN_V2_CHECK( letters.upper_bound( "d" ) == boost::end( letters ) );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/letters.lower_bound( "a" ) == boost::begin( letters ) );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/letters.upper_bound( "d" ) == boost::end( letters ) );
//]
}
{
@@ -88,8 +89,8 @@
typedef int int_; std::list<int> list;
( as2::put( list ) % as2::_push_back )( 72 )( 31 )( 48 );
- BOOST_ASSIGN_V2_CHECK( list.front() == 72 );
- BOOST_ASSIGN_V2_CHECK( list.back() == 48 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/list.front() == 72 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/list.back() == 48 );
//]
}
// DEQUE
@@ -113,8 +114,8 @@
( as2::deque<int>( as2::_nil ) % as2::_push_front )( 16 )( 8 )( 4 )( 2 )( 1 )
);
- BOOST_ASSIGN_V2_CHECK( powers[0] == 1 );
- BOOST_ASSIGN_V2_CHECK( powers[4] == 16 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/powers[0] == 1 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/powers[4] == 16 );
//]
}
}
Modified: sandbox/assign_v2/libs/assign/v2/test/put/pipe/args_list.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/pipe/args_list.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/pipe/args_list.cpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -12,6 +12,7 @@
#include <boost/typeof/typeof.hpp>
#include <boost/assign/v2/detail/check/equal_val.hpp>
#include <boost/assign/v2/detail/check/equal_ref.hpp>
+#include <boost/assign/v2/detail/pp/ignore.hpp>
#include <boost/assign/v2/put/modifier/repeat.hpp>
#include <boost/assign/v2/put/pipe/put.hpp>
#include <boost/assign/v2/utility/csv.hpp>
@@ -39,7 +40,7 @@
( ( args_list_() % ( as2::_repeat = 3 ) )( x ) )
);
int n = as2::ref::at<0>( args_list.par_list_cont() ).arg();
- BOOST_ASSIGN_V2_CHECK( n == 3 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/n == 3 );
}
namespace chk = as2::check_aux;
namespace aux_ = as2::put_pipe_aux;
Modified: sandbox/assign_v2/libs/assign/v2/test/put/pipe/fun.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/pipe/fun.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/pipe/fun.cpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -11,6 +11,7 @@
#include <list>
#include <vector>
#include <boost/assign/v2/detail/config/check.hpp>
+#include <boost/assign/v2/detail/pp/ignore.hpp>
#include <boost/assign/v2/put/deque/csv_deque.hpp>
#include <boost/assign/v2/put/fun.hpp>
#include <boost/assign/v2/put/pipe/put.hpp>
Modified: sandbox/assign_v2/libs/assign/v2/test/put/pipe/modifier/iterate.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/pipe/modifier/iterate.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/pipe/modifier/iterate.cpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -8,6 +8,7 @@
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) //
//////////////////////////////////////////////////////////////////////////////
#include <boost/assign/v2/detail/config/check.hpp>
+#include <boost/assign/v2/detail/pp/ignore.hpp>
#include <boost/assign/v2/put/modifier/iterate.hpp>
#include <boost/assign/v2/put/pipe/csv_put.hpp>
#include <boost/assign/v2/put/deque/csv_deque.hpp>
Modified: sandbox/assign_v2/libs/assign/v2/test/put/pipe/modifier/lookup.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/pipe/modifier/lookup.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/pipe/modifier/lookup.cpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -12,6 +12,7 @@
#include <boost/lambda/lambda.hpp>
#include <boost/typeof/typeof.hpp>
#include <boost/assign/v2/detail/config/check.hpp>
+#include <boost/assign/v2/detail/pp/ignore.hpp>
#include <boost/assign/v2/put/fun.hpp>
#include <boost/assign/v2/put/modifier/lookup.hpp>
#include <boost/assign/v2/put/pipe/put.hpp>
@@ -42,8 +43,8 @@
)["feb"] == 28
);
- BOOST_ASSIGN_V2_CHECK( cal["jun"] == 30 );
- BOOST_ASSIGN_V2_CHECK( cal["mar"] == 31 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/cal["jun"] == 30 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/cal["mar"] == 31 );
//]
}
}
Modified: sandbox/assign_v2/libs/assign/v2/test/put/pipe/modifier/repeat.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/pipe/modifier/repeat.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/pipe/modifier/repeat.cpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -9,6 +9,7 @@
//////////////////////////////////////////////////////////////////////////////
#include <vector>
#include <boost/assign/v2/detail/config/check.hpp>
+#include <boost/assign/v2/detail/pp/ignore.hpp>
#include <boost/assign/v2/put/modifier/repeat.hpp>
#include <boost/assign/v2/put/pipe/put.hpp>
#include <boost/assign/v2/put/deque.hpp>
Modified: sandbox/assign_v2/libs/assign/v2/test/put/pipe/modifier/standard.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/pipe/modifier/standard.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/pipe/modifier/standard.cpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -16,6 +16,7 @@
#include <boost/range/begin.hpp>
#include <boost/range/iterator.hpp>
#include <boost/assign/v2/detail/config/check.hpp>
+#include <boost/assign/v2/detail/pp/ignore.hpp>
#include <boost/assign/v2/put/modifier/standard.hpp>
#include <boost/assign/v2/put/pipe/put.hpp>
#include <boost/assign/v2/put/deque.hpp>
@@ -39,34 +40,34 @@
// ------------------------------------------------------------------- //
{
- //[pipe_modifier_push_front
+ //[test_put_pipe_modifier_push_front
std::deque<int> powers; int front = (
powers | ( as2::_put % as2::_push_front )( 16 )( 8 )( 4 )( 2 )( 1 )
).front();
- BOOST_ASSIGN_V2_CHECK( front == 1 );
- BOOST_ASSIGN_V2_CHECK( powers[4] == 16 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/front == 1 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/powers[4] == 16 );
//]
}
{
- //[pipe_modifier_push
+ //[test_put_pipe_modifier_push
typedef int int_; std::queue<int_> fifo; int_ front = (
fifo | ( as2::_put % as2::_push )( 72 )( 31 )( 48 )
).front();
- BOOST_ASSIGN_V2_CHECK( front == 72 );
- BOOST_ASSIGN_V2_CHECK( fifo.back() == 48 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/front == 72 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/fifo.back() == 48 );
//]
}
{
- //[pipe_modifier_insert
+ //[test_put_pipe_modifier_insert
typedef std::set<double> doubles_; doubles_ sqrt2;
range_iterator<doubles_>::type lower = (
sqrt2 | ( as2::_put % as2::_insert )( 1.414 )( 1.41421 )( 1.41 )( 1.4142 )
).lower_bound( 1.41 );
- BOOST_ASSIGN_V2_CHECK( lower == begin( sqrt2 ) );
- BOOST_ASSIGN_V2_CHECK( sqrt2.upper_bound( 1.41421 ) == end( sqrt2 ) );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/lower == begin( sqrt2 ) );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/sqrt2.upper_bound( 1.41421 ) == end( sqrt2 ) );
//]
}
}
Modified: sandbox/assign_v2/libs/assign/v2/test/put/pipe/put.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/pipe/put.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/pipe/put.cpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -14,6 +14,7 @@
#include <string>
#include <boost/array.hpp>
#include <boost/assign/v2/detail/config/check.hpp>
+#include <boost/assign/v2/detail/pp/ignore.hpp>
#include <boost/assign/v2/put/deque/csv_deque.hpp>
#include <boost/assign/v2/put/pipe/put.hpp>
#include <boost/assign/v2/put/pipe/csv_put.hpp>
@@ -30,19 +31,20 @@
using namespace boost;
namespace as2 = assign::v2;
{
- //pipe_put_str_literal
+ //[test_put_pipe_put_str_literal
typedef const char* T; typedef std::string str_; std::deque<T> cont;
- BOOST_ASSIGN_V2_CHECK(
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/
boost::range::equal(
cont | as2::_put( "x" )( "y" )( "z" ),
as2::csv_deque( "x" )( "y" )( "z" )
)
);
- BOOST_ASSIGN_V2_CHECK( str_( cont[1] ) == "y" );
- BOOST_ASSIGN_V2_CHECK( str_( cont[2] ) == "z" );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/str_( cont[1] ) == "y" );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/str_( cont[2] ) == "z" );
+ //]
}
{
- //[pipe_put_as_arg_list
+ //[test_put_pipe_put_intervals
boost::array<int, 2> interval; boost::array<int, 6> all6;
BOOST_ASSIGN_V2_CHECK(
boost::range::equal(
Modified: sandbox/assign_v2/libs/assign/v2/test/put/ptr.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/ptr.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/ptr.cpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -18,6 +18,7 @@
#include <boost/assign/v2/detail/config/check.hpp>
#include <boost/assign/v2/put/put.hpp>
*/
+#include <boost/assign/v2/detail/pp/ignore.hpp>
#include <libs/assign/v2/test/put/ptr.h>
namespace test_assign_v2{
@@ -33,32 +34,32 @@
typedef int T;
T x = 1, y = 2, z = 3; boost::ptr_array<T, 3> cont;
as2::put( cont )( x )( y )( z );
- BOOST_ASSIGN_V2_CHECK( cont[0] == x );
- BOOST_ASSIGN_V2_CHECK( cont[2] == z );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert(/*<-*/))/*->*/cont[0] == x );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert(/*<-*/))/*->*/cont[2] == z );
//]
}
{
//[put_ptr_deque
typedef int T; T x = 1, y = 2, z = 0; boost::ptr_deque<T> cont;
as2::put( cont )( x )( y )( z );
- BOOST_ASSIGN_V2_CHECK( cont.front() == x );
- BOOST_ASSIGN_V2_CHECK( cont.back() == z );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert(/*<-*/))/*->*/cont.front() == x );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert(/*<-*/))/*->*/cont.back() == z );
//]
}
{
//[put_ptr_list
typedef int T; T x = 1, y = 2, z = 0; boost::ptr_list<T> cont;
as2::put( cont )( x )( y )( z );
- BOOST_ASSIGN_V2_CHECK( cont.front() == x );
- BOOST_ASSIGN_V2_CHECK( cont.back() == z );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert(/*<-*/))/*->*/cont.front() == x );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert(/*<-*/))/*->*/cont.back() == z );
//]
}
{
//[put_ptr_vector
typedef int T; T x = 1, y = 2, z = 0; boost::ptr_vector<T> cont;
as2::put( cont )( x )( y )( z );
- BOOST_ASSIGN_V2_CHECK( cont.front() == x );
- BOOST_ASSIGN_V2_CHECK( cont.back() == z );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert(/*<-*/))/*->*/cont.front() == x );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert(/*<-*/))/*->*/cont.back() == z );
//]
}
*/
@@ -70,7 +71,7 @@
//[put_ptr_map
boost::ptr_map<std::string, int> assoc;
as2::put( assoc )( "jan", 31 )( "feb", 28 )( "mar", 31 );
- BOOST_ASSIGN_V2_CHECK( assoc["feb"] == 28 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert(/*<-*/))/*->*/assoc["feb"] == 28 );
//]
}
{
@@ -79,8 +80,8 @@
boost::ptr_set<T> assoc;
T x = "isomer", y = "ephemeral", z = "prosaic";
as2::put( assoc )( x )( y )( z );
- BOOST_ASSIGN_V2_CHECK( assoc.count( x ) == 1 );
- BOOST_ASSIGN_V2_CHECK( assoc.count( z ) == 1 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert(/*<-*/))/*->*/assoc.count( x ) == 1 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert(/*<-*/))/*->*/assoc.count( z ) == 1 );
//]
}
*/
Modified: sandbox/assign_v2/libs/assign/v2/test/put/put.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/put.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/put.cpp 2011-03-13 22:34:43 EDT (Sun, 13 Mar 2011)
@@ -19,6 +19,7 @@
#include <string>
#include <utility>
#include <boost/assign/v2/detail/config/check.hpp>
+#include <boost/assign/v2/detail/pp/ignore.hpp>
#include <boost/assign/v2/put/put.hpp>
#include <boost/assign/v2/put/deque/csv_deque.hpp>
#include <boost/tuple/tuple.hpp>
@@ -41,9 +42,13 @@
namespace as2 = assign::v2;
{
- //[put_bitset
- typedef std::string str_; typedef std::bitset<3> data_;
- /*<<Keep in mind that although `data_( str_( "011" ) )`, for instance, is valid, `consecutive.push_back( str_( "011" ) )` isn't (GCC4.2)>>*/ std::vector<data_> consecutive; /*<<Calls `consecutive.push_back( data_( t ) );` for [^t = str_( "000" ), ..., str_( "111" )]`>>*/as2::put( consecutive )( str_( "000" ) )( str_( "001" ) )( str_( "010" ) )( str_( "011" ) )( str_( "100" ) )( str_( "101" ) )( str_( "110" ) )( str_( "111" ) );
+ //[test_put_put_bitset
+ typedef std::string str_; typedef std::bitset<3> data_; /*<<Keep in mind that although `data_( str_( "011" ) )`, for instance, is valid, `consecutive.push_back( str_( "011" ) )` isn't (GCC4.2)>>*/ std::vector<data_> consecutive;
+ /*<<Calls `consecutive.push_back( data_( t ) );` for [^t = ]`str_( "000" )`[^, ..., ]`str_( "111" )`[^\]]>>*/as2::put( consecutive )
+ ( str_( "000" ) )( str_( "001" ) )
+ ( str_( "010" ) )( str_( "011" ) )
+ ( str_( "100" ) )( str_( "101" ) )
+ ( str_( "110" ) )( str_( "111" ) );
for(int i = 0; i < consecutive.size(); i++)
{
@@ -52,25 +57,25 @@
//]
for(int i = 0; i < consecutive.size(); i++)
{
- BOOST_ASSIGN_V2_CHECK( consecutive[i].to_ulong() == i );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ consecutive[i].to_ulong() == i );
}
}
{
- //[put_as_arg_list
+ //[test_put_put_numeric_kb
std::vector<int> numeric( 10 ); iota( numeric, 0 ); typedef std::string str_;
typedef variant< int, str_ > data_; array<data_, 16> numeric_kb;
- as2::put( numeric_kb )/*<<Calls [^{`numeric_kb[ i ] = data_( t )` : ( i, t ) = ( 0, "+" ), ..., ( 5, "." )}]>>*/( "+" )( "-" )( "*" )( "/" )( "=" )( "." )/*<<Calls [^{`numeric_kb[ 6 + i ] = data_( *( b + i ) )` : i = 0, ..., 9; b = `boost::begin( numeric )` }]>>*/( as2::as_arg_list( numeric ) );
+ as2::put( numeric_kb )/*<<Calls `numeric_kb[ i ] = data_( t )` for [^( i, t ) = ( 0, "+" ), ..., ( 5, "." )]>>*/( "+" )( "-" )( "*" )( "/" )( "=" )( "." )/*<<Calls [^{`numeric_kb[ 6 + i ] = data_( *( b + i ) )` : i = 0, ..., 9; b = `boost::begin( numeric )` }]>>*/( as2::as_arg_list( numeric ) );
assert( get<str_>( numeric_kb.front() ) == "+" );
assert( get<int>( numeric_kb.back() ) == 9 );
//]
- BOOST_ASSIGN_V2_CHECK( get<str_>( numeric_kb.front() ) == "+" );
- BOOST_ASSIGN_V2_CHECK( get<str_>( numeric_kb[ 5 ] ) == "." );
- BOOST_ASSIGN_V2_CHECK( get<int>( numeric_kb[ 6 ] ) == 0 );
- BOOST_ASSIGN_V2_CHECK( get<int>( numeric_kb.back() ) == 9 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ get<str_>( numeric_kb.front() ) == "+" );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ get<str_>( numeric_kb[ 5 ] ) == "." );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ get<int>( numeric_kb[ 6 ] ) == 0 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ get<int>( numeric_kb.back() ) == 9 );
}
{
- //[put_variable_size
+ //[test_put_put_ragged
typedef double data_; typedef std::vector<data_> variable_size_;
variable_size_ a( 3 ); a[0] = 0.71; a[1] = 0.63; a[2] = 0.85;
variable_size_ b( 4 ); b[0] = 0.61; b[1] = 0.69; b[2] = 0.92; b[3] = 0.55;
@@ -84,49 +89,49 @@
assert( ragged[0].size() == a.size() );
assert( ragged[3].size() == 0 );
//]
- BOOST_ASSIGN_V2_CHECK( ragged[0].size() == a.size() );
- BOOST_ASSIGN_V2_CHECK( ragged[1].size() == b.size() );
- BOOST_ASSIGN_V2_CHECK( ragged[2].size() == 1 );
- BOOST_ASSIGN_V2_CHECK( ragged[3].size() == 0 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ ragged[0].size() == a.size() );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ ragged[1].size() == b.size() );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ ragged[2].size() == 1 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ ragged[3].size() == 0 );
data_ eps = numeric::bounds<data_>::smallest();
- BOOST_ASSIGN_V2_CHECK( fabs( ragged[0].front() - a.front() ) < eps );
- BOOST_ASSIGN_V2_CHECK( fabs( ragged[0].back() - a.back() ) < eps );
- BOOST_ASSIGN_V2_CHECK( fabs( ragged[1].front() - b.front() ) < eps );
- BOOST_ASSIGN_V2_CHECK( fabs( ragged[1].back() - b.back() ) < eps );
- BOOST_ASSIGN_V2_CHECK( fabs( ragged[2].front() + 99.99 ) < eps );
- BOOST_ASSIGN_V2_CHECK( fabs( ragged[2].back() + 99.99 ) < eps );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ fabs( ragged[0].front() - a.front() ) < eps );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ fabs( ragged[0].back() - a.back() ) < eps );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ fabs( ragged[1].front() - b.front() ) < eps );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ fabs( ragged[1].back() - b.back() ) < eps );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ fabs( ragged[2].front() + 99.99 ) < eps );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ fabs( ragged[2].back() + 99.99 ) < eps );
}
{
- //[put_deduce
+ //[test_put_put_stl
std::queue<int> adapter; /*<<Calls `fifo.push( t )` for [^t = 72, 31, 48]>>*/as2::put( adapter )( 72 )( 31 )( 48 );
array<int, 3> array; /*<<Calls `array[i] = t` for [^( i, t ) = ( 0, 72 ), ( 1, 31 ), ( 2, 48 )]>>*/as2::put( array )( 72 )( 31 )( 48 );
std::set<int> assoc; /*<<Calls `assoc.insert( t )` for [^t = 72, 31, 48]>>*/as2::put( assoc )( 72 )( 31 )( 48 );
std::list<int> seq; /*<<Calls `seq.push_back( t )` for [^t = 72, 31, 48]>>*/as2::put( seq )( 72 )( 31 )( 48 );
//]
- BOOST_ASSIGN_V2_CHECK( adapter.front() == 72 );
- BOOST_ASSIGN_V2_CHECK( adapter.back() == 48 );
- BOOST_ASSIGN_V2_CHECK( array.front() == 72 );
- BOOST_ASSIGN_V2_CHECK( array.back() == 48 );
- BOOST_ASSIGN_V2_CHECK( assoc.count( 48 ) == 1 );
- BOOST_ASSIGN_V2_CHECK( assoc.count( 72 ) == 1 );
- BOOST_ASSIGN_V2_CHECK( seq.front() == 72 );
- BOOST_ASSIGN_V2_CHECK( seq.back() == 48 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ adapter.front() == 72 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ adapter.back() == 48 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ array.front() == 72 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ array.back() == 48 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ assoc.count( 48 ) == 1 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ assoc.count( 72 ) == 1 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ seq.front() == 72 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ seq.back() == 48 );
}
{
// http://bioinfo.mbb.yale.edu/~mbg/dom/fun3/area-codes/
- //[put_seq_tuple_ref
+ //[put_put_put_area_codes
typedef const char us_state_ [3]; us_state_ ct = "CT", nj = "NJ", ny = "NY";
typedef int area_code_; typedef tuple<us_state_/*<<Notice the [*reference]>>*/&, area_code_> data_; std::deque< data_ > tri_state_area;
- /*<<Calls `tri_state.push_back( data_( s, c ) )` for [^( s, c ) = ( ny, 212 )...( ct, 203 ) ]>>*/
+ /*<<Calls `tri_state.push_back( data_( s, c ) )` for [^( s, c ) =( ny, 212 )...( ct, 203 )]>>*/
as2::put( tri_state_area )( ny, 212 )( ny, 718 )( ny, 516 )( ny, 914 )( nj, 210 )( nj, 908 )( nj, 609 )( ct, 203 );
assert( get<0>( tri_state_area.front() ) == ny );
assert( get<1>( tri_state_area.back() ) == 203 );
//]
- BOOST_ASSIGN_V2_CHECK( get<0>( tri_state_area.front() ) == ny );
- BOOST_ASSIGN_V2_CHECK( get<1>( tri_state_area.front() ) == 212 );
- BOOST_ASSIGN_V2_CHECK( get<0>( tri_state_area.back() ) == ct );
- BOOST_ASSIGN_V2_CHECK( get<1>( tri_state_area.back() ) == 203 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ get<0>( tri_state_area.front() ) == ny );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ get<1>( tri_state_area.front() ) == 212 );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ get<0>( tri_state_area.back() ) == ct );
+ /*<-*/BOOST_ASSIGN_V2_CHECK( BOOST_ASSIGN_V2_IGNORE(/*->*/assert( /*<-*/))/*->*/ get<1>( tri_state_area.back() ) == 203 );
}
}// test()
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