Added boost header

This commit is contained in:
Christophe Riccio
2012-01-08 01:26:07 +00:00
parent 9c3faaca40
commit c7d752cdf8
8946 changed files with 1732316 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
// Boost.Assign library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is 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)
//
// For more information, see http://www.boost.org/libs/assign/
//
#ifndef BOOST_ASSIGN_ASSIGNMENT_EXCEPTION_HPP
#define BOOST_ASSIGN_ASSIGNMENT_EXCEPTION_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include <exception>
namespace boost
{
namespace assign
{
class assignment_exception : public std::exception
{
public:
assignment_exception( const char* _what )
: what_( _what )
{ }
virtual const char* what() const throw()
{
return what_;
}
private:
const char* what_;
};
}
}
#endif

View File

@@ -0,0 +1,400 @@
// Boost.Assign library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is 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)
//
// For more information, see http://www.boost.org/libs/assign/
//
#ifndef BOOST_ASSIGN_LIST_INSERTER_HPP
#define BOOST_ASSIGN_LIST_INSERTER_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include <boost/detail/workaround.hpp>
#include <boost/mpl/if.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/config.hpp>
#include <cstddef>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/iteration/local.hpp>
#include <boost/preprocessor/arithmetic/inc.hpp>
namespace boost
{
namespace assign_detail
{
template< class T >
struct repeater
{
std::size_t sz;
T val;
repeater( std::size_t sz_, T r ) : sz( sz_ ), val( r )
{ }
};
template< class Fun >
struct fun_repeater
{
std::size_t sz;
Fun val;
fun_repeater( std::size_t sz_, Fun r ) : sz( sz_ ), val( r )
{ }
};
template< class C >
class call_push_back
{
C& c_;
public:
call_push_back( C& c ) : c_( c )
{ }
template< class T >
void operator()( T r )
{
c_.push_back( r );
}
};
template< class C >
class call_push_front
{
C& c_;
public:
call_push_front( C& c ) : c_( c )
{ }
template< class T >
void operator()( T r )
{
c_.push_front( r );
}
};
template< class C >
class call_push
{
C& c_;
public:
call_push( C& c ) : c_( c )
{ }
template< class T >
void operator()( T r )
{
c_.push( r );
}
};
template< class C >
class call_insert
{
C& c_;
public:
call_insert( C& c ) : c_( c )
{ }
template< class T >
void operator()( T r )
{
c_.insert( r );
}
};
template< class C >
class call_add_edge
{
C& c_;
public:
call_add_edge( C& c ) : c_(c)
{ }
template< class T >
void operator()( T l, T r )
{
add_edge( l, r, c_ );
}
template< class T, class EP >
void operator()( T l, T r, const EP& ep )
{
add_edge( l, r, ep, c_ );
}
};
struct forward_n_arguments {};
} // namespace 'assign_detail'
namespace assign
{
template< class T >
inline assign_detail::repeater<T>
repeat( std::size_t sz, T r )
{
return assign_detail::repeater<T>( sz, r );
}
template< class Function >
inline assign_detail::fun_repeater<Function>
repeat_fun( std::size_t sz, Function r )
{
return assign_detail::fun_repeater<Function>( sz, r );
}
template< class Function, class Argument = assign_detail::forward_n_arguments >
class list_inserter
{
struct single_arg_type {};
struct n_arg_type {};
typedef BOOST_DEDUCED_TYPENAME mpl::if_c< is_same<Argument,assign_detail::forward_n_arguments>::value,
n_arg_type,
single_arg_type >::type arg_type;
public:
list_inserter( Function fun ) : insert_( fun )
{}
template< class Function2, class Arg >
list_inserter( const list_inserter<Function2,Arg>& r )
: insert_( r.fun_private() )
{}
list_inserter( const list_inserter& r ) : insert_( r.insert_ )
{}
list_inserter& operator()()
{
insert_( Argument() );
return *this;
}
template< class T >
list_inserter& operator=( const T& r )
{
insert_( r );
return *this;
}
template< class T >
list_inserter& operator=( assign_detail::repeater<T> r )
{
return operator,( r );
}
template< class Nullary_function >
list_inserter& operator=( const assign_detail::fun_repeater<Nullary_function>& r )
{
return operator,( r );
}
template< class T >
list_inserter& operator,( const T& r )
{
insert_( r );
return *this;
}
#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205))
template< class T >
list_inserter& operator,( const assign_detail::repeater<T> & r )
{
return repeat( r.sz, r.val );
}
#else
template< class T >
list_inserter& operator,( assign_detail::repeater<T> r )
{
return repeat( r.sz, r.val );
}
#endif
template< class Nullary_function >
list_inserter& operator,( const assign_detail::fun_repeater<Nullary_function>& r )
{
return repeat_fun( r.sz, r.val );
}
template< class T >
list_inserter& repeat( std::size_t sz, T r )
{
std::size_t i = 0;
while( i++ != sz )
insert_( r );
return *this;
}
template< class Nullary_function >
list_inserter& repeat_fun( std::size_t sz, Nullary_function fun )
{
std::size_t i = 0;
while( i++ != sz )
insert_( fun() );
return *this;
}
template< class SinglePassIterator >
list_inserter& range( SinglePassIterator first,
SinglePassIterator last )
{
for( ; first != last; ++first )
insert_( *first );
return *this;
}
template< class SinglePassRange >
list_inserter& range( const SinglePassRange& r )
{
return range( boost::begin(r), boost::end(r) );
}
template< class T >
list_inserter& operator()( const T& t )
{
insert_( t );
return *this;
}
#ifndef BOOST_ASSIGN_MAX_PARAMS // use user's value
#define BOOST_ASSIGN_MAX_PARAMS 5
#endif
#define BOOST_ASSIGN_MAX_PARAMETERS (BOOST_ASSIGN_MAX_PARAMS - 1)
#define BOOST_ASSIGN_PARAMS1(n) BOOST_PP_ENUM_PARAMS(n, class T)
#define BOOST_ASSIGN_PARAMS2(n) BOOST_PP_ENUM_BINARY_PARAMS(n, T, const& t)
#define BOOST_ASSIGN_PARAMS3(n) BOOST_PP_ENUM_PARAMS(n, t)
#define BOOST_PP_LOCAL_LIMITS (1, BOOST_ASSIGN_MAX_PARAMETERS)
#define BOOST_PP_LOCAL_MACRO(n) \
template< class T, BOOST_ASSIGN_PARAMS1(n) > \
list_inserter& operator()(T t, BOOST_ASSIGN_PARAMS2(n) ) \
{ \
BOOST_PP_CAT(insert, BOOST_PP_INC(n))(t, BOOST_ASSIGN_PARAMS3(n), arg_type()); \
return *this; \
} \
/**/
#include BOOST_PP_LOCAL_ITERATE()
#define BOOST_PP_LOCAL_LIMITS (1, BOOST_ASSIGN_MAX_PARAMETERS)
#define BOOST_PP_LOCAL_MACRO(n) \
template< class T, BOOST_ASSIGN_PARAMS1(n) > \
void BOOST_PP_CAT(insert, BOOST_PP_INC(n))(T const& t, BOOST_ASSIGN_PARAMS2(n), single_arg_type) \
{ \
insert_( Argument(t, BOOST_ASSIGN_PARAMS3(n) )); \
} \
/**/
#include BOOST_PP_LOCAL_ITERATE()
#define BOOST_PP_LOCAL_LIMITS (1, BOOST_ASSIGN_MAX_PARAMETERS)
#define BOOST_PP_LOCAL_MACRO(n) \
template< class T, BOOST_ASSIGN_PARAMS1(n) > \
void BOOST_PP_CAT(insert, BOOST_PP_INC(n))(T const& t, BOOST_ASSIGN_PARAMS2(n), n_arg_type) \
{ \
insert_(t, BOOST_ASSIGN_PARAMS3(n) ); \
} \
/**/
#include BOOST_PP_LOCAL_ITERATE()
Function fun_private() const
{
return insert_;
}
private:
list_inserter& operator=( const list_inserter& );
Function insert_;
};
template< class Function >
inline list_inserter< Function >
make_list_inserter( Function fun )
{
return list_inserter< Function >( fun );
}
template< class Function, class Argument >
inline list_inserter<Function,Argument>
make_list_inserter( Function fun, Argument* )
{
return list_inserter<Function,Argument>( fun );
}
template< class C >
inline list_inserter< assign_detail::call_push_back<C>,
BOOST_DEDUCED_TYPENAME C::value_type >
push_back( C& c )
{
static BOOST_DEDUCED_TYPENAME C::value_type* p = 0;
return make_list_inserter( assign_detail::call_push_back<C>( c ),
p );
}
template< class C >
inline list_inserter< assign_detail::call_push_front<C>,
BOOST_DEDUCED_TYPENAME C::value_type >
push_front( C& c )
{
static BOOST_DEDUCED_TYPENAME C::value_type* p = 0;
return make_list_inserter( assign_detail::call_push_front<C>( c ),
p );
}
template< class C >
inline list_inserter< assign_detail::call_insert<C>,
BOOST_DEDUCED_TYPENAME C::value_type >
insert( C& c )
{
static BOOST_DEDUCED_TYPENAME C::value_type* p = 0;
return make_list_inserter( assign_detail::call_insert<C>( c ),
p );
}
template< class C >
inline list_inserter< assign_detail::call_push<C>,
BOOST_DEDUCED_TYPENAME C::value_type >
push( C& c )
{
static BOOST_DEDUCED_TYPENAME C::value_type* p = 0;
return make_list_inserter( assign_detail::call_push<C>( c ),
p );
}
template< class C >
inline list_inserter< assign_detail::call_add_edge<C> >
add_edge( C& c )
{
return make_list_inserter( assign_detail::call_add_edge<C>( c ) );
}
} // namespace 'assign'
} // namespace 'boost'
#undef BOOST_ASSIGN_PARAMS1
#undef BOOST_ASSIGN_PARAMS2
#undef BOOST_ASSIGN_PARAMS3
#undef BOOST_ASSIGN_MAX_PARAMETERS
#endif

