Compare commits
18 Commits
boost-1.49
...
svn-branch
Author | SHA1 | Date | |
---|---|---|---|
4686882502 | |||
df0fbd1d9d | |||
38cd16639d | |||
1c51ad943a | |||
a25a7092d8 | |||
48e4118768 | |||
0a520f6021 | |||
bbf10066bc | |||
c2052a3c0c | |||
480183059e | |||
fd82b51cec | |||
24bca52c5e | |||
459a1dba3d | |||
10274e7884 | |||
b6df98e86c | |||
4be9e08af7 | |||
f46b2aeb73 | |||
21301c93dc |
@ -1,5 +1,5 @@
|
|||||||
#==============================================================================
|
#==============================================================================
|
||||||
# Copyright (c) 2003-2007 Joel de Guzman
|
# Copyright (c) 2003-2011 Joel de Guzman
|
||||||
#
|
#
|
||||||
# Use, modification and distribution is subject to the Boost Software
|
# Use, modification and distribution is subject to the Boost Software
|
||||||
# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
[/==============================================================================
|
[/==============================================================================
|
||||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
Copyright (C) 2001-2011 Joel de Guzman
|
||||||
|
Copyright (C) 2006 Dan Marsden
|
||||||
|
|
||||||
Use, modification and distribution is subject to the Boost Software
|
Use, modification and distribution is subject to the Boost Software
|
||||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
[/==============================================================================
|
[/==============================================================================
|
||||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
Copyright (C) 2001-2011 Joel de Guzman
|
||||||
|
Copyright (C) 2006 Dan Marsden
|
||||||
Copyright (C) 2010 Christopher Schmidt
|
Copyright (C) 2010 Christopher Schmidt
|
||||||
|
|
||||||
Use, modification and distribution is subject to the Boost Software
|
Use, modification and distribution is subject to the Boost Software
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
[/==============================================================================
|
[/==============================================================================
|
||||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
Copyright (C) 2001-2011 Joel de Guzman
|
||||||
|
Copyright (C) 2006 Dan Marsden
|
||||||
Copyright (C) 2010 Christopher Schmidt
|
Copyright (C) 2010 Christopher Schmidt
|
||||||
|
|
||||||
Use, modification and distribution is subject to the Boost Software
|
Use, modification and distribution is subject to the Boost Software
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
[/==============================================================================
|
[/==============================================================================
|
||||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
Copyright (C) 2001-2011 Joel de Guzman
|
||||||
|
Copyright (C) 2006 Dan Marsden
|
||||||
|
Copyright (C) 2006 Tobias Schwinger
|
||||||
Copyright (C) 2010 Christopher Schmidt
|
Copyright (C) 2010 Christopher Schmidt
|
||||||
|
|
||||||
Use, modification and distribution is subject to the Boost Software
|
Use, modification and distribution is subject to the Boost Software
|
||||||
@ -38,5 +40,10 @@ This section summarizes significant changes to the Fusion library.
|
|||||||
* October 7, 2010: Added __adapt_adt__, __adapt_tpl_adt__,
|
* October 7, 2010: Added __adapt_adt__, __adapt_tpl_adt__,
|
||||||
__adapt_assoc_adt__ and __adapt_assoc_tpl_adt__ (Joel de Guzman,
|
__adapt_assoc_adt__ and __adapt_assoc_tpl_adt__ (Joel de Guzman,
|
||||||
Hartmut Kaiser and Christopher Schmidt)
|
Hartmut Kaiser and Christopher Schmidt)
|
||||||
|
* August 29, 2011: Added support for segmented sequences and iterators (Eric Niebler)
|
||||||
|
* September 16, 2011: Added preprocessed files (using wave) to speed up
|
||||||
|
compilation (Joel de Guzman)
|
||||||
|
* October 8, 2011: Added adaptor for std::tuple (Joel de Guzman)
|
||||||
|
* October 10, 2011: Made map random access (Brandon Kohn)
|
||||||
|
|
||||||
[endsect]
|
[endsect]
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
[/==============================================================================
|
[/==============================================================================
|
||||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
Copyright (C) 2001-2011 Joel de Guzman
|
||||||
|
Copyright (C) 2006 Dan Marsden
|
||||||
|
|
||||||
Use, modification and distribution is subject to the Boost Software
|
Use, modification and distribution is subject to the Boost Software
|
||||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
@ -419,7 +420,7 @@ including any Fusion header to change the default. Example:
|
|||||||
[heading Model of]
|
[heading Model of]
|
||||||
|
|
||||||
* __associative_sequence__
|
* __associative_sequence__
|
||||||
* __forward_sequence__
|
* __random_access_sequence__
|
||||||
|
|
||||||
[variablelist Notation
|
[variablelist Notation
|
||||||
[[`M`] [A `map` type]]
|
[[`M`] [A `map` type]]
|
||||||
@ -431,7 +432,7 @@ including any Fusion header to change the default. Example:
|
|||||||
[heading Expression Semantics]
|
[heading Expression Semantics]
|
||||||
|
|
||||||
Semantics of an expression is defined only where it differs from, or is not
|
Semantics of an expression is defined only where it differs from, or is not
|
||||||
defined in __random_access_sequence__ and __associative_sequence__.
|
defined in __forward_sequence__ and __associative_sequence__.
|
||||||
|
|
||||||
[table
|
[table
|
||||||
[[Expression] [Semantics]]
|
[[Expression] [Semantics]]
|
||||||
@ -1038,8 +1039,8 @@ rules for __element_conversion__.
|
|||||||
|
|
||||||
[heading Header]
|
[heading Header]
|
||||||
|
|
||||||
#include <boost/fusion/container/generation/make_list.hpp>
|
#include <boost/fusion/container/generation/make_vector.hpp>
|
||||||
#include <boost/fusion/include/make_list.hpp>
|
#include <boost/fusion/include/make_vector.hpp>
|
||||||
|
|
||||||
[heading Example]
|
[heading Example]
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
[/==============================================================================
|
[/==============================================================================
|
||||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
Copyright (C) 2001-2011 Joel de Guzman
|
||||||
|
Copyright (C) 2006 Dan Marsden
|
||||||
|
|
||||||
Use, modification and distribution is subject to the Boost Software
|
Use, modification and distribution is subject to the Boost Software
|
||||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[/==============================================================================
|
[/==============================================================================
|
||||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
Copyright (C) 2006 Tobias Schwinger
|
||||||
|
|
||||||
Use, modification and distribution is subject to the Boost Software
|
Use, modification and distribution is subject to the Boost Software
|
||||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
[/==============================================================================
|
[/==============================================================================
|
||||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
Copyright (C) 2001-2011 Joel de Guzman
|
||||||
|
Copyright (C) 2006 Dan Marsden
|
||||||
Copyright (C) 2010 Christopher Schmidt
|
Copyright (C) 2010 Christopher Schmidt
|
||||||
|
|
||||||
Use, modification and distribution is subject to the Boost Software
|
Use, modification and distribution is subject to the Boost Software
|
||||||
@ -8,9 +9,9 @@
|
|||||||
===============================================================================/]
|
===============================================================================/]
|
||||||
[library Fusion
|
[library Fusion
|
||||||
[quickbook 1.3]
|
[quickbook 1.3]
|
||||||
[version 2.0]
|
[version 2.2]
|
||||||
[authors [de Guzman, Joel], [Marsden, Dan], [Schwinger, Tobias]]
|
[authors [de Guzman, Joel], [Marsden, Dan], [Schwinger, Tobias]]
|
||||||
[copyright 2001 2002 2003 2004 2005 2006 2007 Joel de Guzman, Dan Marsden, Tobias Schwinger]
|
[copyright 2001 2002 2003 2004 2005 2006 2011 Joel de Guzman, Dan Marsden, Tobias Schwinger]
|
||||||
[purpose Statically Typed Heterogeneous Data Structures and Algorithms]
|
[purpose Statically Typed Heterogeneous Data Structures and Algorithms]
|
||||||
[license
|
[license
|
||||||
Distributed under the Boost Software License, Version 1.0.
|
Distributed under the Boost Software License, Version 1.0.
|
||||||
|
0
doc/html/images/alert.png
Executable file → Normal file
Before Width: | Height: | Size: 603 B After Width: | Height: | Size: 603 B |
0
doc/html/images/home.png
Executable file → Normal file
Before Width: | Height: | Size: 358 B After Width: | Height: | Size: 358 B |
0
doc/html/images/next.png
Executable file → Normal file
Before Width: | Height: | Size: 336 B After Width: | Height: | Size: 336 B |
0
doc/html/images/note.png
Executable file → Normal file
Before Width: | Height: | Size: 658 B After Width: | Height: | Size: 658 B |
0
doc/html/images/prev.png
Executable file → Normal file
Before Width: | Height: | Size: 334 B After Width: | Height: | Size: 334 B |
0
doc/html/images/smiley.png
Executable file → Normal file
Before Width: | Height: | Size: 867 B After Width: | Height: | Size: 867 B |
0
doc/html/images/tip.png
Executable file → Normal file
Before Width: | Height: | Size: 640 B After Width: | Height: | Size: 640 B |
0
doc/html/images/up.png
Executable file → Normal file
Before Width: | Height: | Size: 370 B After Width: | Height: | Size: 370 B |
@ -1,5 +1,6 @@
|
|||||||
[/==============================================================================
|
[/==============================================================================
|
||||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
Copyright (C) 2001-2011 Joel de Guzman
|
||||||
|
Copyright (C) 2006 Dan Marsden
|
||||||
|
|
||||||
Use, modification and distribution is subject to the Boost Software
|
Use, modification and distribution is subject to the Boost Software
|
||||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
[/==============================================================================
|
[/==============================================================================
|
||||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
Copyright (C) 2001-2011 Joel de Guzman
|
||||||
|
Copyright (C) 2006 Dan Marsden
|
||||||
|
|
||||||
Use, modification and distribution is subject to the Boost Software
|
Use, modification and distribution is subject to the Boost Software
|
||||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
@ -160,6 +161,7 @@ the following invariants always hold:
|
|||||||
* __std_pair__ iterator
|
* __std_pair__ iterator
|
||||||
* __boost_array__ iterator
|
* __boost_array__ iterator
|
||||||
* __vector__ iterator
|
* __vector__ iterator
|
||||||
|
* __map__ iterator
|
||||||
* __single_view__ iterator
|
* __single_view__ iterator
|
||||||
* __iterator_range__ (where adapted sequence is a __bidirectional_sequence__)
|
* __iterator_range__ (where adapted sequence is a __bidirectional_sequence__)
|
||||||
* __transform_view__ (where adapted sequence is a __bidirectional_sequence__)
|
* __transform_view__ (where adapted sequence is a __bidirectional_sequence__)
|
||||||
@ -205,6 +207,7 @@ the following expressions must be valid:
|
|||||||
|
|
||||||
[heading Models]
|
[heading Models]
|
||||||
* __vector__ iterator
|
* __vector__ iterator
|
||||||
|
* __map__ iterator
|
||||||
* __std_pair__ iterator
|
* __std_pair__ iterator
|
||||||
* __boost_array__ iterator
|
* __boost_array__ iterator
|
||||||
* __single_view__ iterator
|
* __single_view__ iterator
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
[/==============================================================================
|
[/==============================================================================
|
||||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
Copyright (C) 2001-2011 Joel de Guzman
|
||||||
|
Copyright (C) 2006 Dan Marsden
|
||||||
Copyright (C) 2010 Christopher Schmidt
|
Copyright (C) 2010 Christopher Schmidt
|
||||||
|
|
||||||
Use, modification and distribution is subject to the Boost Software
|
Use, modification and distribution is subject to the Boost Software
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
[/==============================================================================
|
[/==============================================================================
|
||||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
Copyright (C) 2001-2011 Joel de Guzman
|
||||||
|
Copyright (C) 2006 Dan Marsden
|
||||||
|
|
||||||
Use, modification and distribution is subject to the Boost Software
|
Use, modification and distribution is subject to the Boost Software
|
||||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
[/==============================================================================
|
[/==============================================================================
|
||||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
Copyright (C) 2001-2011 Joel de Guzman
|
||||||
|
Copyright (C) 2006 Dan Marsden
|
||||||
|
|
||||||
Use, modification and distribution is subject to the Boost Software
|
Use, modification and distribution is subject to the Boost Software
|
||||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
[/==============================================================================
|
[/==============================================================================
|
||||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
Copyright (C) 2001-2011 Joel de Guzman
|
||||||
|
Copyright (C) 2006 Dan Marsden
|
||||||
|
|
||||||
Use, modification and distribution is subject to the Boost Software
|
Use, modification and distribution is subject to the Boost Software
|
||||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
[/==============================================================================
|
[/==============================================================================
|
||||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
Copyright (C) 2001-2011 Joel de Guzman
|
||||||
|
Copyright (C) 2006 Dan Marsden
|
||||||
|
|
||||||
Use, modification and distribution is subject to the Boost Software
|
Use, modification and distribution is subject to the Boost Software
|
||||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
[/==============================================================================
|
[/==============================================================================
|
||||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
Copyright (C) 2001-2011 Joel de Guzman
|
||||||
|
Copyright (C) 2006 Dan Marsden
|
||||||
|
|
||||||
Use, modification and distribution is subject to the Boost Software
|
Use, modification and distribution is subject to the Boost Software
|
||||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
@ -188,6 +189,7 @@ are not defined in __forward_sequence__.
|
|||||||
* __std_pair__
|
* __std_pair__
|
||||||
* __boost_array__
|
* __boost_array__
|
||||||
* __vector__
|
* __vector__
|
||||||
|
* __map__
|
||||||
* __reverse_view__
|
* __reverse_view__
|
||||||
* __single_view__
|
* __single_view__
|
||||||
* __iterator_range__ (where adapted sequence is a Bidirectional Sequence)
|
* __iterator_range__ (where adapted sequence is a Bidirectional Sequence)
|
||||||
@ -264,6 +266,7 @@ are not defined in __bidirectional_sequence__.
|
|||||||
* __std_pair__
|
* __std_pair__
|
||||||
* __boost_array__
|
* __boost_array__
|
||||||
* __vector__
|
* __vector__
|
||||||
|
* __map__
|
||||||
* __reverse_view__
|
* __reverse_view__
|
||||||
* __single_view__
|
* __single_view__
|
||||||
* __iterator_range__ (where adapted sequence is a Random Access Sequence)
|
* __iterator_range__ (where adapted sequence is a Random Access Sequence)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
[/==============================================================================
|
[/==============================================================================
|
||||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
Copyright (C) 2001-2011 Joel de Guzman
|
||||||
|
Copyright (C) 2006 Dan Marsden
|
||||||
|
|
||||||
Use, modification and distribution is subject to the Boost Software
|
Use, modification and distribution is subject to the Boost Software
|
||||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
[/==============================================================================
|
[/==============================================================================
|
||||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
Copyright (C) 2001-2011 Joel de Guzman
|
||||||
|
Copyright (C) 2006 Dan Marsden
|
||||||
|
|
||||||
Use, modification and distribution is subject to the Boost Software
|
Use, modification and distribution is subject to the Boost Software
|
||||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
[/==============================================================================
|
[/==============================================================================
|
||||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
Copyright (C) 2001-2011 Joel de Guzman
|
||||||
|
Copyright (C) 2006 Dan Marsden
|
||||||
|
|
||||||
Use, modification and distribution is subject to the Boost Software
|
Use, modification and distribution is subject to the Boost Software
|
||||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
@ -78,6 +78,51 @@ namespace boost { namespace fusion
|
|||||||
, mpl::int_<(Last::is_last?1:0)>
|
, mpl::int_<(Last::is_last?1:0)>
|
||||||
>::type
|
>::type
|
||||||
{};
|
{};
|
||||||
|
|
||||||
|
|
||||||
|
template <typename Iterator, bool IsLast_>
|
||||||
|
struct prior_impl
|
||||||
|
{
|
||||||
|
typedef typename Iterator::iterator_base_type base_type;
|
||||||
|
|
||||||
|
typedef typename
|
||||||
|
result_of::prior<base_type>::type
|
||||||
|
base_prior;
|
||||||
|
|
||||||
|
typedef pop_back_iterator<base_prior, false> type;
|
||||||
|
|
||||||
|
static type
|
||||||
|
call(Iterator const& i)
|
||||||
|
{
|
||||||
|
return type(fusion::prior(i.iterator_base));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename Iterator>
|
||||||
|
struct prior_impl<Iterator, true>
|
||||||
|
{
|
||||||
|
// If this is the last iterator, we'll have to double back
|
||||||
|
typedef typename Iterator::iterator_base_type base_type;
|
||||||
|
|
||||||
|
typedef typename
|
||||||
|
result_of::prior<
|
||||||
|
typename result_of::prior<base_type>::type
|
||||||
|
>::type
|
||||||
|
base_prior;
|
||||||
|
|
||||||
|
typedef pop_back_iterator<base_prior, false> type;
|
||||||
|
|
||||||
|
static type
|
||||||
|
call(Iterator const& i)
|
||||||
|
{
|
||||||
|
return type(fusion::prior(
|
||||||
|
fusion::prior(i.iterator_base)));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename Iterator>
|
||||||
|
struct prior : prior_impl<Iterator, Iterator::is_last>
|
||||||
|
{};
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace result_of
|
namespace result_of
|
||||||
|
@ -88,7 +88,7 @@ namespace boost { namespace fusion
|
|||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
cons(
|
cons(
|
||||||
Sequence const& seq
|
Sequence const& seq
|
||||||
, typename disable_if<
|
, typename boost::disable_if<
|
||||||
mpl::or_<
|
mpl::or_<
|
||||||
is_convertible<Sequence, cons> // use copy ctor instead
|
is_convertible<Sequence, cons> // use copy ctor instead
|
||||||
, is_convertible<Sequence, Car> // use copy to car instead
|
, is_convertible<Sequence, Car> // use copy to car instead
|
||||||
@ -119,7 +119,7 @@ namespace boost { namespace fusion
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, Car>, cons&>::type
|
typename boost::disable_if<is_convertible<Sequence, Car>, cons&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type Iterator;
|
typedef typename result_of::begin<Sequence const>::type Iterator;
|
||||||
|
57
include/boost/fusion/container/map/detail/at_impl.hpp
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*=============================================================================
|
||||||
|
Copyright (c) 2001-2011 Joel de Guzman
|
||||||
|
Copyright (c) 2011 Brandon Kohn
|
||||||
|
|
||||||
|
Distributed under 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)
|
||||||
|
==============================================================================*/
|
||||||
|
#if !defined(BOOST_FUSION_MAP_DETAIL_AT_IMPL_HPP)
|
||||||
|
#define BOOST_FUSION_MAP_DETAIL_AT_IMPL_HPP
|
||||||
|
|
||||||
|
#include <boost/fusion/support/detail/access.hpp>
|
||||||
|
#include <boost/type_traits/is_const.hpp>
|
||||||
|
#include <boost/mpl/at.hpp>
|
||||||
|
#include <boost/mpl/int.hpp>
|
||||||
|
|
||||||
|
namespace boost { namespace fusion
|
||||||
|
{
|
||||||
|
struct map_tag;
|
||||||
|
|
||||||
|
namespace extension
|
||||||
|
{
|
||||||
|
template <typename Tag>
|
||||||
|
struct at_impl;
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct at_impl<map_tag>
|
||||||
|
{
|
||||||
|
template <typename Sequence, typename N>
|
||||||
|
struct apply
|
||||||
|
{
|
||||||
|
typedef mpl::at<typename Sequence::storage_type::types, N> element;
|
||||||
|
typedef typename detail::ref_result<element>::type type;
|
||||||
|
|
||||||
|
static type
|
||||||
|
call(Sequence& m)
|
||||||
|
{
|
||||||
|
return m.get_data().at_impl(N());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename Sequence, typename N>
|
||||||
|
struct apply <Sequence const, N>
|
||||||
|
{
|
||||||
|
typedef mpl::at<typename Sequence::storage_type::types, N> element;
|
||||||
|
typedef typename detail::cref_result<element>::type type;
|
||||||
|
|
||||||
|
static type
|
||||||
|
call(Sequence const& m)
|
||||||
|
{
|
||||||
|
return m.get_data().at_impl(N());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
#endif //BOOST_FUSION_MAP_DETAIL_AT_IMPL_HPP
|
@ -13,7 +13,7 @@ namespace boost { namespace fusion
|
|||||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
|
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
|
||||||
struct map : sequence_base<map<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> >
|
struct map : sequence_base<map<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> >
|
||||||
{
|
{
|
||||||
struct category : forward_traversal_tag, associative_tag {};
|
struct category : random_access_traversal_tag, associative_tag {};
|
||||||
typedef map_tag fusion_tag;
|
typedef map_tag fusion_tag;
|
||||||
typedef fusion_sequence_tag tag;
|
typedef fusion_sequence_tag tag;
|
||||||
typedef mpl::false_ is_view;
|
typedef mpl::false_ is_view;
|
||||||
|
@ -13,7 +13,7 @@ namespace boost { namespace fusion
|
|||||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19>
|
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19>
|
||||||
struct map : sequence_base<map<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19> >
|
struct map : sequence_base<map<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19> >
|
||||||
{
|
{
|
||||||
struct category : forward_traversal_tag, associative_tag {};
|
struct category : random_access_traversal_tag, associative_tag {};
|
||||||
typedef map_tag fusion_tag;
|
typedef map_tag fusion_tag;
|
||||||
typedef fusion_sequence_tag tag;
|
typedef fusion_sequence_tag tag;
|
||||||
typedef mpl::false_ is_view;
|
typedef mpl::false_ is_view;
|
||||||
|
@ -13,7 +13,7 @@ namespace boost { namespace fusion
|
|||||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29>
|
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29>
|
||||||
struct map : sequence_base<map<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29> >
|
struct map : sequence_base<map<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29> >
|
||||||
{
|
{
|
||||||
struct category : forward_traversal_tag, associative_tag {};
|
struct category : random_access_traversal_tag, associative_tag {};
|
||||||
typedef map_tag fusion_tag;
|
typedef map_tag fusion_tag;
|
||||||
typedef fusion_sequence_tag tag;
|
typedef fusion_sequence_tag tag;
|
||||||
typedef mpl::false_ is_view;
|
typedef mpl::false_ is_view;
|
||||||
|
@ -13,7 +13,7 @@ namespace boost { namespace fusion
|
|||||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39>
|
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39>
|
||||||
struct map : sequence_base<map<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39> >
|
struct map : sequence_base<map<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39> >
|
||||||
{
|
{
|
||||||
struct category : forward_traversal_tag, associative_tag {};
|
struct category : random_access_traversal_tag, associative_tag {};
|
||||||
typedef map_tag fusion_tag;
|
typedef map_tag fusion_tag;
|
||||||
typedef fusion_sequence_tag tag;
|
typedef fusion_sequence_tag tag;
|
||||||
typedef mpl::false_ is_view;
|
typedef mpl::false_ is_view;
|
||||||
|
@ -13,7 +13,7 @@ namespace boost { namespace fusion
|
|||||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 , typename T47 , typename T48 , typename T49>
|
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 , typename T47 , typename T48 , typename T49>
|
||||||
struct map : sequence_base<map<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 , T47 , T48 , T49> >
|
struct map : sequence_base<map<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 , T47 , T48 , T49> >
|
||||||
{
|
{
|
||||||
struct category : forward_traversal_tag, associative_tag {};
|
struct category : random_access_traversal_tag, associative_tag {};
|
||||||
typedef map_tag fusion_tag;
|
typedef map_tag fusion_tag;
|
||||||
typedef fusion_sequence_tag tag;
|
typedef fusion_sequence_tag tag;
|
||||||
typedef mpl::false_ is_view;
|
typedef mpl::false_ is_view;
|
||||||
|
34
include/boost/fusion/container/map/detail/value_at_impl.hpp
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
/*=============================================================================
|
||||||
|
Copyright (c) 2001-2011 Joel de Guzman
|
||||||
|
Copyright (c) 2011 Brandon Kohn
|
||||||
|
|
||||||
|
Distributed under 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)
|
||||||
|
==============================================================================*/
|
||||||
|
#if !defined(BOOST_FUSION_MAP_DETAIL_VALUE_AT_IMPL_HPP)
|
||||||
|
#define BOOST_FUSION_MAP_DETAIL_VALUE_AT_IMPL_HPP
|
||||||
|
|
||||||
|
#include <boost/mpl/at.hpp>
|
||||||
|
|
||||||
|
namespace boost { namespace fusion
|
||||||
|
{
|
||||||
|
struct map_tag;
|
||||||
|
|
||||||
|
namespace extension
|
||||||
|
{
|
||||||
|
template <typename Tag>
|
||||||
|
struct value_at_impl;
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct value_at_impl<map_tag>
|
||||||
|
{
|
||||||
|
template <typename Sequence, typename N>
|
||||||
|
struct apply
|
||||||
|
{
|
||||||
|
typedef typename mpl::at<typename Sequence::storage_type::types, N>::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
#endif //BOOST_FUSION_MAP_DETAIL_VALUE_AT_IMPL_HPP
|
@ -11,6 +11,8 @@
|
|||||||
#include <boost/fusion/support/category_of.hpp>
|
#include <boost/fusion/support/category_of.hpp>
|
||||||
#include <boost/fusion/support/detail/access.hpp>
|
#include <boost/fusion/support/detail/access.hpp>
|
||||||
#include <boost/fusion/container/map/map_fwd.hpp>
|
#include <boost/fusion/container/map/map_fwd.hpp>
|
||||||
|
#include <boost/fusion/container/map/detail/at_impl.hpp>
|
||||||
|
#include <boost/fusion/container/map/detail/value_at_impl.hpp>
|
||||||
#include <boost/fusion/container/map/detail/begin_impl.hpp>
|
#include <boost/fusion/container/map/detail/begin_impl.hpp>
|
||||||
#include <boost/fusion/container/map/detail/end_impl.hpp>
|
#include <boost/fusion/container/map/detail/end_impl.hpp>
|
||||||
#include <boost/fusion/container/map/detail/value_of_impl.hpp>
|
#include <boost/fusion/container/map/detail/value_of_impl.hpp>
|
||||||
@ -50,7 +52,7 @@ namespace boost { namespace fusion
|
|||||||
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, typename T)>
|
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, typename T)>
|
||||||
struct map : sequence_base<map<BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, T)> >
|
struct map : sequence_base<map<BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, T)> >
|
||||||
{
|
{
|
||||||
struct category : forward_traversal_tag, associative_tag {};
|
struct category : random_access_traversal_tag, associative_tag {};
|
||||||
|
|
||||||
typedef map_tag fusion_tag;
|
typedef map_tag fusion_tag;
|
||||||
typedef fusion_sequence_tag tag; // this gets picked up by MPL
|
typedef fusion_sequence_tag tag; // this gets picked up by MPL
|
||||||
|
@ -61,7 +61,7 @@ namespace boost { namespace fusion
|
|||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
vector1(
|
vector1(
|
||||||
Sequence const& seq
|
Sequence const& seq
|
||||||
, typename disable_if<is_convertible<Sequence, T0> >::type* = 0
|
, typename boost::disable_if<is_convertible<Sequence, T0> >::type* = 0
|
||||||
)
|
)
|
||||||
: base_type(base_type::init_from_sequence(seq)) {}
|
: base_type(base_type::init_from_sequence(seq)) {}
|
||||||
template <typename U0>
|
template <typename U0>
|
||||||
@ -72,7 +72,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -157,7 +157,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -242,7 +242,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -327,7 +327,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -412,7 +412,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -497,7 +497,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -582,7 +582,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -667,7 +667,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -752,7 +752,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -837,7 +837,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
|
@ -73,7 +73,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -158,7 +158,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -243,7 +243,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -328,7 +328,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -413,7 +413,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -498,7 +498,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -583,7 +583,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -668,7 +668,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -753,7 +753,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -838,7 +838,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
|
@ -73,7 +73,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -158,7 +158,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -243,7 +243,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -328,7 +328,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -413,7 +413,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -498,7 +498,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -583,7 +583,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -668,7 +668,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -753,7 +753,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -838,7 +838,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
|
@ -73,7 +73,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -158,7 +158,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -243,7 +243,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -328,7 +328,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -413,7 +413,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -498,7 +498,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -583,7 +583,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -668,7 +668,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -753,7 +753,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -838,7 +838,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
|
@ -73,7 +73,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -158,7 +158,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -243,7 +243,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -328,7 +328,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -413,7 +413,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -498,7 +498,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -583,7 +583,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -668,7 +668,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -753,7 +753,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
@ -838,7 +838,7 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
|
@ -36,7 +36,7 @@ namespace boost { namespace fusion
|
|||||||
: vec(rhs.vec) {}
|
: vec(rhs.vec) {}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
vector(Sequence const& rhs)
|
vector(Sequence const& rhs)
|
||||||
: vec(rhs) {}
|
: vec(BOOST_FUSION_VECTOR_COPY_INIT()) {}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -116,6 +116,7 @@ namespace boost { namespace fusion
|
|||||||
return vec.at_impl(mpl::int_<I::value>());
|
return vec.at_impl(mpl::int_<I::value>());
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
BOOST_FUSION_VECTOR_CTOR_HELPER()
|
||||||
vector_n vec;
|
vector_n vec;
|
||||||
};
|
};
|
||||||
}}
|
}}
|
||||||
|
@ -36,7 +36,7 @@ namespace boost { namespace fusion
|
|||||||
: vec(rhs.vec) {}
|
: vec(rhs.vec) {}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
vector(Sequence const& rhs)
|
vector(Sequence const& rhs)
|
||||||
: vec(rhs) {}
|
: vec(BOOST_FUSION_VECTOR_COPY_INIT()) {}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -136,6 +136,7 @@ namespace boost { namespace fusion
|
|||||||
return vec.at_impl(mpl::int_<I::value>());
|
return vec.at_impl(mpl::int_<I::value>());
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
BOOST_FUSION_VECTOR_CTOR_HELPER()
|
||||||
vector_n vec;
|
vector_n vec;
|
||||||
};
|
};
|
||||||
}}
|
}}
|
||||||
|
@ -36,7 +36,7 @@ namespace boost { namespace fusion
|
|||||||
: vec(rhs.vec) {}
|
: vec(rhs.vec) {}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
vector(Sequence const& rhs)
|
vector(Sequence const& rhs)
|
||||||
: vec(rhs) {}
|
: vec(BOOST_FUSION_VECTOR_COPY_INIT()) {}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -156,6 +156,7 @@ namespace boost { namespace fusion
|
|||||||
return vec.at_impl(mpl::int_<I::value>());
|
return vec.at_impl(mpl::int_<I::value>());
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
BOOST_FUSION_VECTOR_CTOR_HELPER()
|
||||||
vector_n vec;
|
vector_n vec;
|
||||||
};
|
};
|
||||||
}}
|
}}
|
||||||
|
@ -36,7 +36,7 @@ namespace boost { namespace fusion
|
|||||||
: vec(rhs.vec) {}
|
: vec(rhs.vec) {}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
vector(Sequence const& rhs)
|
vector(Sequence const& rhs)
|
||||||
: vec(rhs) {}
|
: vec(BOOST_FUSION_VECTOR_COPY_INIT()) {}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -176,6 +176,7 @@ namespace boost { namespace fusion
|
|||||||
return vec.at_impl(mpl::int_<I::value>());
|
return vec.at_impl(mpl::int_<I::value>());
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
BOOST_FUSION_VECTOR_CTOR_HELPER()
|
||||||
vector_n vec;
|
vector_n vec;
|
||||||
};
|
};
|
||||||
}}
|
}}
|
||||||
|
@ -36,7 +36,7 @@ namespace boost { namespace fusion
|
|||||||
: vec(rhs.vec) {}
|
: vec(rhs.vec) {}
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
vector(Sequence const& rhs)
|
vector(Sequence const& rhs)
|
||||||
: vec(rhs) {}
|
: vec(BOOST_FUSION_VECTOR_COPY_INIT()) {}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -196,6 +196,7 @@ namespace boost { namespace fusion
|
|||||||
return vec.at_impl(mpl::int_<I::value>());
|
return vec.at_impl(mpl::int_<I::value>());
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
BOOST_FUSION_VECTOR_CTOR_HELPER()
|
||||||
vector_n vec;
|
vector_n vec;
|
||||||
};
|
};
|
||||||
}}
|
}}
|
||||||
|
@ -104,7 +104,7 @@
|
|||||||
BOOST_PP_CAT(vector, N)(
|
BOOST_PP_CAT(vector, N)(
|
||||||
Sequence const& seq
|
Sequence const& seq
|
||||||
#if (N == 1)
|
#if (N == 1)
|
||||||
, typename disable_if<is_convertible<Sequence, T0> >::type* /*dummy*/ = 0
|
, typename boost::disable_if<is_convertible<Sequence, T0> >::type* /*dummy*/ = 0
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
: base_type(base_type::init_from_sequence(seq)) {}
|
: base_type(base_type::init_from_sequence(seq)) {}
|
||||||
@ -118,7 +118,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type I0;
|
typedef typename result_of::begin<Sequence const>::type I0;
|
||||||
|
@ -17,6 +17,38 @@
|
|||||||
#include <boost/type_traits/is_base_of.hpp>
|
#include <boost/type_traits/is_base_of.hpp>
|
||||||
#include <boost/detail/workaround.hpp>
|
#include <boost/detail/workaround.hpp>
|
||||||
|
|
||||||
|
#if !defined(__WAVE__)
|
||||||
|
|
||||||
|
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600)
|
||||||
|
|
||||||
|
#define BOOST_FUSION_VECTOR_COPY_INIT() \
|
||||||
|
ctor_helper(rhs, is_base_of<vector, Sequence>()) \
|
||||||
|
|
||||||
|
#define BOOST_FUSION_VECTOR_CTOR_HELPER() \
|
||||||
|
static vector_n const& \
|
||||||
|
ctor_helper(vector const& rhs, mpl::true_) \
|
||||||
|
{ \
|
||||||
|
return rhs.vec; \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
template <typename T> \
|
||||||
|
static T const& \
|
||||||
|
ctor_helper(T const& rhs, mpl::false_) \
|
||||||
|
{ \
|
||||||
|
return rhs; \
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define BOOST_FUSION_VECTOR_COPY_INIT() \
|
||||||
|
rhs \
|
||||||
|
|
||||||
|
#define BOOST_FUSION_VECTOR_CTOR_HELPER()
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // !defined(__WAVE__)
|
||||||
|
|
||||||
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
|
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
|
||||||
#include <boost/fusion/container/vector/detail/preprocessed/vector.hpp>
|
#include <boost/fusion/container/vector/detail/preprocessed/vector.hpp>
|
||||||
#else
|
#else
|
||||||
@ -76,11 +108,7 @@ namespace boost { namespace fusion
|
|||||||
|
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
vector(Sequence const& rhs)
|
vector(Sequence const& rhs)
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600)
|
: vec(BOOST_FUSION_VECTOR_COPY_INIT()) {}
|
||||||
: vec(ctor_helper(rhs, is_base_of<vector, Sequence>())) {}
|
|
||||||
#else
|
|
||||||
: vec(rhs) {}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Expand a couple of forwarding constructors for arguments
|
// Expand a couple of forwarding constructors for arguments
|
||||||
// of type (T0), (T0, T1), (T0, T1, T2) etc. Example:
|
// of type (T0), (T0, T1), (T0, T1, T2) etc. Example:
|
||||||
@ -149,21 +177,7 @@ namespace boost { namespace fusion
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600)
|
BOOST_FUSION_VECTOR_CTOR_HELPER()
|
||||||
static vector_n const&
|
|
||||||
ctor_helper(vector const& rhs, mpl::true_)
|
|
||||||
{
|
|
||||||
return rhs.vec;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
static T const&
|
|
||||||
ctor_helper(T const& rhs, mpl::false_)
|
|
||||||
{
|
|
||||||
return rhs;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
vector_n vec;
|
vector_n vec;
|
||||||
};
|
};
|
||||||
}}
|
}}
|
||||||
|
0
include/boost/fusion/functional/adapter/unfused.hpp
Executable file → Normal file
@ -74,7 +74,7 @@ namespace boost { namespace fusion
|
|||||||
{
|
{
|
||||||
template <typename Iter1, typename Iter2>
|
template <typename Iter1, typename Iter2>
|
||||||
inline typename
|
inline typename
|
||||||
enable_if<
|
boost::enable_if<
|
||||||
mpl::and_<is_fusion_iterator<Iter1>, is_fusion_iterator<Iter2> >
|
mpl::and_<is_fusion_iterator<Iter1>, is_fusion_iterator<Iter2> >
|
||||||
, bool
|
, bool
|
||||||
>::type
|
>::type
|
||||||
@ -85,7 +85,7 @@ namespace boost { namespace fusion
|
|||||||
|
|
||||||
template <typename Iter1, typename Iter2>
|
template <typename Iter1, typename Iter2>
|
||||||
inline typename
|
inline typename
|
||||||
enable_if<
|
boost::enable_if<
|
||||||
mpl::and_<is_fusion_iterator<Iter1>, is_fusion_iterator<Iter2> >
|
mpl::and_<is_fusion_iterator<Iter1>, is_fusion_iterator<Iter2> >
|
||||||
, bool
|
, bool
|
||||||
>::type
|
>::type
|
||||||
|
@ -37,7 +37,7 @@ namespace boost { namespace fusion
|
|||||||
{
|
{
|
||||||
template <typename Seq1, typename Seq2>
|
template <typename Seq1, typename Seq2>
|
||||||
inline typename
|
inline typename
|
||||||
enable_if<
|
boost::enable_if<
|
||||||
traits::enable_equality<Seq1, Seq2>
|
traits::enable_equality<Seq1, Seq2>
|
||||||
, bool
|
, bool
|
||||||
>::type
|
>::type
|
||||||
|
@ -37,7 +37,7 @@ namespace boost { namespace fusion
|
|||||||
{
|
{
|
||||||
template <typename Seq1, typename Seq2>
|
template <typename Seq1, typename Seq2>
|
||||||
inline typename
|
inline typename
|
||||||
enable_if<
|
boost::enable_if<
|
||||||
traits::enable_comparison<Seq1, Seq2>
|
traits::enable_comparison<Seq1, Seq2>
|
||||||
, bool
|
, bool
|
||||||
>::type
|
>::type
|
||||||
|
@ -37,7 +37,7 @@ namespace boost { namespace fusion
|
|||||||
{
|
{
|
||||||
template <typename Seq1, typename Seq2>
|
template <typename Seq1, typename Seq2>
|
||||||
inline typename
|
inline typename
|
||||||
enable_if<
|
boost::enable_if<
|
||||||
traits::enable_comparison<Seq1, Seq2>
|
traits::enable_comparison<Seq1, Seq2>
|
||||||
, bool
|
, bool
|
||||||
>::type
|
>::type
|
||||||
|
@ -28,7 +28,7 @@ namespace boost { namespace fusion
|
|||||||
{
|
{
|
||||||
template <typename Seq1, typename Seq2>
|
template <typename Seq1, typename Seq2>
|
||||||
inline typename
|
inline typename
|
||||||
enable_if<
|
boost::enable_if<
|
||||||
traits::enable_comparison<Seq1, Seq2>
|
traits::enable_comparison<Seq1, Seq2>
|
||||||
, bool
|
, bool
|
||||||
>::type
|
>::type
|
||||||
|
@ -65,7 +65,7 @@ namespace boost { namespace fusion
|
|||||||
|
|
||||||
template <typename Seq1, typename Seq2>
|
template <typename Seq1, typename Seq2>
|
||||||
inline typename
|
inline typename
|
||||||
enable_if<
|
boost::enable_if<
|
||||||
traits::enable_comparison<Seq1, Seq2>
|
traits::enable_comparison<Seq1, Seq2>
|
||||||
, bool
|
, bool
|
||||||
>::type
|
>::type
|
||||||
|
@ -40,7 +40,7 @@ namespace boost { namespace fusion
|
|||||||
{
|
{
|
||||||
template <typename Seq1, typename Seq2>
|
template <typename Seq1, typename Seq2>
|
||||||
inline typename
|
inline typename
|
||||||
enable_if<
|
boost::enable_if<
|
||||||
traits::enable_equality<Seq1, Seq2>
|
traits::enable_equality<Seq1, Seq2>
|
||||||
, bool
|
, bool
|
||||||
>::type
|
>::type
|
||||||
|
@ -27,7 +27,7 @@ namespace boost { namespace fusion
|
|||||||
{
|
{
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
inline typename
|
inline typename
|
||||||
enable_if<
|
boost::enable_if<
|
||||||
fusion::traits::is_sequence<Sequence>
|
fusion::traits::is_sequence<Sequence>
|
||||||
, std::istream&
|
, std::istream&
|
||||||
>::type
|
>::type
|
||||||
|
@ -29,7 +29,7 @@ namespace boost { namespace fusion
|
|||||||
{
|
{
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
inline typename
|
inline typename
|
||||||
enable_if<
|
boost::enable_if<
|
||||||
fusion::traits::is_sequence<Sequence>
|
fusion::traits::is_sequence<Sequence>
|
||||||
, std::ostream&
|
, std::ostream&
|
||||||
>::type
|
>::type
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include <boost/fusion/support/deduce.hpp>
|
#include <boost/fusion/support/deduce.hpp>
|
||||||
#include <boost/fusion/container/vector/convert.hpp>
|
#include <boost/fusion/container/vector/convert.hpp>
|
||||||
#include <boost/fusion/view/transform_view.hpp>
|
#include <boost/fusion/view/transform_view.hpp>
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace boost { namespace fusion { namespace traits
|
namespace boost { namespace fusion { namespace traits
|
||||||
@ -29,6 +30,13 @@ namespace boost { namespace fusion { namespace traits
|
|||||||
struct result< Self(T) >
|
struct result< Self(T) >
|
||||||
: fusion::traits::deduce<T>
|
: fusion::traits::deduce<T>
|
||||||
{ };
|
{ };
|
||||||
|
|
||||||
|
// never called, but needed for decltype-based result_of (C++0x)
|
||||||
|
#ifndef BOOST_NO_RVALUE_REFERENCES
|
||||||
|
template <typename T>
|
||||||
|
typename result< deducer(T) >::type
|
||||||
|
operator()(T&&) const;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,28 +46,29 @@ namespace boost { namespace fusion
|
|||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
BOOST_MPL_HAS_XXX_TRAIT_DEF(fusion_tag)
|
BOOST_MPL_HAS_XXX_TRAIT_DEF(fusion_tag)
|
||||||
|
|
||||||
|
template <typename Sequence, typename Active>
|
||||||
|
struct tag_of_impl
|
||||||
|
: mpl::if_<fusion::detail::is_mpl_sequence<Sequence>,
|
||||||
|
mpl::identity<mpl_sequence_tag>,
|
||||||
|
mpl::identity<non_fusion_tag> >::type
|
||||||
|
{};
|
||||||
|
|
||||||
|
template <typename Sequence>
|
||||||
|
struct tag_of_impl<
|
||||||
|
Sequence
|
||||||
|
, typename boost::enable_if<detail::has_fusion_tag<Sequence> >::type>
|
||||||
|
{
|
||||||
|
typedef typename Sequence::fusion_tag type;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace traits
|
namespace traits
|
||||||
{
|
{
|
||||||
template <typename Sequence, typename Active>
|
|
||||||
struct tag_of_fallback
|
|
||||||
{
|
|
||||||
typedef non_fusion_tag type;
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename Sequence, typename Active>
|
template <typename Sequence, typename Active>
|
||||||
struct tag_of
|
struct tag_of
|
||||||
: mpl::if_< fusion::detail::is_mpl_sequence<Sequence>,
|
: boost::fusion::detail::tag_of_impl<Sequence, Active>
|
||||||
mpl::identity<mpl_sequence_tag>,
|
|
||||||
tag_of_fallback<Sequence> >::type
|
|
||||||
{};
|
{};
|
||||||
|
|
||||||
template <typename Sequence>
|
|
||||||
struct tag_of<Sequence, typename boost::enable_if<detail::has_fusion_tag<Sequence> >::type>
|
|
||||||
{
|
|
||||||
typedef typename Sequence::fusion_tag type;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace detail
|
namespace detail
|
||||||
|
@ -12,9 +12,6 @@ namespace boost { namespace fusion
|
|||||||
{
|
{
|
||||||
namespace traits
|
namespace traits
|
||||||
{
|
{
|
||||||
template <typename Sequence, typename Active = void>
|
|
||||||
struct tag_of_fallback;
|
|
||||||
|
|
||||||
template<typename T, typename Active = void>
|
template<typename T, typename Active = void>
|
||||||
struct tag_of;
|
struct tag_of;
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#if !defined(FUSION_STRICTEST_TRAVERSAL_20060123_2101)
|
#if !defined(FUSION_STRICTEST_TRAVERSAL_20060123_2101)
|
||||||
#define FUSION_STRICTEST_TRAVERSAL_20060123_2101
|
#define FUSION_STRICTEST_TRAVERSAL_20060123_2101
|
||||||
|
|
||||||
|
#include <boost/config.hpp>
|
||||||
#include <boost/mpl/or.hpp>
|
#include <boost/mpl/or.hpp>
|
||||||
#include <boost/mpl/if.hpp>
|
#include <boost/mpl/if.hpp>
|
||||||
#include <boost/fusion/support/category_of.hpp>
|
#include <boost/fusion/support/category_of.hpp>
|
||||||
@ -53,6 +54,13 @@ namespace boost { namespace fusion
|
|||||||
|
|
||||||
typedef typename stricter_traversal<tag1,tag2>::type type;
|
typedef typename stricter_traversal<tag1,tag2>::type type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// never called, but needed for decltype-based result_of (C++0x)
|
||||||
|
#ifndef BOOST_NO_RVALUE_REFERENCES
|
||||||
|
template<typename StrictestSoFar, typename Next>
|
||||||
|
typename result<strictest_traversal_impl(StrictestSoFar, Next)>::type
|
||||||
|
operator()(StrictestSoFar&&, Next&&) const;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename Sequence>
|
template<typename Sequence>
|
||||||
|
@ -33,7 +33,7 @@ namespace boost { namespace fusion
|
|||||||
static type
|
static type
|
||||||
call(Seq& s)
|
call(Seq& s)
|
||||||
{
|
{
|
||||||
return * advance<N>(s.first);
|
return * fusion::advance<N>(s.first);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -34,6 +34,23 @@ namespace boost { namespace fusion
|
|||||||
{
|
{
|
||||||
template <typename First, typename Last>
|
template <typename First, typename Last>
|
||||||
struct iterator_range;
|
struct iterator_range;
|
||||||
|
|
||||||
|
namespace result_of
|
||||||
|
{
|
||||||
|
template <typename Sequence, typename T>
|
||||||
|
struct push_back;
|
||||||
|
|
||||||
|
template <typename Sequence, typename T>
|
||||||
|
struct push_front;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename Sequence, typename T>
|
||||||
|
typename result_of::push_back<Sequence const, T>::type
|
||||||
|
push_back(Sequence const& seq, T const& x);
|
||||||
|
|
||||||
|
template <typename Sequence, typename T>
|
||||||
|
typename result_of::push_front<Sequence const, T>::type
|
||||||
|
push_front(Sequence const& seq, T const& x);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
namespace boost { namespace fusion { namespace detail
|
namespace boost { namespace fusion { namespace detail
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
namespace boost { namespace fusion { namespace result_of
|
namespace boost { namespace fusion { namespace result_of
|
||||||
{
|
{
|
||||||
template <typename Sequence
|
template <typename Sequence
|
||||||
, BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(FUSION_MAX_VECTOR_SIZE, int I, LONG_MAX)>
|
, BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(FUSION_MAX_VECTOR_SIZE, int I, INT_MAX)>
|
||||||
struct as_nview
|
struct as_nview
|
||||||
{
|
{
|
||||||
typedef mpl::vector_c<
|
typedef mpl::vector_c<
|
||||||
|
@ -23,6 +23,8 @@
|
|||||||
#include <boost/fusion/container/vector.hpp>
|
#include <boost/fusion/container/vector.hpp>
|
||||||
#include <boost/fusion/view/transform_view.hpp>
|
#include <boost/fusion/view/transform_view.hpp>
|
||||||
|
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
|
||||||
namespace boost { namespace fusion
|
namespace boost { namespace fusion
|
||||||
{
|
{
|
||||||
namespace detail
|
namespace detail
|
||||||
@ -35,12 +37,21 @@ namespace boost { namespace fusion
|
|||||||
template<typename U>
|
template<typename U>
|
||||||
struct result<addref(U)> : add_reference<U> {};
|
struct result<addref(U)> : add_reference<U> {};
|
||||||
|
|
||||||
|
#ifdef BOOST_NO_RVALUE_REFERENCES
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename add_reference<T>::type
|
typename add_reference<T>::type
|
||||||
operator()(T& x) const
|
operator()(T& x) const
|
||||||
{
|
{
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
template <typename T>
|
||||||
|
typename result<addref(T)>::type
|
||||||
|
operator()(T&& x) const
|
||||||
|
{
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
struct addconstref
|
struct addconstref
|
||||||
|
@ -62,7 +62,7 @@ namespace boost { namespace fusion {
|
|||||||
|
|
||||||
template<typename Seq>
|
template<typename Seq>
|
||||||
typename result<endpoints(Seq const&)>::type
|
typename result<endpoints(Seq const&)>::type
|
||||||
operator()(Seq const& seq)
|
operator()(Seq const& seq) const
|
||||||
{
|
{
|
||||||
return fusion::advance<M>(fusion::begin(seq));
|
return fusion::advance<M>(fusion::begin(seq));
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
#include <boost/mpl/eval_if.hpp>
|
#include <boost/mpl/eval_if.hpp>
|
||||||
#include <boost/mpl/identity.hpp>
|
#include <boost/mpl/identity.hpp>
|
||||||
#include <boost/type_traits/is_same.hpp>
|
#include <boost/type_traits/is_same.hpp>
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
|
||||||
namespace boost { namespace fusion {
|
namespace boost { namespace fusion {
|
||||||
|
|
||||||
@ -35,6 +36,13 @@ namespace boost { namespace fusion {
|
|||||||
mpl::identity<unused_type>,
|
mpl::identity<unused_type>,
|
||||||
result_of::value_at<typename remove_reference<Seq>::type, N> >
|
result_of::value_at<typename remove_reference<Seq>::type, N> >
|
||||||
{};
|
{};
|
||||||
|
|
||||||
|
// never called, but needed for decltype-based result_of (C++0x)
|
||||||
|
#ifndef BOOST_NO_RVALUE_REFERENCES
|
||||||
|
template<typename Seq>
|
||||||
|
typename result<poly_value_at(Seq)>::type
|
||||||
|
operator()(Seq&&) const;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
#include <boost/mpl/eval_if.hpp>
|
#include <boost/mpl/eval_if.hpp>
|
||||||
#include <boost/mpl/identity.hpp>
|
#include <boost/mpl/identity.hpp>
|
||||||
#include <boost/type_traits/is_same.hpp>
|
#include <boost/type_traits/is_same.hpp>
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
|
||||||
namespace boost { namespace fusion
|
namespace boost { namespace fusion
|
||||||
{
|
{
|
||||||
@ -34,6 +35,13 @@ namespace boost { namespace fusion
|
|||||||
mpl::identity<unused_type>,
|
mpl::identity<unused_type>,
|
||||||
result_of::value_of<It> >
|
result_of::value_of<It> >
|
||||||
{};
|
{};
|
||||||
|
|
||||||
|
// never called, but needed for decltype-based result_of (C++0x)
|
||||||
|
#ifndef BOOST_NO_RVALUE_REFERENCES
|
||||||
|
template<typename It>
|
||||||
|
typename result<poly_value_of(It)>::type
|
||||||
|
operator()(It&&) const;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,6 +37,8 @@
|
|||||||
#include <boost/type_traits/remove_reference.hpp>
|
#include <boost/type_traits/remove_reference.hpp>
|
||||||
#include <boost/type_traits/is_reference.hpp>
|
#include <boost/type_traits/is_reference.hpp>
|
||||||
|
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
|
||||||
namespace boost { namespace fusion {
|
namespace boost { namespace fusion {
|
||||||
|
|
||||||
namespace detail
|
namespace detail
|
||||||
@ -64,6 +66,13 @@ namespace boost { namespace fusion {
|
|||||||
result_of::size<SeqClass>,
|
result_of::size<SeqClass>,
|
||||||
mpl::int_<high_int> >::type type;
|
mpl::int_<high_int> >::type type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// never called, but needed for decltype-based result_of (C++0x)
|
||||||
|
#ifndef BOOST_NO_RVALUE_REFERENCES
|
||||||
|
template<typename Seq>
|
||||||
|
typename result<seq_ref_size(Seq)>::type
|
||||||
|
operator()(Seq&&) const;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
struct poly_min
|
struct poly_min
|
||||||
@ -78,6 +87,13 @@ namespace boost { namespace fusion {
|
|||||||
typedef typename remove_reference<Rhs>::type rhs;
|
typedef typename remove_reference<Rhs>::type rhs;
|
||||||
typedef typename mpl::min<lhs, rhs>::type type;
|
typedef typename mpl::min<lhs, rhs>::type type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// never called, but needed for decltype-based result_of (C++0x)
|
||||||
|
#ifndef BOOST_NO_RVALUE_REFERENCES
|
||||||
|
template<typename Lhs, typename Rhs>
|
||||||
|
typename result<poly_min(Lhs, Rhs)>::type
|
||||||
|
operator()(Lhs&&, Rhs&&) const;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename Sequences>
|
template<typename Sequences>
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
#include <boost/fusion/algorithm/transformation/pop_back.hpp>
|
#include <boost/fusion/algorithm/transformation/pop_back.hpp>
|
||||||
#include <boost/fusion/algorithm/transformation/push_back.hpp>
|
#include <boost/fusion/algorithm/transformation/push_back.hpp>
|
||||||
#include <boost/fusion/algorithm/query/find.hpp>
|
#include <boost/fusion/algorithm/query/find.hpp>
|
||||||
|
#include <boost/fusion/include/back.hpp>
|
||||||
|
#include <boost/fusion/include/array.hpp>
|
||||||
|
#include <boost/array.hpp>
|
||||||
#include <boost/mpl/vector_c.hpp>
|
#include <boost/mpl/vector_c.hpp>
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -85,12 +88,17 @@ main()
|
|||||||
auto i1 = find<int>(popv);
|
auto i1 = find<int>(popv);
|
||||||
auto i2 = find<double>(pop);
|
auto i2 = find<double>(pop);
|
||||||
|
|
||||||
assert(i1 != end(pop));
|
BOOST_TEST(i1 != end(pop));
|
||||||
assert(i2 != end(pop));
|
BOOST_TEST(i2 != end(pop));
|
||||||
assert(i1 != i2);
|
BOOST_TEST(i1 != i2);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
{
|
||||||
|
boost::array<std::size_t, 2> a = { 10, 50 };
|
||||||
|
BOOST_TEST(back(pop_back(a)) == 10);
|
||||||
|
}
|
||||||
|
|
||||||
return boost::report_errors();
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,6 +72,8 @@ struct fobj
|
|||||||
|
|
||||||
int operator()(int i, object &, object_nc &) { return 10 + i; }
|
int operator()(int i, object &, object_nc &) { return 10 + i; }
|
||||||
int operator()(int i, object &, object_nc &) const { return 11 + i; }
|
int operator()(int i, object &, object_nc &) const { return 11 + i; }
|
||||||
|
int operator()(int i, object const &, object_nc &);
|
||||||
|
int operator()(int i, object const &, object_nc &) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct nullary_fobj
|
struct nullary_fobj
|
||||||
|
@ -75,6 +75,8 @@ struct fobj
|
|||||||
|
|
||||||
int operator()(int i, object &, object_nc &) { return 10 + i; }
|
int operator()(int i, object &, object_nc &) { return 10 + i; }
|
||||||
int operator()(int i, object &, object_nc &) const { return 11 + i; }
|
int operator()(int i, object &, object_nc &) const { return 11 + i; }
|
||||||
|
int operator()(int i, object const &, object_nc &);
|
||||||
|
int operator()(int i, object const &, object_nc &) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct nullary_fobj
|
struct nullary_fobj
|
||||||
|
@ -71,7 +71,7 @@ void result_type_tests()
|
|||||||
|
|
||||||
typedef fusion::unfused< test_func<> > t;
|
typedef fusion::unfused< test_func<> > t;
|
||||||
BOOST_TEST(( is_same< boost::result_of< t () >::type, long >::value ));
|
BOOST_TEST(( is_same< boost::result_of< t () >::type, long >::value ));
|
||||||
BOOST_TEST(( is_same< boost::result_of< t (int) >::type, long >::value ));
|
BOOST_TEST(( is_same< boost::result_of< t (int &) >::type, long >::value ));
|
||||||
}
|
}
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
@ -85,7 +85,7 @@ void result_type_tests()
|
|||||||
typedef fusion::unfused_typed< test_func<>, types0 > t0;
|
typedef fusion::unfused_typed< test_func<>, types0 > t0;
|
||||||
BOOST_TEST(( is_same< boost::result_of< t0 () >::type, long >::value ));
|
BOOST_TEST(( is_same< boost::result_of< t0 () >::type, long >::value ));
|
||||||
typedef fusion::unfused_typed< test_func<>, types1 > t1;
|
typedef fusion::unfused_typed< test_func<>, types1 > t1;
|
||||||
BOOST_TEST(( is_same< boost::result_of< t1 (int) >::type, long >::value ));
|
BOOST_TEST(( is_same< boost::result_of< t1 (long &) >::type, long >::value ));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(BOOST_MSVC) && BOOST_MSVC < 1400
|
#if defined(BOOST_MSVC) && BOOST_MSVC < 1400
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
#include <boost/fusion/support/category_of.hpp>
|
#include <boost/fusion/support/category_of.hpp>
|
||||||
#include <boost/static_assert.hpp>
|
#include <boost/static_assert.hpp>
|
||||||
#include <boost/mpl/assert.hpp>
|
#include <boost/mpl/assert.hpp>
|
||||||
|
#include <boost/mpl/at.hpp>
|
||||||
|
#include <boost/typeof/typeof.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
@ -43,6 +45,7 @@ main()
|
|||||||
map_type;
|
map_type;
|
||||||
|
|
||||||
BOOST_MPL_ASSERT((traits::is_associative<map_type>));
|
BOOST_MPL_ASSERT((traits::is_associative<map_type>));
|
||||||
|
BOOST_MPL_ASSERT((traits::is_random_access<map_type>));
|
||||||
|
|
||||||
map_type m(
|
map_type m(
|
||||||
make_pair<int>('X')
|
make_pair<int>('X')
|
||||||
@ -75,6 +78,41 @@ main()
|
|||||||
BOOST_STATIC_ASSERT((boost::is_same<boost::fusion::result_of::key_of<boost::fusion::result_of::next<boost::fusion::result_of::begin<map_type>::type>::type>::type, double>::value));
|
BOOST_STATIC_ASSERT((boost::is_same<boost::fusion::result_of::key_of<boost::fusion::result_of::next<boost::fusion::result_of::begin<map_type>::type>::type>::type, double>::value));
|
||||||
BOOST_STATIC_ASSERT((boost::is_same<boost::fusion::result_of::value_of_data<boost::fusion::result_of::begin<map_type>::type>::type, char>::value));
|
BOOST_STATIC_ASSERT((boost::is_same<boost::fusion::result_of::value_of_data<boost::fusion::result_of::begin<map_type>::type>::type, char>::value));
|
||||||
BOOST_STATIC_ASSERT((boost::is_same<boost::fusion::result_of::value_of_data<boost::fusion::result_of::next<boost::fusion::result_of::begin<map_type>::type>::type>::type, std::string>::value));
|
BOOST_STATIC_ASSERT((boost::is_same<boost::fusion::result_of::value_of_data<boost::fusion::result_of::next<boost::fusion::result_of::begin<map_type>::type>::type>::type, std::string>::value));
|
||||||
|
|
||||||
|
//! Test random access interface.
|
||||||
|
pair<int, char> a = at_c<0>(m);
|
||||||
|
pair<double, std::string> b = at_c<1>(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
//! iterators & random access interface.
|
||||||
|
{
|
||||||
|
typedef pair<boost::mpl::int_<0>, std::string> pair0;
|
||||||
|
typedef pair<boost::mpl::int_<1>, std::string> pair1;
|
||||||
|
typedef pair<boost::mpl::int_<2>, std::string> pair2;
|
||||||
|
typedef pair<boost::mpl::int_<3>, std::string> pair3;
|
||||||
|
typedef pair<boost::mpl::int_<4>, std::string> pair4;
|
||||||
|
|
||||||
|
typedef map< pair0, pair1, pair2, pair3, pair4 > map_type;
|
||||||
|
map_type m( pair0("zero"), pair1("one"), pair2("two"), pair3("three"), pair4("four") );
|
||||||
|
BOOST_AUTO( it0, begin(m) );
|
||||||
|
BOOST_TEST((deref(it0) == pair0("zero")));
|
||||||
|
BOOST_AUTO( it1, fusion::next(it0) );
|
||||||
|
BOOST_TEST((deref(it1) == pair1("one")));
|
||||||
|
BOOST_AUTO( it2, fusion::next(it1) );
|
||||||
|
BOOST_TEST((deref(it2) == pair2("two")));
|
||||||
|
BOOST_AUTO( it3, fusion::next(it2) );
|
||||||
|
BOOST_TEST((deref(it3) == pair3("three")));
|
||||||
|
BOOST_AUTO( it4, fusion::next(it3) );
|
||||||
|
BOOST_TEST((deref(it4) == pair4("four")));
|
||||||
|
|
||||||
|
BOOST_TEST((deref(fusion::advance_c<4>(it0)) == deref(it4)));
|
||||||
|
|
||||||
|
//! Bi-directional
|
||||||
|
BOOST_TEST((deref(fusion::prior(it4)) == deref(it3) ));
|
||||||
|
BOOST_TEST((deref(fusion::prior(it3)) == deref(it2) ));
|
||||||
|
BOOST_TEST((deref(fusion::prior(it2)) == deref(it1) ));
|
||||||
|
BOOST_TEST((deref(fusion::prior(it1)) == deref(it0) ));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/detail/lightweight_test.hpp>
|
||||||
#include <boost/fusion/container/vector/vector.hpp>
|
#include <boost/fusion/container/vector/vector.hpp>
|
||||||
|
#include <boost/fusion/container/map/map.hpp>
|
||||||
#include <boost/fusion/adapted/mpl.hpp>
|
#include <boost/fusion/adapted/mpl.hpp>
|
||||||
#include <boost/fusion/sequence/io/out.hpp>
|
#include <boost/fusion/sequence/io/out.hpp>
|
||||||
#include <boost/fusion/container/generation/make_vector.hpp>
|
#include <boost/fusion/container/generation/make_vector.hpp>
|
||||||
@ -82,6 +83,27 @@ main()
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Map
|
||||||
|
{
|
||||||
|
typedef pair<boost::mpl::int_<0>, std::string> pair0;
|
||||||
|
typedef pair<boost::mpl::int_<1>, std::string> pair1;
|
||||||
|
typedef pair<boost::mpl::int_<2>, std::string> pair2;
|
||||||
|
typedef pair<boost::mpl::int_<3>, std::string> pair3;
|
||||||
|
typedef pair<boost::mpl::int_<4>, std::string> pair4;
|
||||||
|
|
||||||
|
typedef map< pair0, pair1, pair2, pair3, pair4 > map_type;
|
||||||
|
map_type m( pair0("zero"), pair1("one"), pair2("two"), pair3("three"), pair4("four") );
|
||||||
|
typedef reverse_view<map_type> view_type;
|
||||||
|
view_type rev(m);
|
||||||
|
std::cout << rev << std::endl;
|
||||||
|
BOOST_TEST((rev == make_vector( pair4("four"), pair3("three"), pair2("two"), pair1("one"), pair0("zero"))));
|
||||||
|
BOOST_TEST((at_c<0>(rev) == pair4("four")));
|
||||||
|
BOOST_TEST((at_c<1>(rev) == pair3("three")));
|
||||||
|
BOOST_TEST((at_c<2>(rev) == pair2("two")));
|
||||||
|
BOOST_TEST((at_c<3>(rev) == pair1("one")));
|
||||||
|
BOOST_TEST((at_c<4>(rev) == pair0("zero")));
|
||||||
|
}
|
||||||
|
|
||||||
return boost::report_errors();
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|