Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70672 - in sandbox/assign_v2/boost/assign/v2: detail/traits detail/traits/aux_ option option/modifier
From: erwann.rogard_at_[hidden]
Date: 2011-03-28 16:52:36


Author: e_r
Date: 2011-03-28 16:52:35 EDT (Mon, 28 Mar 2011)
New Revision: 70672
URL: http://svn.boost.org/trac/boost/changeset/70672

Log:
upd assign_v2
Added:
   sandbox/assign_v2/boost/assign/v2/detail/traits/aux_/
   sandbox/assign_v2/boost/assign/v2/detail/traits/aux_/fwd_container.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/detail/traits/aux_/ptr_container.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/detail/traits/aux_/value_container.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/detail/traits/container.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/option/data_generator.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/option/modifier.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/option/modifier/insert.hpp (contents, props changed)

Added: sandbox/assign_v2/boost/assign/v2/detail/traits/aux_/fwd_container.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/detail/traits/aux_/fwd_container.hpp 2011-03-28 16:52:35 EDT (Mon, 28 Mar 2011)
@@ -0,0 +1,165 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_DETAIL_TRAITS_AUX_FWD_CONTAINER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_DETAIL_TRAITS_AUX_FWD_CONTAINER_ER_2010_HPP
+#include <cstddef>
+
+namespace std{
+
+ // www.sgi.com/tech/stl/Deque.html
+ template<typename T, typename A> class deque;
+
+ // http://www.sgi.com/tech/stl/List.html
+ template<typename T, typename A> class list;
+
+ // http://www.sgi.com/tech/stl/Map.html
+ template<typename K, typename T, typename C, typename A> class map;
+
+ // http://www.sgi.com/tech/stl/queue.html
+ template<typename T, typename S> class queue;
+
+ // http://www.sgi.com/tech/stl/set.html
+ template<typename T, typename C, typename A> class set;
+
+ // http://www.sgi.com/tech/stl/stack.html
+ template<typename T, typename S> class stack;
+
+ // http://www.sgi.com/tech/stl/Vector.html
+ template<typename T, typename A> class vector;
+
+}// std
+namespace boost{
+
+ // http://www.boost.org/doc/libs/release/doc/html/array.html
+ template<typename T, std::size_t size> class array;
+
+ // http://www.boost.org/doc/libs/release/libs/circular_buffer/index.html
+ template<typename T, typename Alloc> class circular_buffer;
+
+ template <
+ class Key,
+ class Hash,
+ class Pred,
+ class Alloc
+ >
+ class unordered_set;
+
+ template <
+ class Key,
+ class Mapped,
+ class Hash,
+ class Pred,
+ class Alloc
+ >
+ class unordered_map;
+
+ template<
+ class Key,
+ class Mapped,
+ class Hash,
+ class Pred,
+ class Alloc
+ >
+ class unordered_multimap;
+
+ template<
+ class Key,
+ class Hash,
+ class Pred,
+ class Alloc
+ >
+ class unordered_multiset;
+
+ // POINTER-CONTAINERS
+
+ template
+ <
+ class T,
+ std::size_t N,
+ class CloneAllocator
+ >
+ class ptr_array;
+
+ template
+ <
+ class T,
+ class CloneAllocator,
+ class Allocator
+ >
+ class ptr_circular_buffer;
+
+ template
+ <
+ class T,
+ class CloneAllocator,
+ class Allocator
+ >
+ class ptr_deque;
+
+ template
+ <
+ class T,
+ class CloneAllocator,
+ class Allocator
+ >
+ class ptr_list;
+
+ template
+ <
+ class Key,
+ class T,
+ class Compare,
+ class CloneAllocator,
+ class Allocator
+ >
+ class ptr_map;
+
+ template
+ <
+ class Key,
+ class Compare,
+ class CloneAllocator,
+ class Allocator
+ >
+ class ptr_set;
+
+ template
+ <
+ class Key,
+ class Mapped,
+ class Hash,
+ class Pred,
+ class CloneAllocator,
+ class Allocator
+ >
+ class ptr_unordered_map;
+
+ template
+ <
+ class Key,
+ class Hash,
+ class Pred,
+ class CloneAllocator,
+ class Allocator
+ >
+ class ptr_unordered_set;
+
+
+ template
+ <
+ class T,
+ class CloneAllocator,
+ class Allocator
+ >
+ class ptr_vector;
+
+}// boost
+
+#endif // BOOST_ASSIGN_V2_DETAIL_TRAITS_AUX_FWD_CONTAINER_ER_2010_HPP