681
test/external/boost/assign/list_of.hpp vendored Normal file
View File

@@ -0,0 +1,681 @@
// Boost.Assign library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is 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)
//
// For more information, see http://www.boost.org/libs/assign/
//
#ifndef BOOST_ASSIGN_LIST_OF_HPP
#define BOOST_ASSIGN_LIST_OF_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include <boost/assign/assignment_exception.hpp>
#include <boost/range/iterator_range.hpp>
#include <boost/config.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/type_traits/is_reference.hpp>
#include <boost/static_assert.hpp>
#include <boost/type_traits/detail/yes_no_type.hpp>
#include <boost/type_traits/decay.hpp>
#include <boost/type_traits/is_array.hpp>
#include <boost/mpl/if.hpp>
#include <deque>
#include <cstddef>
#include <utility>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/iteration/local.hpp>
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
// BCB requires full type definition for is_array<> to work correctly.
#include <boost/array.hpp>
#endif
namespace boost
{
// this here is necessary to avoid compiler error in <boost/array.hpp>
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
template< class T, std::size_t sz >
class array;
#endif
namespace assign_detail
{
/////////////////////////////////////////////////////////////////////////
// Part 0: common conversion code
/////////////////////////////////////////////////////////////////////////
template< class T >
struct assign_decay
{
//
// Add constness to array parameters
// to support string literals properly
//
typedef BOOST_DEDUCED_TYPENAME mpl::eval_if<
::boost::is_array<T>,
::boost::decay<const T>,
::boost::decay<T> >::type type;
};
template< class T, std::size_t sz >
type_traits::yes_type assign_is_array( const array<T,sz>* );
type_traits::no_type assign_is_array( ... );
template< class T, class U >
type_traits::yes_type assign_is_pair( const std::pair<T,U>* );
type_traits::no_type assign_is_pair( ... );
struct array_type_tag
{
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
private:
char dummy_; // BCB would by default use 8 bytes
#endif
};
struct adapter_type_tag
{
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
private:
char dummy_; // BCB would by default use 8 bytes
#endif
};
struct pair_type_tag
{
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
private:
char dummy_; // BCB would by default use 8 bytes
#endif
};
struct default_type_tag
{
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
private:
char dummy_; // BCB would by default use 8 bytes
#endif
};
template< class DerivedTAssign, class Iterator >
class converter
{
public: // Range operations
typedef Iterator iterator;
typedef Iterator const_iterator;
iterator begin() const
{
return static_cast<const DerivedTAssign*>(this)->begin();
}
iterator end() const
{
return static_cast<const DerivedTAssign*>(this)->end();
}
public:
template< class Container >
Container convert_to_container() const
{
static Container* c = 0;
BOOST_STATIC_CONSTANT( bool, is_array_flag = sizeof( assign_detail::assign_is_array( c ) )
== sizeof( type_traits::yes_type ) );
typedef BOOST_DEDUCED_TYPENAME mpl::if_c< is_array_flag,
array_type_tag,
default_type_tag >::type tag_type;
return convert<Container>( c, tag_type() );
}
private:
template< class Container >
Container convert( const Container*, default_type_tag ) const
{
#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1)
// old Dinkumware doesn't support iterator type as template
Container result;
iterator it = begin(),
e = end();
while( it != e )
{
result.insert( result.end(), *it );
++it;
}
return result;
#else
return Container( begin(), end() );
#endif
}
template< class Array >
Array convert( const Array*, array_type_tag ) const
{
typedef BOOST_DEDUCED_TYPENAME Array::value_type value_type;
#if BOOST_WORKAROUND(BOOST_INTEL, <= 910 ) || BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580 )
BOOST_DEDUCED_TYPENAME remove_const<Array>::type ar;
#else
Array ar;
#endif
const std::size_t sz = ar.size();
if( sz < static_cast<const DerivedTAssign*>(this)->size() )
throw assign::assignment_exception( "array initialized with too many elements" );
std::size_t n = 0;
iterator i = begin(),
e = end();
for( ; i != e; ++i, ++n )
ar[n] = *i;
for( ; n < sz; ++n )
ar[n] = value_type();
return ar;
}
template< class Adapter >
Adapter convert_to_adapter( const Adapter* = 0 ) const
{
Adapter a;
iterator i = begin(),
e = end();
for( ; i != e; ++i )
a.push( *i );
return a;
}
private:
struct adapter_converter;
friend struct adapter_converter;
struct adapter_converter
{
const converter& gl;
adapter_converter( const converter& this_ ) : gl( this_ )
{}
adapter_converter( const adapter_converter& r )
: gl( r.gl )
{ }
template< class Adapter >
operator Adapter() const
{
return gl.convert_to_adapter<Adapter>();
}
};
public:
template< class Container >
Container to_container( Container& c ) const
{
return convert( &c, default_type_tag() );
}
adapter_converter to_adapter() const
{
return adapter_converter( *this );
}
template< class Adapter >
Adapter to_adapter( Adapter& a ) const
{
return this->convert_to_adapter( &a );
}
template< class Array >
Array to_array( Array& a ) const
{
return convert( &a, array_type_tag() );
}
};
template< class T, class I, class Range >
inline bool operator==( const converter<T,I>& l, const Range& r )
{
return ::boost::iterator_range_detail::equal( l, r );
}
template< class T, class I, class Range >
inline bool operator==( const Range& l, const converter<T,I>& r )
{
return r == l;
}
template< class T, class I, class Range >
inline bool operator!=( const converter<T,I>& l, const Range& r )
{
return !( l == r );
}
template< class T, class I, class Range >
inline bool operator!=( const Range& l, const converter<T,I>& r )
{
return !( l == r );
}
template< class T, class I, class Range >
inline bool operator<( const converter<T,I>& l, const Range& r )
{
return ::boost::iterator_range_detail::less_than( l, r );
}
template< class T, class I, class Range >
inline bool operator<( const Range& l, const converter<T,I>& r )
{
return ::boost::iterator_range_detail::less_than( l, r );
}
template< class T, class I, class Range >
inline bool operator>( const converter<T,I>& l, const Range& r )
{
return r < l;
}
template< class T, class I, class Range >
inline bool operator>( const Range& l, const converter<T,I>& r )
{
return r < l;
}
template< class T, class I, class Range >
inline bool operator<=( const converter<T,I>& l, const Range& r )
{
return !( l > r );
}
template< class T, class I, class Range >
inline bool operator<=( const Range& l, const converter<T,I>& r )
{
return !( l > r );
}
template< class T, class I, class Range >
inline bool operator>=( const converter<T,I>& l, const Range& r )
{
return !( l < r );
}
template< class T, class I, class Range >
inline bool operator>=( const Range& l, const converter<T,I>& r )
{
return !( l < r );
}
template< class T, class I, class Elem, class Traits >
inline std::basic_ostream<Elem,Traits>&
operator<<( std::basic_ostream<Elem, Traits>& Os,
const converter<T,I>& r )
{
return Os << ::boost::make_iterator_range( r.begin(), r.end() );
}
/////////////////////////////////////////////////////////////////////////
// Part 1: flexible, but inefficient interface
/////////////////////////////////////////////////////////////////////////
template< class T >
class generic_list :
public converter< generic_list< BOOST_DEDUCED_TYPENAME assign_decay<T>::type >,
BOOST_DEDUCED_TYPENAME std::deque<BOOST_DEDUCED_TYPENAME
assign_decay<T>::type>::iterator >
{
typedef BOOST_DEDUCED_TYPENAME assign_decay<T>::type Ty;
typedef std::deque<Ty> impl_type;
mutable impl_type values_;
public:
typedef BOOST_DEDUCED_TYPENAME impl_type::iterator iterator;
typedef iterator const_iterator;
typedef BOOST_DEDUCED_TYPENAME impl_type::value_type value_type;
typedef BOOST_DEDUCED_TYPENAME impl_type::size_type size_type;
typedef BOOST_DEDUCED_TYPENAME impl_type::difference_type difference_type;
public:
iterator begin() const { return values_.begin(); }
iterator end() const { return values_.end(); }
bool empty() const { return values_.empty(); }
size_type size() const { return values_.size(); }
private:
void push_back( value_type r ) { values_.push_back( r ); }
public:
generic_list& operator,( const Ty& u )
{
this->push_back( u );
return *this;
}
generic_list& operator()()
{
this->push_back( Ty() );
return *this;
}
generic_list& operator()( const Ty& u )
{
this->push_back( u );
return *this;
}
#ifndef BOOST_ASSIGN_MAX_PARAMS // use user's value
#define BOOST_ASSIGN_MAX_PARAMS 5
#endif
#define BOOST_ASSIGN_MAX_PARAMETERS (BOOST_ASSIGN_MAX_PARAMS - 1)
#define BOOST_ASSIGN_PARAMS1(n) BOOST_PP_ENUM_PARAMS(n, class U)
#define BOOST_ASSIGN_PARAMS2(n) BOOST_PP_ENUM_BINARY_PARAMS(n, U, const& u)
#define BOOST_ASSIGN_PARAMS3(n) BOOST_PP_ENUM_PARAMS(n, u)
#define BOOST_ASSIGN_PARAMS4(n) BOOST_PP_ENUM_PARAMS(n, U)
#define BOOST_ASSIGN_PARAMS2_NO_REF(n) BOOST_PP_ENUM_BINARY_PARAMS(n, U, u)
#define BOOST_PP_LOCAL_LIMITS (1, BOOST_ASSIGN_MAX_PARAMETERS)
#define BOOST_PP_LOCAL_MACRO(n) \
template< class U, BOOST_ASSIGN_PARAMS1(n) > \
generic_list& operator()(U const& u, BOOST_ASSIGN_PARAMS2(n) ) \
{ \
this->push_back( Ty(u, BOOST_ASSIGN_PARAMS3(n))); \
return *this; \
} \
/**/
#include BOOST_PP_LOCAL_ITERATE()
template< class U >
generic_list& repeat( std::size_t sz, U u )
{
std::size_t i = 0;
while( i++ != sz )
this->push_back( u );
return *this;
}
template< class Nullary_function >
generic_list& repeat_fun( std::size_t sz, Nullary_function fun )
{
std::size_t i = 0;
while( i++ != sz )
this->push_back( fun() );
return *this;
}
template< class SinglePassIterator >
generic_list& range( SinglePassIterator first,
SinglePassIterator last )
{
for( ; first != last; ++first )
this->push_back( *first );
return *this;
}
template< class SinglePassRange >
generic_list& range( const SinglePassRange& r )
{
return range( boost::begin(r), boost::end(r) );
}
template< class Container >
operator Container() const
{
return this-> BOOST_NESTED_TEMPLATE convert_to_container<Container>();
}
};
/////////////////////////////////////////////////////////////////////////
// Part 2: efficient, but inconvenient interface
/////////////////////////////////////////////////////////////////////////
template< class T >
struct assign_reference
{
assign_reference()
{ /* intentionally empty */ }
assign_reference( T& r ) : ref_(&r)
{ }
void operator=( T& r )
{
ref_ = &r;
}
operator T&() const
{
return *ref_;
}
void swap( assign_reference& r )
{
std::swap( *ref_, *r.ref_ );
}
T& get_ref() const
{
return *ref_;
}
private:
T* ref_;
};
template< class T >
inline bool operator<( const assign_reference<T>& l,
const assign_reference<T>& r )
{
return l.get_ref() < r.get_ref();
}
template< class T >
inline bool operator>( const assign_reference<T>& l,
const assign_reference<T>& r )
{
return l.get_ref() > r.get_ref();
}
template< class T >
inline void swap( assign_reference<T>& l,
assign_reference<T>& r )
{
l.swap( r );
}
template< class T, int N >
struct static_generic_list :
public converter< static_generic_list<T,N>, assign_reference<T>* >
{
private:
typedef T internal_value_type;
public:
typedef assign_reference<internal_value_type> value_type;
typedef value_type* iterator;
typedef value_type* const_iterator;
typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type;
static_generic_list( T& r ) :
current_(1)
{
refs_[0] = r;
}
static_generic_list& operator()( T& r )
{
insert( r );
return *this;
}
iterator begin() const
{
return &refs_[0];
}
iterator end() const
{
return &refs_[current_];
}
size_type size() const
{
return static_cast<size_type>( current_ );
}
bool empty() const
{
return false;
}
template< class ForwardIterator >
static_generic_list& range( ForwardIterator first,
ForwardIterator last )
{
for( ; first != last; ++first )
this->insert( *first );
return *this;
}
template< class ForwardRange >
static_generic_list& range( ForwardRange& r )
{
return range( boost::begin(r), boost::end(r) );
}
template< class ForwardRange >
static_generic_list& range( const ForwardRange& r )
{
return range( boost::begin(r), boost::end(r) );
}
template< class Container >
operator Container() const
{
return this-> BOOST_NESTED_TEMPLATE convert_to_container<Container>();
}
private:
void insert( T& r )
{
refs_[current_] = r;
++current_;
}
static_generic_list();
mutable assign_reference<internal_value_type> refs_[N];
int current_;
};
} // namespace 'assign_detail'
namespace assign
{
template< class T >
inline assign_detail::generic_list<T>
list_of()
{
return assign_detail::generic_list<T>()( T() );
}
template< class T >
inline assign_detail::generic_list<T>
list_of( const T& t )
{
return assign_detail::generic_list<T>()( t );
}
template< int N, class T >
inline assign_detail::static_generic_list< BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<T>::type,N>
ref_list_of( T& t )
{
return assign_detail::static_generic_list<BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<T>::type,N>( t );
}
template< int N, class T >
inline assign_detail::static_generic_list<const BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<T>::type,N>
cref_list_of( const T& t )
{
return assign_detail::static_generic_list<const BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<T>::type,N>( t );
}
#define BOOST_PP_LOCAL_LIMITS (1, BOOST_ASSIGN_MAX_PARAMETERS)
#define BOOST_PP_LOCAL_MACRO(n) \
template< class T, class U, BOOST_ASSIGN_PARAMS1(n) > \
inline assign_detail::generic_list<T> \
list_of(U const& u, BOOST_ASSIGN_PARAMS2(n) ) \
{ \
return assign_detail::generic_list<T>()(u, BOOST_ASSIGN_PARAMS3(n)); \
} \
/**/
#include BOOST_PP_LOCAL_ITERATE()
#define BOOST_PP_LOCAL_LIMITS (1, BOOST_ASSIGN_MAX_PARAMETERS)
#define BOOST_PP_LOCAL_MACRO(n) \
template< class U, BOOST_ASSIGN_PARAMS1(n) > \
inline assign_detail::generic_list< tuple<U, BOOST_ASSIGN_PARAMS4(n)> > \
tuple_list_of(U u, BOOST_ASSIGN_PARAMS2_NO_REF(n) ) \
{ \
return assign_detail::generic_list< tuple<U, BOOST_ASSIGN_PARAMS4(n)> >()( tuple<U,BOOST_ASSIGN_PARAMS4(n)>( u, BOOST_ASSIGN_PARAMS3(n) )); \
} \
/**/
#include BOOST_PP_LOCAL_ITERATE()
template< class Key, class T >
inline assign_detail::generic_list< std::pair
<
BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<Key>::type,
BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<T>::type
> >
map_list_of( const Key& k, const T& t )
{
typedef BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<Key>::type k_type;
typedef BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<T>::type t_type;
return assign_detail::generic_list< std::pair<k_type,t_type> >()( k, t );
}
template< class F, class S >
inline assign_detail::generic_list< std::pair
<
BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<F>::type,
BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<S>::type
> >
pair_list_of( const F& f, const S& s )
{
return map_list_of( f, s );
}
} // namespace 'assign'
} // namespace 'boost'
#undef BOOST_ASSIGN_PARAMS1
#undef BOOST_ASSIGN_PARAMS2
#undef BOOST_ASSIGN_PARAMS3
#undef BOOST_ASSIGN_PARAMS4
#undef BOOST_ASSIGN_PARAMS2_NO_REF
#undef BOOST_ASSIGN_MAX_PARAMETERS
#endif