Added: sandbox/assign_v2/boost/assign/v2/detail/traits/aux_/ptr_container.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/detail/traits/aux_/ptr_container.hpp 2011-03-28 16:52:35 EDT (Mon, 28 Mar 2011)
@@ -0,0 +1,291 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_DETAIL_TRAITS_AUX_PTR_CONTAINER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_DETAIL_TRAITS_AUX_PTR_CONTAINER_ER_2010_HPP
+#include <cstddef>
+#include <memory> // std::allocator
+#include <utility> // std::pair
+#include <boost/assign/v2/detail/traits/aux_/fwd_container.hpp>
+#include <boost/mpl/size_t.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace container_aux{
+
+ // FWD
+
+ template<typename C> struct mapped;
+ template<typename C> struct key;
+ template<typename C> struct value; // Some specializations below
+
+
+ // ALLOCATOR
+
+ template<typename PtrC>
+ struct to_value_allocator
+ {
+ typedef std::allocator<typename value<PtrC>::type> type;
+ };
+
+
+ // ARRAY
+
+ template<typename PtrC> struct helper_size{};
+
+ template<typename T, std::size_t N, typename C>
+ struct helper_size< boost::ptr_array<T, N, C> >
+ : ::boost::mpl::size_t<
+ N
+ >{};
+
+ template<typename PtrC>
+ struct to_value_array
+ {
+ typedef boost::array<
+ typename value<PtrC>::type,
+ helper_size<PtrC>::value
+ > type;
+ };
+
+ // SEQUENCE
+
+ template<typename PtrC, template<typename, typename> class C>
+ struct to_value_sequence {
+
+ typedef C<
+ typename value<PtrC>::type,
+ typename to_value_allocator<PtrC>::type
+ > type;
+
+ };
+
+ // MAP
+
+ template<
+ typename PtrC,
+ template<typename, typename, typename, typename> class C
+ >
+ struct to_value_map{
+
+ typedef typename key<PtrC>::type k_;
+ typedef typename mapped<PtrC>::type m_;
+ typedef std::pair<const k_, m_> p_;
+
+ typedef C<
+ k_,
+ m_,
+ typename PtrC::key_compare,
+ std::allocator<p_>
+ > type;
+
+ };
+
+ // SET
+
+ template<typename PtrC, template<typename, typename, typename> class C>
+ struct to_value_set{
+
+ typedef C<
+ typename PtrC::key_type,
+ typename PtrC::key_compare,
+ typename to_value_allocator<PtrC>::type
+ > type;
+
+ };
+
+ // UNORDERED MAP
+
+ template<typename PtrC,
+ template<typename, typename, typename, typename, typename> class C>
+ struct to_value_unordered_map{
+
+ typedef C<
+ typename PtrC::key_type,
+ typename mapped<PtrC>::type,
+ typename PtrC::hasher,
+ typename PtrC::key_equal,
+ typename to_value_allocator<PtrC>::type
+ > type;
+
+ };
+
+ // UNORDERED SET
+
+ template<typename PtrC,
+ template<typename, typename, typename, typename> class C>
+ struct to_value_unordered_set{
+
+ typedef C<
+ typename PtrC::key_type,
+ typename PtrC::hasher,
+ typename PtrC::key_equal,
+ typename to_value_allocator<PtrC>::type
+ > type;
+
+ };
+
+ // TO_VALUE_CONTAINER
+
+ template<typename C>
+ struct to_value_container
+ {
+ typedef C type;
+ };
+
+ // Array
+ template<
+ typename T,
+ std::size_t N,
+ typename A
+ >
+ struct to_value_container<
+ boost::ptr_array<T, N, A>
+ > : to_value_array<
+ boost::ptr_array<T, N, A>
+ >{};
+
+ // Sequence
+
+ template<
+ typename T,
+ typename C,
+ typename A
+ >
+ struct to_value_container<
+ boost::ptr_deque<T, C, A>
+ > : to_value_sequence<
+ boost::ptr_deque<T, C, A>,
+ std::deque
+ >{};
+
+ template<
+ typename T,
+ typename C,
+ typename A
+ >
+ struct to_value_container<
+ boost::ptr_list<T, C, A>
+ > : to_value_sequence<
+ boost::ptr_list<T, C, A>,
+ std::list
+ >{};
+
+ template<
+ typename T,
+ typename C,
+ typename A
+ >
+ struct to_value_container<
+ boost::ptr_vector<T, C, A>
+ > : to_value_sequence<
+ boost::ptr_vector<T, C, A>,
+ std::vector
+ >{};
+
+ // Map
+
+ template
+ <
+ class Key,
+ class Mapped,
+ class Compare,
+ class CloneAllocator,
+ class Allocator
+ >
+ struct to_value_container<
+ boost::ptr_map<Key, Mapped, Compare, CloneAllocator, Allocator>
+ > : to_value_map<
+ boost::ptr_map<Key, Mapped, Compare, CloneAllocator, Allocator>,
+ std::map
+ >{};
+
+
+ template
+ <
+ class Key,
+ class Mapped,
+ class Compare,
+ class CloneAllocator,
+ class Allocator
+ >
+ struct value<
+ boost::ptr_map<Key, Mapped, Compare, CloneAllocator, Allocator>
+ > : value<
+ typename to_value_container<
+ boost::ptr_map<Key, Mapped, Compare, CloneAllocator, Allocator>
+ >::type
+ >{};
+
+ // Set
+
+ template
+ <
+ class Key,
+ class Compare,
+ class CloneAllocator,
+ class Allocator
+ >
+ struct to_value_container<
+ boost::ptr_set<Key, Compare, CloneAllocator, Allocator>
+ > : to_value_set<
+ boost::ptr_set<Key, Compare, CloneAllocator, Allocator>,
+ std::set
+ >{};
+
+ // Unordered map
+
+ template
+ <
+ class Key,
+ class Mapped,
+ class Hash,
+ class Pred,
+ class CloneAllocator,
+ class Allocator
+ >
+ struct to_value_container<
+ boost::ptr_unordered_map<
+ Key, Mapped, Hash, Pred, CloneAllocator, Allocator
+ >
+ > : to_value_unordered_map<
+ boost::ptr_unordered_map<
+ Key, Mapped, Hash, Pred, CloneAllocator, Allocator
+ >,
+ boost::unordered_map
+ >{};
+
+ // Unordered set
+
+ template
+ <
+ class Key,
+ class Hash,
+ class Pred,
+ class CloneAllocator,
+ class Allocator
+ >
+ struct to_value_container<
+ boost::ptr_unordered_set<
+ Key, Hash, Pred, CloneAllocator, Allocator
+ >
+ > : to_value_unordered_set<
+ boost::ptr_unordered_set<
+ Key, Hash, Pred, CloneAllocator, Allocator
+ >,
+ boost::unordered_set
+ >{};
+
+}// container_aux
+}// v2
+}// assign
+}// boost
+
+#endif // BOOST_ASSIGN_V2_DETAIL_TRAITS_AUX_PTR_CONTAINER_ER_2010_HPP

Added: sandbox/assign_v2/boost/assign/v2/detail/traits/aux_/value_container.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/detail/traits/aux_/value_container.hpp 2011-03-28 16:52:35 EDT (Mon, 28 Mar 2011)
@@ -0,0 +1,158 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_DETAIL_TRAITS_AUX_VALUE_CONTAINER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_DETAIL_TRAITS_AUX_VALUE_CONTAINER_ER_2010_HPP
+#include <boost/assign/v2/detail/traits/aux_/fwd_container.hpp>
+#include <boost/config.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/seq.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/detail/yes_no_type.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace container_aux{
+
+// CATEGORIES
+
+ template<typename C>
+ struct value_is_fifo : ::boost::mpl::false_{};
+
+ template<typename V>
+ struct value_is_lifo : ::boost::mpl::false_{};
+
+ template<typename C>
+ struct value_is_associative : ::boost::mpl::false_{};
+
+ template<typename C>
+ struct value_is_sorted : ::boost::mpl::false_{};
+
+ template<typename C>
+ struct value_is_array : ::boost::mpl::false_{};
+
+ template<typename C>
+ struct value_is_map : ::boost::mpl::false_{};
+
+}// container_aux
+
+#define BOOST_ASSIGN_V2_TRAITS_CONTAINER_CATEGORY(SeqPar, IsCategory, Identifier, SeqArg)\
+namespace container_aux{\
+ template<BOOST_PP_SEQ_ENUM(SeqPar)>\
+ struct BOOST_PP_CAT(value_,IsCategory) <\
+ Identifier<BOOST_PP_SEQ_ENUM(SeqArg)> \
+ > : ::boost::mpl::true_{};\
+}\
+/**/
+#define BOOST_ASSIGN_V2_TRAITS_CONTAINER_CATEGORIES_HELPER(r, data, elem)\
+ BOOST_ASSIGN_V2_TRAITS_CONTAINER_CATEGORY(\
+ BOOST_PP_SEQ_ELEM(0, data),\
+ elem,\
+ BOOST_PP_SEQ_ELEM(1, data),\
+ BOOST_PP_SEQ_ELEM(2, data)\
+ )
+/**/
+#define BOOST_ASSIGN_V2_TRAITS_CONTAINER_CATEGORIES(SeqPar, SeqIsCategory, Identifier, SeqArg)\
+ BOOST_PP_SEQ_FOR_EACH(\
+ BOOST_ASSIGN_V2_TRAITS_CONTAINER_CATEGORIES_HELPER,\
+ (SeqPar)(Identifier)(SeqArg),\
+ SeqIsCategory\
+ )\
+/**/
+
+BOOST_ASSIGN_V2_TRAITS_CONTAINER_CATEGORIES(
+ (typename T)( std::size_t sz), (is_array),
+ boost::array, (T)(sz)
+)
+BOOST_ASSIGN_V2_TRAITS_CONTAINER_CATEGORIES(
+ (typename K)(typename T)(typename C)(typename A),
+ (is_associative)(is_map)(is_sorted),
+ std::map, (K)(T)(C)(A)
+)
+BOOST_ASSIGN_V2_TRAITS_CONTAINER_CATEGORIES(
+ (typename T)(typename A), (is_fifo),
+ std::queue, (T)(A)
+)
+BOOST_ASSIGN_V2_TRAITS_CONTAINER_CATEGORIES(
+ (typename T)(typename C)(typename A), (is_sorted)(is_associative),
+ std::set, (T)(C)(A)
+)
+BOOST_ASSIGN_V2_TRAITS_CONTAINER_CATEGORIES(
+ (typename T)(typename A), (is_lifo),
+ std::stack, (T)(A)
+)
+BOOST_ASSIGN_V2_TRAITS_CONTAINER_CATEGORIES(
+ (typename K)(typename M)(typename H)(typename P)(typename A),
+ (is_associative),
+ boost::unordered_map, (K)(M)(H)(P)(A)
+)
+BOOST_ASSIGN_V2_TRAITS_CONTAINER_CATEGORIES(
+ (typename K)(typename H)(typename P)(typename A), (is_associative),
+ boost::unordered_set, (K)(H)(P)(A)
+)
+
+namespace container_aux{
+
+// HAS_VALUE
+
+ template<typename T>
+ struct value_has_value_type{
+
+ typedef typename boost::type_traits::yes_type yes_;
+ typedef typename boost::type_traits::no_type no_;
+
+
+ template<typename U>
+ static yes_ test(U*, typename U::value_type* p = 0);
+ static no_ test(...);
+
+ BOOST_STATIC_CONSTANT(
+ bool,
+ value = sizeof( test((T*)0) ) == sizeof( yes_ )
+ );
+ typedef ::boost::mpl::bool_<value> type;
+ };
+
+// HAS_PUSH
+
+ template<typename C, typename T = typename C::value_type>
+ struct value_has_push{
+
+ typedef typename boost::type_traits::yes_type yes_;
+ typedef typename boost::type_traits::no_type no_;
+
+ template<typename U,void (U::*fp)(T const&)>
+ struct helper{
+ // See http://lists.boost.org/Archives/boost/2002/03/27233.php
+ };
+
+ template<typename U>
+ static yes_ test(U*, helper<U, &U::push>* p = 0);
+ static no_ test(...);
+
+ BOOST_STATIC_CONSTANT(
+ bool,
+ value = sizeof( test((C*)0) ) == sizeof( yes_ )
+ );
+
+ typedef ::boost::mpl::bool_<value> type;
+
+ };
+
+ template<typename C>
+ struct value_has_push_deduced_value : value_has_push<C>{};
+
+}// container_aux
+}// v2
+}// assign
+}// boost
+
+#endif // BOOST_ASSIGN_V2_DETAIL_TRAITS_AUX_VALUE_CONTAINER_ER_2010_HPP
\ No newline at end of file