View File

@@ -0,0 +1,164 @@
// Boost.Assign library
//
// Copyright Thorsten Ottosen 2003-2005. Use, modification and
// distribution is 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)
//
// For more information, see http://www.boost.org/libs/assign/
//
#ifndef BOOST_ASSIGN_PTR_LIST_INSERTER_HPP
#define BOOST_ASSIGN_PTR_LIST_INSERTER_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include <boost/assign/list_inserter.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/type_traits/remove_pointer.hpp>
namespace boost
{
namespace assign
{
template< class Function, class Obj >
class ptr_list_inserter
{
typedef BOOST_DEDUCED_TYPENAME
remove_pointer< BOOST_DEDUCED_TYPENAME
remove_reference<Obj>::type >::type
obj_type;
public:
ptr_list_inserter( Function fun ) : insert_( fun )
{}
template< class Function2, class Obj2 >
ptr_list_inserter( const ptr_list_inserter<Function2,Obj2>& r )
: insert_( r.fun_private() )
{}
ptr_list_inserter( const ptr_list_inserter& r ) : insert_( r.insert_ )
{}
ptr_list_inserter& operator()()
{
insert_( new obj_type() );
return *this;
}
template< class T >
ptr_list_inserter& operator()( const T& t )
{
insert_( new obj_type(t) );
return *this;
}
#ifndef BOOST_ASSIGN_MAX_PARAMS // use user's value
#define BOOST_ASSIGN_MAX_PARAMS 5
#endif
#define BOOST_ASSIGN_MAX_PARAMETERS (BOOST_ASSIGN_MAX_PARAMS - 1)
#define BOOST_ASSIGN_PARAMS1(n) BOOST_PP_ENUM_PARAMS(n, class T)
#define BOOST_ASSIGN_PARAMS2(n) BOOST_PP_ENUM_BINARY_PARAMS(n, T, const& t)
#define BOOST_ASSIGN_PARAMS3(n) BOOST_PP_ENUM_PARAMS(n, t)
#define BOOST_PP_LOCAL_LIMITS (1, BOOST_ASSIGN_MAX_PARAMETERS)
#define BOOST_PP_LOCAL_MACRO(n) \
template< class T, BOOST_ASSIGN_PARAMS1(n) > \
ptr_list_inserter& operator()( const T& t, BOOST_ASSIGN_PARAMS2(n) ) \
{ \
insert_( new obj_type(t, BOOST_ASSIGN_PARAMS3(n) )); \
return *this; \
} \
/**/
#include BOOST_PP_LOCAL_ITERATE()
private:
ptr_list_inserter& operator=( const ptr_list_inserter& );
Function insert_;
};
template< class Obj, class Function >
inline ptr_list_inserter< Function, Obj >
make_ptr_list_inserter( Function fun )
{
return ptr_list_inserter< Function, Obj >( fun );
}
template< class C >
inline ptr_list_inserter< assign_detail::call_push_back<C>,
BOOST_DEDUCED_TYPENAME C::reference >
ptr_push_back( C& c )
{
return make_ptr_list_inserter<BOOST_DEDUCED_TYPENAME C::reference>
( assign_detail::call_push_back<C>( c ) );
}
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< class T, class C >
inline ptr_list_inserter< assign_detail::call_push_back<C>, T >
ptr_push_back( C& c )
{
return make_ptr_list_inserter<T>(
assign_detail::call_push_back<C>( c ) );
}
#endif
template< class C >
inline ptr_list_inserter< assign_detail::call_push_front<C>,
BOOST_DEDUCED_TYPENAME C::reference >
ptr_push_front( C& c )
{
return make_ptr_list_inserter<BOOST_DEDUCED_TYPENAME C::reference>
( assign_detail::call_push_front<C>( c ) );
}
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< class T, class C >
inline ptr_list_inserter< assign_detail::call_push_front<C>, T >
ptr_push_front( C& c )
{
return make_ptr_list_inserter<T>(
assign_detail::call_push_front<C>( c ) );
}
#endif
template< class C >
inline ptr_list_inserter< assign_detail::call_insert<C>,
BOOST_DEDUCED_TYPENAME C::reference>
ptr_insert( C& c )
{
return make_ptr_list_inserter<BOOST_DEDUCED_TYPENAME C::reference>
( assign_detail::call_insert<C>( c ) );
}
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< class T, class C >
inline ptr_list_inserter< assign_detail::call_insert<C>, T >
ptr_insert( C& c )
{
return make_ptr_list_inserter<T>( assign_detail::call_insert<C>( c ) );
}
#endif
} // namespace 'assign'
} // namespace 'boost'
#undef BOOST_ASSIGN_PARAMS1
#undef BOOST_ASSIGN_PARAMS2
#undef BOOST_ASSIGN_PARAMS3
#undef BOOST_ASSIGN_MAX_PARAMETERS
#endif