Added: sandbox/assign_v2/boost/assign/v2/detail/traits/container.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/detail/traits/container.hpp 2011-03-28 16:52:35 EDT (Mon, 28 Mar 2011)
@@ -0,0 +1,111 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_DETAIL_TRAITS_CONTAINER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_DETAIL_TRAITS_CONTAINER_ER_2010_HPP
+#include <boost/assign/v2/detail/traits/aux_/fwd_container.hpp>
+#include <boost/assign/v2/detail/traits/aux_/ptr_container.hpp>
+#include <boost/assign/v2/detail/traits/aux_/value_container.hpp>
+#include <boost/config.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/preprocessor/seq.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/detail/yes_no_type.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace container_aux{
+
+// HELPER
+
+ template<template<typename > class F, typename C>
+ struct through_value_container
+ : F<
+ typename to_value_container<C>::type
+ >
+ {};
+
+// DATA-MEMBER
+
+ template<
+ typename C // Ptr or value container
+ >
+ struct key{ typedef typename C::key_type type; };
+
+ template<
+ typename C // Ptr or value container
+ >
+ struct value : boost::remove_reference<
+ typename C::reference
+ >{};
+
+ template<
+ typename C // Ptr or value container
+ >
+ struct mapped : boost::remove_reference<
+ typename C::mapped_reference
+ >{};
+
+// STORAGE
+
+ template<typename C>
+ struct is_ptr_container : ::boost::mpl::not_<
+ boost::is_same<C, typename to_value_container<C>::type>
+ >{};
+
+// MEMBERS
+
+ template<typename C>
+ struct has_push_deduced_value
+ : through_value_container<value_has_push_deduced_value, C>
+ {};
+
+// CATEGORY
+
+ template<typename C> struct is_array
+ : through_value_container<value_is_array, C>
+ {};
+
+ template<typename C>
+ struct is_associative
+ : through_value_container<value_is_associative, C>
+ {};
+
+ template<typename C>
+ struct is_fifo
+ : through_value_container<value_is_fifo, C>
+ {};
+
+ template<typename C>
+ struct is_lifo
+ : through_value_container<value_is_lifo, C>
+ {};
+
+ template<typename C> struct is_map
+ : through_value_container<value_is_map, C>
+ {};
+
+ template<typename C>
+ struct is_sorted
+ : through_value_container<value_is_sorted, C>
+ {};
+
+}// container_aux
+}// v2
+}// assign
+}// boost
+
+
+#endif // BOOST_ASSIGN_V2_DETAIL_TRAITS_CONTAINER_ER_2010_HPP

Added: sandbox/assign_v2/boost/assign/v2/option/data_generator.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/option/data_generator.hpp 2011-03-28 16:52:35 EDT (Mon, 28 Mar 2011)
@@ -0,0 +1,15 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_OPTION_DATA_GENERATOR_ER_2010_HPP
+#define BOOST_ASSIGN_V2_OPTION_DATA_GENERATOR_ER_2010_HPP
+#include <boost/assign/v2/option/data_generator/framework.hpp>
+#include <boost/assign/v2/option/data_generator/key.hpp>
+
+#endif // BOOST_ASSIGN_V2_OPTION_DATA_GENERATOR_ER_2010_HPP
\ No newline at end of file

Added: sandbox/assign_v2/boost/assign/v2/option/modifier.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/option/modifier.hpp 2011-03-28 16:52:35 EDT (Mon, 28 Mar 2011)
@@ -0,0 +1,19 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_OPTION_MODIFIER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_OPTION_MODIFIER_ER_2010_HPP
+#include <boost/assign/v2/option/modifier/insert.hpp>
+#include <boost/assign/v2/option/modifier/iterate.hpp>
+#include <boost/assign/v2/option/modifier/mapped.hpp>
+#include <boost/assign/v2/option/modifier/framework.hpp>
+#include <boost/assign/v2/option/modifier/repeat.hpp>
+#include <boost/assign/v2/option/modifier/std.hpp>
+
+#endif // BOOST_ASSIGN_V2_OPTION_MODIFIER_ER_2010_HPP
\ No newline at end of file