View File

@@ -0,0 +1,191 @@
// Boost.Assign library
//
// Copyright Thorsten Ottosen 2003-2005. Use, modification and
// distribution is 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)
//
// For more information, see http://www.boost.org/libs/assign/
//
#ifndef BOOST_ASSIGN_PTR_LIST_OF_HPP
#define BOOST_ASSIGN_PTR_LIST_OF_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include <boost/assign/list_of.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/type_traits/is_reference.hpp>
#include <boost/static_assert.hpp>
#include <boost/type_traits/detail/yes_no_type.hpp>
#include <boost/type_traits/decay.hpp>
#include <boost/type_traits/is_array.hpp>
#include <boost/mpl/if.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/iteration/local.hpp>
namespace boost
{
namespace assign_detail
{
/////////////////////////////////////////////////////////////////////////
// Part 1: flexible and efficient interface
/////////////////////////////////////////////////////////////////////////
template< class T >
class generic_ptr_list :
public converter< generic_ptr_list<T>,
BOOST_DEDUCED_TYPENAME boost::ptr_vector<T>::iterator >
{
protected:
typedef boost::ptr_vector<T> impl_type;
typedef std::auto_ptr<impl_type> release_type;
mutable impl_type values_;
public:
typedef BOOST_DEDUCED_TYPENAME impl_type::iterator iterator;
typedef iterator const_iterator;
typedef BOOST_DEDUCED_TYPENAME impl_type::value_type value_type;
typedef BOOST_DEDUCED_TYPENAME impl_type::size_type size_type;
typedef BOOST_DEDUCED_TYPENAME impl_type::difference_type difference_type;
public:
generic_ptr_list() : values_( 32u )
{ }
generic_ptr_list( release_type r ) : values_(r)
{ }
release_type release()
{
return values_.release();
}
public:
iterator begin() const { return values_.begin(); }
iterator end() const { return values_.end(); }
bool empty() const { return values_.empty(); }
size_type size() const { return values_.size(); }
public:
operator impl_type() const
{
return values_;
}
template< template<class,class,class> class Seq, class U,
class CA, class A >
operator Seq<U,CA,A>() const
{
Seq<U,CA,A> result;
result.transfer( result.end(), values_ );
BOOST_ASSERT( empty() );
return result;
}
template< class PtrContainer >
std::auto_ptr<PtrContainer> convert( const PtrContainer* c ) const
{
std::auto_ptr<PtrContainer> res( new PtrContainer() );
while( !empty() )
res->insert( res->end(),
values_.pop_back().release() );
return res;
}
template< class PtrContainer >
std::auto_ptr<PtrContainer> to_container( const PtrContainer& c ) const
{
return convert( &c );
}
protected:
void push_back( T* r ) { values_.push_back( r ); }
public:
generic_ptr_list& operator()()
{
this->push_back( new T() );
return *this;
}
template< class U >
generic_ptr_list& operator()( const U& u )
{
this->push_back( new T(u) );
return *this;
}
#ifndef BOOST_ASSIGN_MAX_PARAMS // use user's value
#define BOOST_ASSIGN_MAX_PARAMS 5
#endif
#define BOOST_ASSIGN_MAX_PARAMETERS (BOOST_ASSIGN_MAX_PARAMS - 1)
#define BOOST_ASSIGN_PARAMS1(n) BOOST_PP_ENUM_PARAMS(n, class U)
#define BOOST_ASSIGN_PARAMS2(n) BOOST_PP_ENUM_BINARY_PARAMS(n, U, const& u)
#define BOOST_ASSIGN_PARAMS3(n) BOOST_PP_ENUM_PARAMS(n, u)
#define BOOST_PP_LOCAL_LIMITS (1, BOOST_ASSIGN_MAX_PARAMETERS)
#define BOOST_PP_LOCAL_MACRO(n) \
template< class U, BOOST_ASSIGN_PARAMS1(n) > \
generic_ptr_list& operator()(U const& u, BOOST_ASSIGN_PARAMS2(n) ) \
{ \
this->push_back( new T(u, BOOST_ASSIGN_PARAMS3(n))); \
return *this; \
} \
/**/
#include BOOST_PP_LOCAL_ITERATE()
}; // class 'generic_ptr_list'
} // namespace 'assign_detail'
namespace assign
{
template< class T >
inline assign_detail::generic_ptr_list<T>
ptr_list_of()
{
return assign_detail::generic_ptr_list<T>()();
}
template< class T, class U >
inline assign_detail::generic_ptr_list<T>
ptr_list_of( const U& t )
{
return assign_detail::generic_ptr_list<T>()( t );
}
#define BOOST_PP_LOCAL_LIMITS (1, BOOST_ASSIGN_MAX_PARAMETERS)
#define BOOST_PP_LOCAL_MACRO(n) \
template< class T, class U, BOOST_ASSIGN_PARAMS1(n) > \
inline assign_detail::generic_ptr_list<T> \
ptr_list_of(U const& u, BOOST_ASSIGN_PARAMS2(n) ) \
{ \
return assign_detail::generic_ptr_list<T>()(u, BOOST_ASSIGN_PARAMS3(n)); \
} \
/**/
#include BOOST_PP_LOCAL_ITERATE()
} // namespace 'assign'
} // namespace 'boost'
#undef BOOST_ASSIGN_PARAMS1
#undef BOOST_ASSIGN_PARAMS2
#undef BOOST_ASSIGN_PARAMS3
#undef BOOST_ASSIGN_MAX_PARAMETERS
#endif

View File

@@ -0,0 +1,103 @@
// Boost.Assign library
//
// Copyright Thorsten Ottosen 2006. Use, modification and
// distribution is 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)
//
// For more information, see http://www.boost.org/libs/assign/
//
#ifndef BOOST_ASSIGN_PTR_CONTAINER_PTR_MAP_INSERTER_HPP
#define BOOST_ASSIGN_PTR_CONTAINER_PTR_MAP_INSERTER_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include <boost/assign/list_inserter.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/type_traits/remove_pointer.hpp>
namespace boost
{
namespace assign
{
template< class PtrMap, class Obj >
class ptr_map_inserter
{
typedef BOOST_DEDUCED_TYPENAME
remove_pointer< BOOST_DEDUCED_TYPENAME
remove_reference<Obj>::type >::type
obj_type;
typedef BOOST_DEDUCED_TYPENAME PtrMap::key_type
key_type;
public:
ptr_map_inserter( PtrMap& m ) : m_( m )
{}
template< class Key >
ptr_map_inserter& operator()( const Key& t )
{
key_type k(t);
m_.insert( k, new obj_type );
return *this;
}
#ifndef BOOST_ASSIGN_MAX_PARAMS // use user's value
#define BOOST_ASSIGN_MAX_PARAMS 6
#endif
#define BOOST_ASSIGN_MAX_PARAMETERS (BOOST_ASSIGN_MAX_PARAMS - 1)
#define BOOST_ASSIGN_PARAMS1(n) BOOST_PP_ENUM_PARAMS(n, class T)
#define BOOST_ASSIGN_PARAMS2(n) BOOST_PP_ENUM_BINARY_PARAMS(n, T, const& t)
#define BOOST_ASSIGN_PARAMS3(n) BOOST_PP_ENUM_PARAMS(n, t)
#define BOOST_PP_LOCAL_LIMITS (1, BOOST_ASSIGN_MAX_PARAMETERS)
#define BOOST_PP_LOCAL_MACRO(n) \
template< class T, BOOST_ASSIGN_PARAMS1(n) > \
ptr_map_inserter& operator()( const T& t, BOOST_ASSIGN_PARAMS2(n) ) \
{ \
key_type k(t); \
m_.insert( k, new obj_type( BOOST_ASSIGN_PARAMS3(n) ) ); \
return *this; \
} \
/**/
#include BOOST_PP_LOCAL_ITERATE()
private:
ptr_map_inserter& operator=( const ptr_map_inserter& );
PtrMap& m_;
};
template< class PtrMap >
inline ptr_map_inserter< PtrMap, typename PtrMap::mapped_reference >
ptr_map_insert( PtrMap& m )
{
return ptr_map_inserter< PtrMap, typename PtrMap::mapped_reference >( m );
}
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< class T, class PtrMap >
inline ptr_map_inserter< PtrMap, T >
ptr_map_insert( PtrMap& m )
{
return ptr_map_inserter< PtrMap, T >( m );
}
#endif
} // namespace 'assign'
} // namespace 'boost'
#undef BOOST_ASSIGN_PARAMS1
#undef BOOST_ASSIGN_PARAMS2
#undef BOOST_ASSIGN_PARAMS3
#undef BOOST_ASSIGN_MAX_PARAMETERS
#endif