Added: sandbox/assign_v2/boost/assign/v2/option/modifier/insert.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/option/modifier/insert.hpp 2011-03-28 16:52:35 EDT (Mon, 28 Mar 2011)
@@ -0,0 +1,98 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_OPTION_MODIFIER_INSERT_ER_2010_HPP
+#define BOOST_ASSIGN_V2_OPTION_MODIFIER_INSERT_ER_2010_HPP
+#include <cstddef>
+#include <boost/assign/v2/detail/keyword/ignore.hpp>
+#include <boost/assign/v2/detail/traits/container.hpp>
+#include <boost/assign/v2/detail/config/enable_cpp0x.hpp>
+#include <boost/assign/v2/detail/pp/ignore.hpp>
+#include <boost/assign/v2/interpreter/fwd.hpp>
+#include <boost/assign/v2/option/modifier/framework.hpp>
+#include <boost/call_traits.hpp>
+#include <boost/shared_ptr.hpp>
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+#include <utility>
+#include <boost/type_traits/is_reference.hpp>
+#include <boost/utility/enable_if.hpp>
+#endif
+
+namespace boost{
+namespace assign{
+namespace v2{
+//[syntax_option_insert
+namespace modifier_tag{
+
+ struct insert{};
+
+}// modifier_tag
+namespace interpreter_aux{
+
+ template<>
+ class interpreter_modifier< modifier_tag::insert >/*<-*/
+ {
+
+ typedef keyword_aux::ignore ignore_;
+
+ public:
+ interpreter_modifier(){}
+ interpreter_modifier( ignore_, ignore_ ){}
+
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+
+ template<typename C, typename T>
+ void impl(C& cont, T&& t, data_tag::value )const
+ {
+ cont.insert( std::forward<T>( t ) );
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+#else
+ template<typename C, typename T>
+ void impl(C& cont, T& t, data_tag::value )const
+ {
+ cont.insert( t );
+ }
+
+#endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
+
+ template<typename C, typename T>
+ void impl(C& cont, T& t, data_tag::value_map )const
+ {
+ cont.insert( t );
+ }
+
+ template<typename C, typename T>
+ void impl(C& cont, T& t, data_tag::ptr )const
+ {
+ typedef typename container_aux::value<C>::type value_;
+ cont.insert( new value_( t ) );
+ }
+
+ template<typename C, typename T>
+ void impl( C& cont, T& t, data_tag::ptr_map )const
+ {
+ typedef typename container_aux::key<C>::type key_;
+ key_ k = t.first; // non-const necessary. See ptr_map.
+ typedef typename container_aux::mapped<C>::type m_;
+ cont.insert( k , new m_( t.second ) );
+ }
+
+ }/*->*/;
+
+}// interpreter_aux
+BOOST_ASSIGN_V2_OPTION_MODIFIER_KEYWORD(insert)
+BOOST_ASSIGN_V2_OPTION_MODIFIER_META_MODIFIER_TAG(insert, modifier_tag::insert)
+//]
+}// v2
+}// assign
+}// boost
+
+
+#endif // BOOST_ASSIGN_V2_OPTION_MODIFIER_ITERATE_ER_2010_HPP


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