27
test/external/boost/assign/std.hpp vendored Normal file
View File

@@ -0,0 +1,27 @@
// Boost.Assign library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is 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)
//
// For more information, see http://www.boost.org/libs/assign/
//
#ifndef BOOST_ASSIGN_STD_HPP
#define BOOST_ASSIGN_STD_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include <boost/assign/std/vector.hpp>
#include <boost/assign/std/deque.hpp>
#include <boost/assign/std/list.hpp>
#include <boost/assign/std/slist.hpp>
#include <boost/assign/std/stack.hpp>
#include <boost/assign/std/queue.hpp>
#include <boost/assign/std/set.hpp>
#include <boost/assign/std/map.hpp>
#endif

View File

@@ -0,0 +1,38 @@
// Boost.Assign library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is 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)
//
// For more information, see http://www.boost.org/libs/assign/
//
#ifndef BOOST_ASSIGN_STD_DEQUE_HPP
#define BOOST_ASSIGN_STD_DEQUE_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include <boost/assign/list_inserter.hpp>
#include <boost/config.hpp>
#include <deque>
namespace boost
{
namespace assign
{
template< class V, class A, class V2 >
inline list_inserter< assign_detail::call_push_back< std::deque<V,A> >, V >
operator+=( std::deque<V,A>& c, V2 v )
{
return push_back( c )( v );
}
}
}
#endif

38
test/external/boost/assign/std/list.hpp vendored Normal file
View File

@@ -0,0 +1,38 @@
// Boost.Assign library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is 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)
//
// For more information, see http://www.boost.org/libs/assign/
//
#ifndef BOOST_ASSIGN_STD_LIST_HPP
#define BOOST_ASSIGN_STD_LIST_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include <boost/assign/list_inserter.hpp>
#include <boost/config.hpp>
#include <list>
namespace boost
{
namespace assign
{
template< class V, class A, class V2 >
inline list_inserter< assign_detail::call_push_back< std::list<V,A> >, V >
operator+=( std::list<V,A>& c, V2 v )
{
return push_back( c )( v );
}
}
}
#endif

45
test/external/boost/assign/std/map.hpp vendored Normal file
View File

@@ -0,0 +1,45 @@
// Boost.Assign library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is 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)
//
// For more information, see http://www.boost.org/libs/assign/
//
#ifndef BOOST_ASSIGN_STD_MAP_HPP
#define BOOST_ASSIGN_STD_MAP_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include <boost/assign/list_inserter.hpp>
#include <boost/config.hpp>
#include <map>
namespace boost
{
namespace assign
{
template< class K, class V, class C, class A, class P >
inline list_inserter< assign_detail::call_insert< std::map<K,V,C,A> >, P >
operator+=( std::map<K,V,C,A>& m, const P& p )
{
return insert( m )( p );
}
template< class K, class V, class C, class A, class P >
inline list_inserter< assign_detail::call_insert< std::multimap<K,V,C,A> >, P >
operator+=( std::multimap<K,V,C,A>& m, const P& p )
{
return insert( m )( p );
}
}
}
#endif

View File

@@ -0,0 +1,45 @@
// Boost.Assign library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is 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)
//
// For more information, see http://www.boost.org/libs/assign/
//
#ifndef BOOST_ASSIGN_STD_QUEUE_HPP
#define BOOST_ASSIGN_STD_QUEUE_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include <boost/assign/list_inserter.hpp>
#include <boost/config.hpp>
#include <queue>
namespace boost
{
namespace assign
{
template< class V, class C, class V2 >
inline list_inserter< assign_detail::call_push< std::queue<V,C> >, V >
operator+=( std::queue<V,C>& c, V2 v )
{
return push( c )( v );
}
template< class V, class C, class V2 >
inline list_inserter< assign_detail::call_push< std::priority_queue<V,C> >, V >
operator+=( std::priority_queue<V,C>& c, V2 v )
{
return push( c )( v );
}
}
}
#endif

44
test/external/boost/assign/std/set.hpp vendored Normal file
View File

@@ -0,0 +1,44 @@
// Boost.Assign library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is 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)
//
// For more information, see http://www.boost.org/libs/assign/
//
#ifndef BOOST_ASSIGN_STD_SET_HPP
#define BOOST_ASSIGN_STD_SET_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include <boost/assign/list_inserter.hpp>
#include <boost/config.hpp>
#include <set>
namespace boost
{
namespace assign
{
template< class K, class C, class A, class K2 >
inline list_inserter< assign_detail::call_insert< std::set<K,C,A> >, K >
operator+=( std::set<K,C,A>& c, K2 k )
{
return insert( c )( k );
}
template< class K, class C, class A, class K2 >
inline list_inserter< assign_detail::call_insert< std::multiset<K,C,A> >, K >
operator+=( std::multiset<K,C,A>& c, K2 k )
{
return insert( c )( k );
}
}
}
#endif

View File

@@ -0,0 +1,45 @@
// Boost.Assign library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is 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)
//
// For more information, see http://www.boost.org/libs/assign/
//
#ifndef BOOST_ASSIGN_STD_SLIST_HPP
#define BOOST_ASSIGN_STD_SLIST_HPP
#include <boost/config.hpp>
#ifdef BOOST_HAS_SLIST
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include <boost/assign/list_inserter.hpp>
#ifdef BOOST_SLIST_HEADER
# include BOOST_SLIST_HEADER
#else
# include <slist>
#endif
namespace boost
{
namespace assign
{
template< class V, class A, class V2 >
inline list_inserter< assign_detail::call_push_back< BOOST_STD_EXTENSION_NAMESPACE::slist<V,A> >, V >
operator+=( BOOST_STD_EXTENSION_NAMESPACE::slist<V,A>& c, V2 v )
{
return push_back( c )( v );
}
}
}
#endif // BOOST_HAS_SLIST
#endif

View File

@@ -0,0 +1,37 @@
// Boost.Assign library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is 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)
//
// For more information, see http://www.boost.org/libs/assign/
//
#ifndef BOOST_ASSIGN_STD_STACK_HPP
#define BOOST_ASSIGN_STD_STACK_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include <boost/assign/list_inserter.hpp>
#include <boost/config.hpp>
#include <stack>
namespace boost
{
namespace assign
{
template< class V, class C, class V2 >
inline list_inserter< assign_detail::call_push< std::stack<V,C> >, V >
operator+=( std::stack<V,C>& c, V2 v )
{
return push( c )( v );
}
}
}
#endif

View File

@@ -0,0 +1,37 @@
// Boost.Assign library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is 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)
//
// For more information, see http://www.boost.org/libs/assign/
//
#ifndef BOOST_ASSIGN_STD_VECTOR_HPP
#define BOOST_ASSIGN_STD_VECTOR_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include <boost/assign/list_inserter.hpp>
#include <boost/config.hpp>
#include <vector>
namespace boost
{
namespace assign
{
template< class V, class A, class V2 >
inline list_inserter< assign_detail::call_push_back< std::vector<V,A> >, V >
operator+=( std::vector<V,A>& c, V2 v )
{
return push_back( c )( v );
}
}
}
#endif