Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
5eaa391d
Commit
5eaa391d
authored
Aug 17, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated boost library, to 1_44_0
parent
6f009e8f
Changes
119
Show whitespace changes
Inline
Side-by-side
Showing
119 changed files
with
2168 additions
and
495 deletions
+2168
-495
boost_version.txt
include/boost/boost_version.txt
+1
-1
borland.hpp
include/boost/concept/detail/borland.hpp
+3
-2
general.hpp
include/boost/concept/detail/general.hpp
+15
-6
has_constraints.hpp
include/boost/concept/detail/has_constraints.hpp
+4
-2
msvc.hpp
include/boost/concept/detail/msvc.hpp
+27
-5
usage.hpp
include/boost/concept/usage.hpp
+5
-4
borland_prefix.hpp
include/boost/config/abi/borland_prefix.hpp
+1
-1
auto_link.hpp
include/boost/config/auto_link.hpp
+68
-21
borland.hpp
include/boost/config/compiler/borland.hpp
+11
-3
codegear.hpp
include/boost/config/compiler/codegear.hpp
+21
-7
common_edg.hpp
include/boost/config/compiler/common_edg.hpp
+4
-2
digitalmars.hpp
include/boost/config/compiler/digitalmars.hpp
+1
-1
gcc.hpp
include/boost/config/compiler/gcc.hpp
+43
-4
gcc_xml.hpp
include/boost/config/compiler/gcc_xml.hpp
+25
-0
intel.hpp
include/boost/config/compiler/intel.hpp
+23
-0
kai.hpp
include/boost/config/compiler/kai.hpp
+1
-1
metrowerks.hpp
include/boost/config/compiler/metrowerks.hpp
+1
-1
nvcc.hpp
include/boost/config/compiler/nvcc.hpp
+1
-0
sunpro_cc.hpp
include/boost/config/compiler/sunpro_cc.hpp
+19
-5
vacpp.hpp
include/boost/config/compiler/vacpp.hpp
+8
-0
visualc.hpp
include/boost/config/compiler/visualc.hpp
+26
-10
cygwin.hpp
include/boost/config/platform/cygwin.hpp
+0
-3
win32.hpp
include/boost/config/platform/win32.hpp
+8
-1
select_compiler_config.hpp
include/boost/config/select_compiler_config.hpp
+5
-0
dinkumware.hpp
include/boost/config/stdlib/dinkumware.hpp
+11
-1
libcomo.hpp
include/boost/config/stdlib/libcomo.hpp
+1
-0
libstdcpp3.hpp
include/boost/config/stdlib/libstdcpp3.hpp
+1
-0
modena.hpp
include/boost/config/stdlib/modena.hpp
+1
-0
msl.hpp
include/boost/config/stdlib/msl.hpp
+1
-0
roguewave.hpp
include/boost/config/stdlib/roguewave.hpp
+1
-0
sgi.hpp
include/boost/config/stdlib/sgi.hpp
+1
-0
stlport.hpp
include/boost/config/stdlib/stlport.hpp
+1
-0
vacpp.hpp
include/boost/config/stdlib/vacpp.hpp
+1
-0
suffix.hpp
include/boost/config/suffix.hpp
+33
-0
endian.hpp
include/boost/detail/endian.hpp
+5
-2
none_t.hpp
include/boost/detail/none_t.hpp
+1
-1
sp_typeinfo.hpp
include/boost/detail/sp_typeinfo.hpp
+1
-1
workaround.hpp
include/boost/detail/workaround.hpp
+5
-0
foreach.hpp
include/boost/foreach.hpp
+7
-15
transform_iterator.hpp
include/boost/iterator/transform_iterator.hpp
+0
-1
has_xxx.hpp
include/boost/mpl/aux_/config/has_xxx.hpp
+4
-3
bitand.hpp
include/boost/mpl/bitand.hpp
+26
-4
bitor.hpp
include/boost/mpl/bitor.hpp
+26
-4
eval_if.hpp
include/boost/mpl/eval_if.hpp
+3
-3
has_xxx.hpp
include/boost/mpl/has_xxx.hpp
+369
-3
string.hpp
include/boost/mpl/string.hpp
+48
-0
adjacent_filtered.hpp
include/boost/range/adaptor/adjacent_filtered.hpp
+6
-3
map.hpp
include/boost/range/adaptor/map.hpp
+28
-28
replaced.hpp
include/boost/range/adaptor/replaced.hpp
+11
-11
sliced.hpp
include/boost/range/adaptor/sliced.hpp
+19
-9
copy.hpp
include/boost/range/algorithm/copy.hpp
+1
-1
copy_backward.hpp
include/boost/range/algorithm/copy_backward.hpp
+1
-1
equal.hpp
include/boost/range/algorithm/equal.hpp
+4
-4
fill.hpp
include/boost/range/algorithm/fill.hpp
+9
-0
fill_n.hpp
include/boost/range/algorithm/fill_n.hpp
+10
-0
find.hpp
include/boost/range/algorithm/find.hpp
+28
-2
find_end.hpp
include/boost/range/algorithm/find_end.hpp
+69
-4
find_first_of.hpp
include/boost/range/algorithm/find_first_of.hpp
+70
-4
find_if.hpp
include/boost/range/algorithm/find_if.hpp
+28
-2
generate.hpp
include/boost/range/algorithm/generate.hpp
+9
-0
heap_algorithm.hpp
include/boost/range/algorithm/heap_algorithm.hpp
+72
-0
lower_bound.hpp
include/boost/range/algorithm/lower_bound.hpp
+59
-4
partial_sort.hpp
include/boost/range/algorithm/partial_sort.hpp
+22
-0
partial_sort_copy.hpp
include/boost/range/algorithm/partial_sort_copy.hpp
+26
-2
partition.hpp
include/boost/range/algorithm/partition.hpp
+20
-0
random_shuffle.hpp
include/boost/range/algorithm/random_shuffle.hpp
+18
-0
remove.hpp
include/boost/range/algorithm/remove.hpp
+20
-0
remove_copy.hpp
include/boost/range/algorithm/remove_copy.hpp
+2
-2
remove_copy_if.hpp
include/boost/range/algorithm/remove_copy_if.hpp
+3
-3
remove_if.hpp
include/boost/range/algorithm/remove_if.hpp
+20
-0
replace.hpp
include/boost/range/algorithm/replace.hpp
+11
-0
replace_copy.hpp
include/boost/range/algorithm/replace_copy.hpp
+2
-2
replace_copy_if.hpp
include/boost/range/algorithm/replace_copy_if.hpp
+2
-2
replace_if.hpp
include/boost/range/algorithm/replace_if.hpp
+11
-0
reverse.hpp
include/boost/range/algorithm/reverse.hpp
+9
-0
reverse_copy.hpp
include/boost/range/algorithm/reverse_copy.hpp
+1
-1
rotate.hpp
include/boost/range/algorithm/rotate.hpp
+10
-0
search_n.hpp
include/boost/range/algorithm/search_n.hpp
+4
-4
sort.hpp
include/boost/range/algorithm/sort.hpp
+18
-0
stable_sort.hpp
include/boost/range/algorithm/stable_sort.hpp
+18
-0
swap_ranges.hpp
include/boost/range/algorithm/swap_ranges.hpp
+45
-0
upper_bound.hpp
include/boost/range/algorithm/upper_bound.hpp
+60
-4
iota.hpp
include/boost/range/algorithm_ext/iota.hpp
+13
-0
is_sorted.hpp
include/boost/range/algorithm_ext/is_sorted.hpp
+3
-3
overwrite.hpp
include/boost/range/algorithm_ext/overwrite.hpp
+27
-0
join_iterator.hpp
include/boost/range/detail/join_iterator.hpp
+24
-65
irange.hpp
include/boost/range/irange.hpp
+33
-7
join.hpp
include/boost/range/join.hpp
+43
-28
numeric.hpp
include/boost/range/numeric.hpp
+24
-23
add_reference.hpp
include/boost/type_traits/add_reference.hpp
+19
-1
function_traits.hpp
include/boost/type_traits/function_traits.hpp
+2
-2
is_complex.hpp
include/boost/type_traits/is_complex.hpp
+1
-1
is_const.hpp
include/boost/type_traits/is_const.hpp
+24
-5
is_convertible.hpp
include/boost/type_traits/is_convertible.hpp
+1
-1
is_function.hpp
include/boost/type_traits/is_function.hpp
+3
-0
is_reference.hpp
include/boost/type_traits/is_reference.hpp
+8
-81
is_same.hpp
include/boost/type_traits/is_same.hpp
+2
-2
is_volatile.hpp
include/boost/type_traits/is_volatile.hpp
+26
-7
remove_all_extents.hpp
include/boost/type_traits/msvc/remove_all_extents.hpp
+1
-1
remove_bounds.hpp
include/boost/type_traits/msvc/remove_bounds.hpp
+1
-1
remove_const.hpp
include/boost/type_traits/msvc/remove_const.hpp
+1
-1
remove_cv.hpp
include/boost/type_traits/msvc/remove_cv.hpp
+1
-1
remove_extent.hpp
include/boost/type_traits/msvc/remove_extent.hpp
+1
-1
remove_pointer.hpp
include/boost/type_traits/msvc/remove_pointer.hpp
+1
-1
remove_reference.hpp
include/boost/type_traits/msvc/remove_reference.hpp
+1
-1
remove_volatile.hpp
include/boost/type_traits/msvc/remove_volatile.hpp
+1
-1
remove_const.hpp
include/boost/type_traits/remove_const.hpp
+12
-0
remove_cv.hpp
include/boost/type_traits/remove_cv.hpp
+23
-1
remove_reference.hpp
include/boost/type_traits/remove_reference.hpp
+21
-1
remove_volatile.hpp
include/boost/type_traits/remove_volatile.hpp
+11
-0
type_with_alignment.hpp
include/boost/type_traits/type_with_alignment.hpp
+10
-10
compare_pointees.hpp
include/boost/utility/compare_pointees.hpp
+1
-1
in_place_factory_prefix.hpp
include/boost/utility/detail/in_place_factory_prefix.hpp
+1
-1
in_place_factory_suffix.hpp
include/boost/utility/detail/in_place_factory_suffix.hpp
+1
-1
result_of_iterate.hpp
include/boost/utility/detail/result_of_iterate.hpp
+66
-7
in_place_factory.hpp
include/boost/utility/in_place_factory.hpp
+1
-1
result_of.hpp
include/boost/utility/result_of.hpp
+18
-6
typed_in_place_factory.hpp
include/boost/utility/typed_in_place_factory.hpp
+1
-1
value_init.hpp
include/boost/utility/value_init.hpp
+127
-20
No files found.
include/boost/boost_version.txt
View file @
5eaa391d
boost version: 1_4
3
_0
boost version: 1_4
4
_0
include/boost/concept/detail/borland.hpp
View file @
5eaa391d
...
...
@@ -5,8 +5,9 @@
# define BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP
# include <boost/preprocessor/cat.hpp>
# include <boost/concept/detail/backward_compatibility.hpp>
namespace
boost
{
namespace
concept
{
namespace
boost
{
namespace
concept
s
{
template
<
class
ModelFnPtr
>
struct
require
;
...
...
@@ -21,7 +22,7 @@ struct require<void(*)(Model)>
enum
\
{
\
BOOST_PP_CAT
(
boost_concept_check
,
__LINE__
)
=
\
boost
::
concept
::
require
<
ModelFnPtr
>::
instantiate
\
boost
::
concept
s
::
require
<
ModelFnPtr
>::
instantiate
\
}
}}
// namespace boost::concept
...
...
include/boost/concept/detail/general.hpp
View file @
5eaa391d
...
...
@@ -5,6 +5,7 @@
# define BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
# include <boost/preprocessor/cat.hpp>
# include <boost/concept/detail/backward_compatibility.hpp>
# ifdef BOOST_OLD_CONCEPT_SUPPORT
# include <boost/concept/detail/has_constraints.hpp>
...
...
@@ -13,7 +14,7 @@
// This implementation works on Comeau and GCC, all the way back to
// 2.95
namespace
boost
{
namespace
concept
{
namespace
boost
{
namespace
concept
s
{
template
<
class
ModelFn
>
struct
requirement_
;
...
...
@@ -29,6 +30,14 @@ struct requirement
static
void
failed
()
{
((
Model
*
)
0
)
->~
Model
();
}
};
struct
failed
{};
template
<
class
Model
>
struct
requirement
<
failed
************
Model
::************>
{
static
void
failed
()
{
((
Model
*
)
0
)
->~
Model
();
}
};
# ifdef BOOST_OLD_CONCEPT_SUPPORT
template
<
class
Model
>
...
...
@@ -40,9 +49,9 @@ struct constraint
template
<
class
Model
>
struct
requirement_
<
void
(
*
)(
Model
)
>
:
mpl
::
if_
<
concept
::
not_satisfied
<
Model
>
concept
s
::
not_satisfied
<
Model
>
,
constraint
<
Model
>
,
requirement
<
Model
>
,
requirement
<
failed
************
Model
::************
>
>::
type
{};
...
...
@@ -51,14 +60,14 @@ struct requirement_<void(*)(Model)>
// For GCC-2.x, these can't have exactly the same name
template
<
class
Model
>
struct
requirement_
<
void
(
*
)(
Model
)
>
:
requirement
<
Model
>
:
requirement
<
failed
************
Model
::************
>
{};
# endif
# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
typedef
::
boost
::
concept
::
detail
::
instantiate
<
\
&::
boost
::
concept
::
requirement_
<
ModelFnPtr
>::
failed
>
\
typedef
::
boost
::
concept
s
::
detail
::
instantiate
<
\
&::
boost
::
concept
s
::
requirement_
<
ModelFnPtr
>::
failed
>
\
BOOST_PP_CAT
(
boost_concept_check
,
__LINE__
)
}}
...
...
include/boost/concept/detail/has_constraints.hpp
View file @
5eaa391d
...
...
@@ -6,7 +6,9 @@
# include <boost/mpl/bool.hpp>
# include <boost/detail/workaround.hpp>
namespace
boost
{
namespace
concept
{
# include <boost/concept/detail/backward_compatibility.hpp>
namespace
boost
{
namespace
concepts
{
namespace
detail
{
...
...
@@ -43,6 +45,6 @@ struct not_satisfied
typedef
mpl
::
bool_
<
value
>
type
;
};
}}
// namespace boost::concept::detail
}}
// namespace boost::concept
s
::detail
#endif // BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP
include/boost/concept/detail/msvc.hpp
View file @
5eaa391d
...
...
@@ -5,6 +5,7 @@
# define BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
# include <boost/preprocessor/cat.hpp>
# include <boost/concept/detail/backward_compatibility.hpp>
# ifdef BOOST_OLD_CONCEPT_SUPPORT
# include <boost/concept/detail/has_constraints.hpp>
...
...
@@ -12,7 +13,8 @@
# endif
namespace
boost
{
namespace
concept
{
namespace
boost
{
namespace
concepts
{
template
<
class
Model
>
struct
check
...
...
@@ -23,6 +25,18 @@ struct check
}
};
# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
struct
failed
{};
template
<
class
Model
>
struct
check
<
failed
************
Model
::************>
{
virtual
void
failed
(
Model
*
x
)
{
x
->~
Model
();
}
};
# endif
# ifdef BOOST_OLD_CONCEPT_SUPPORT
namespace
detail
...
...
@@ -38,7 +52,11 @@ struct require
:
mpl
::
if_c
<
not_satisfied
<
Model
>::
value
,
detail
::
constraint
# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
,
check
<
Model
>
# else
,
check
<
failed
************
Model
::************>
# endif
>::
type
{};
...
...
@@ -46,7 +64,11 @@ struct require
template
<
class
Model
>
struct
require
# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
:
check
<
Model
>
# else
:
check
<
failed
************
Model
::************>
# endif
{};
# endif
...
...
@@ -70,7 +92,7 @@ struct require<void(*)(Model)>
enum
\
{
\
BOOST_PP_CAT
(
boost_concept_check
,
__LINE__
)
=
\
sizeof
(
::
boost
::
concept
::
require
<
ModelFnPtr
>
)
\
sizeof
(
::
boost
::
concept
s
::
require
<
ModelFnPtr
>
)
\
}
# else // Not vc-7.1
...
...
@@ -83,7 +105,7 @@ require_(void(*)(Model));
enum
\
{
\
BOOST_PP_CAT
(
boost_concept_check
,
__LINE__
)
=
\
sizeof
(
::
boost
::
concept
::
require_
((
ModelFnPtr
)
0
))
\
sizeof
(
::
boost
::
concept
s
::
require_
((
ModelFnPtr
)
0
))
\
}
# endif
...
...
include/boost/concept/usage.hpp
View file @
5eaa391d
...
...
@@ -6,8 +6,9 @@
# include <boost/concept/assert.hpp>
# include <boost/detail/workaround.hpp>
# include <boost/concept/detail/backward_compatibility.hpp>
namespace
boost
{
namespace
concept
{
namespace
boost
{
namespace
concept
s
{
# if BOOST_WORKAROUND(__GNUC__, == 2)
...
...
@@ -25,19 +26,19 @@ struct usage_requirements
# define BOOST_CONCEPT_USAGE(model) \
model
();
/* at least 2.96 and 3.4.3 both need this :( */
\
BOOST_CONCEPT_ASSERT
((
boost
::
concept
::
usage_requirements
<
model
>
));
\
BOOST_CONCEPT_ASSERT
((
boost
::
concept
s
::
usage_requirements
<
model
>
));
\
~
model
()
# else
# define BOOST_CONCEPT_USAGE(model) \
BOOST_CONCEPT_ASSERT
((
boost
::
concept
::
usage_requirements
<
model
>
));
\
BOOST_CONCEPT_ASSERT
((
boost
::
concept
s
::
usage_requirements
<
model
>
));
\
~
model
()
# endif
# endif
}}
// namespace boost::concept
}}
// namespace boost::concept
s
#endif // BOOST_CONCEPT_USAGE_DWA2006919_HPP
include/boost/config/abi/borland_prefix.hpp
View file @
5eaa391d
...
...
@@ -21,7 +21,7 @@
// 8026 - functions taking class by value arguments are not expanded inline
#pragma nopushoptwarn
# pragma option push -
Vx -Ve -a8 -b
-pc -Vmv -VC- -Vl- -w-8027 -w-8026
# pragma option push -
a8 -Vx- -Ve- -b-
-pc -Vmv -VC- -Vl- -w-8027 -w-8026
include/boost/config/auto_link.hpp
View file @
5eaa391d
...
...
@@ -25,6 +25,9 @@ BOOST_LIB_DIAGNOSTIC: Optional: when set the header will print out the name
of the library selected (useful for debugging).
BOOST_AUTO_LINK_NOMANGLE: Specifies that we should link to BOOST_LIB_NAME.lib,
rather than a mangled-name version.
BOOST_AUTO_LINK_TAGGED: Specifies that we link to libraries built with the --layout=tagged option.
This is essentially the same as the default name-mangled version, but without
the compiler name and version, or the Boost version. Just the build options.
These macros will be undef'ed at the end of the header, further this header
has no include guards - so be sure to include it only once from your library!
...
...
@@ -60,6 +63,8 @@ BOOST_LIB_RT_OPT: A suffix that indicates the runtime library used,
a hiphen:
s static runtime (dynamic if not present).
g debug/diagnostic runtime (release if not present).
y Python debug/diagnostic runtime (release if not present).
d debug build (release if not present).
g debug/diagnostic runtime (release if not present).
p STLPort Build.
...
...
@@ -183,8 +188,16 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
&&
defined
(
BOOST_DEBUG_PYTHON
)
&&
defined
(
BOOST_LINKING_PYTHON
)
# define BOOST_LIB_RT_OPT "-gydp"
# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
# define BOOST_LIB_RT_OPT "-gdp"
# elif defined(_DEBUG)\
&&
defined
(
BOOST_DEBUG_PYTHON
)
&&
defined
(
BOOST_LINKING_PYTHON
)
# define BOOST_LIB_RT_OPT "-gydp"
# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
# error "Build options aren't compatible with pre-built libraries"
# elif defined(_DEBUG)
# define BOOST_LIB_RT_OPT "-gdp"
# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
...
...
@@ -195,8 +208,16 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
&&
defined
(
BOOST_DEBUG_PYTHON
)
&&
defined
(
BOOST_LINKING_PYTHON
)
# define BOOST_LIB_RT_OPT "-gydpn"
# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
# define BOOST_LIB_RT_OPT "-gdpn"
# elif defined(_DEBUG)\
&&
defined
(
BOOST_DEBUG_PYTHON
)
&&
defined
(
BOOST_LINKING_PYTHON
)
# define BOOST_LIB_RT_OPT "-gydpn"
# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
# error "Build options aren't compatible with pre-built libraries"
# elif defined(_DEBUG)
# define BOOST_LIB_RT_OPT "-gdpn"
# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
...
...
@@ -207,7 +228,9 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
# else
# if defined(_DEBUG)
# if defined(_DEBUG) && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
# define BOOST_LIB_RT_OPT "-gyd"
# elif defined(_DEBUG)
# define BOOST_LIB_RT_OPT "-gd"
# else
# define BOOST_LIB_RT_OPT
...
...
@@ -219,8 +242,16 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
&&
defined
(
BOOST_DEBUG_PYTHON
)
&&
defined
(
BOOST_LINKING_PYTHON
)
# define BOOST_LIB_RT_OPT "-sgydp"
# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
# define BOOST_LIB_RT_OPT "-sgdp"
# elif defined(_DEBUG)\
&&
defined
(
BOOST_DEBUG_PYTHON
)
&&
defined
(
BOOST_LINKING_PYTHON
)
# define BOOST_LIB_RT_OPT "-sgydp"
# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
# error "Build options aren't compatible with pre-built libraries"
# elif defined(_DEBUG)
# define BOOST_LIB_RT_OPT "-sgdp"
# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
...
...
@@ -231,8 +262,16 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
&&
defined
(
BOOST_DEBUG_PYTHON
)
&&
defined
(
BOOST_LINKING_PYTHON
)
# define BOOST_LIB_RT_OPT "-sgydpn"
# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
# define BOOST_LIB_RT_OPT "-sgdpn"
# elif defined(_DEBUG)\
&&
defined
(
BOOST_DEBUG_PYTHON
)
&&
defined
(
BOOST_LINKING_PYTHON
)
# define BOOST_LIB_RT_OPT "-sgydpn"
# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
# error "Build options aren't compatible with pre-built libraries"
# elif defined(_DEBUG)
# define BOOST_LIB_RT_OPT "-sgdpn"
# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
...
...
@@ -243,7 +282,10 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
# else
# if defined(_DEBUG)
# if defined(_DEBUG)\
&&
defined
(
BOOST_DEBUG_PYTHON
)
&&
defined
(
BOOST_LINKING_PYTHON
)
# define BOOST_LIB_RT_OPT "-sgyd"
# elif defined(_DEBUG)
# define BOOST_LIB_RT_OPT "-sgd"
# else
# define BOOST_LIB_RT_OPT "-s"
...
...
@@ -270,16 +312,26 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
# ifdef _RTLDLL
# ifdef BOOST_BORLAND_DEBUG
# if defined(BOOST_BORLAND_DEBUG)\
&&
defined
(
BOOST_DEBUG_PYTHON
)
&&
defined
(
BOOST_LINKING_PYTHON
)
# define BOOST_LIB_RT_OPT "-yd"
# elif defined(BOOST_BORLAND_DEBUG)
# define BOOST_LIB_RT_OPT "-d"
# elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
# define BOOST_LIB_RT_OPT -y
# else
# define BOOST_LIB_RT_OPT
# endif
# else
# ifdef BOOST_BORLAND_DEBUG
# if defined(BOOST_BORLAND_DEBUG)\
&&
defined
(
BOOST_DEBUG_PYTHON
)
&&
defined
(
BOOST_LINKING_PYTHON
)
# define BOOST_LIB_RT_OPT "-syd"
# elif defined(BOOST_BORLAND_DEBUG)
# define BOOST_LIB_RT_OPT "-sd"
# elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
# define BOOST_LIB_RT_OPT "-sy"
# else
# define BOOST_LIB_RT_OPT "-s"
# endif
...
...
@@ -309,16 +361,21 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
&&
defined
(
BOOST_LIB_RT_OPT
)
\
&&
defined
(
BOOST_LIB_VERSION
)
#if
ndef BOOST_AUTO_LINK_NOMANGLE
# pragma comment
(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION
".lib")
#if
def BOOST_AUTO_LINK_TAGGED
# pragma comment
comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT
".lib")
# ifdef BOOST_LIB_DIAGNOSTIC
# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
# endif
#el
se
#el
if defined(BOOST_AUTO_LINK_NOMANGLE)
# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
# ifdef BOOST_LIB_DIAGNOSTIC
# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
# endif
#else
# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
# ifdef BOOST_LIB_DIAGNOSTIC
# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
# endif
#endif
#else
...
...
@@ -361,13 +418,3 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
# undef BOOST_AUTO_LINK_NOMANGLE
#endif
include/boost/config/compiler/borland.hpp
View file @
5eaa391d
...
...
@@ -218,7 +218,7 @@
//
// check for exception handling support:
//
#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS)
#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS)
&& !defined(BOOST_NO_EXCEPTIONS)
# define BOOST_NO_EXCEPTIONS
#endif
//
...
...
@@ -230,8 +230,9 @@
//
// all versions support __declspec:
//
#ifndef __STRICT_ANSI__
# define BOOST_HAS_DECLSPEC
#if defined(__STRICT_ANSI__)
// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined
# define BOOST_SYMBOL_EXPORT
#endif
//
// ABI fixing headers:
...
...
@@ -261,6 +262,13 @@
# define BOOST_NO_VOID_RETURNS
#endif
// Borland did not implement value-initialization completely, as I reported
// in 2007, Borland Report 51854, "Value-initialization: POD struct should be
// zero-initialized", http://qc.embarcadero.com/wc/qcmain.aspx?d=51854
// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
// (Niels Dekker, LKEB, April 2010)
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
#define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__)
...
...
include/boost/config/compiler/codegear.hpp
View file @
5eaa391d
...
...
@@ -19,8 +19,8 @@
#endif
//
// versions check:
// last known and checked version is 0x62
0
#if (__CODEGEARC__ > 0x62
0
)
// last known and checked version is 0x62
1
#if (__CODEGEARC__ > 0x62
1
)
# if defined(BOOST_ASSERT_CONFIG)
# error "Unknown compiler version - please run the configure tests and report the results"
# else
...
...
@@ -41,7 +41,7 @@
#endif
// CodeGear C++ Builder 2010
#if (__CODEGEARC__ <= 0x62
0
)
#if (__CODEGEARC__ <= 0x62
1
)
# define BOOST_NO_TYPENAME_WITH_CTOR // Cannot use typename keyword when making temporaries of a dependant type
# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
...
...
@@ -51,6 +51,15 @@
// Temporary hack, until specific MPL preprocessed headers are generated
# define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
// CodeGear has not yet completely implemented value-initialization, for
// example for array types, as I reported in 2010: Embarcadero Report 83751,
// "Value-initialization: arrays should have each element value-initialized",
// http://qc.embarcadero.com/wc/qcmain.aspx?d=83751
// Last checked version: Embarcadero C++ 6.21
// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
// (Niels Dekker, LKEB, April 2010)
# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
# ifdef NDEBUG
// fix broken <cstring> so that Boost.test works:
# include <cstring>
...
...
@@ -66,6 +75,11 @@
//
// C++0x macros:
//
#if (__CODEGEARC__ <= 0x620)
#define BOOST_NO_STATIC_ASSERT
#else
#define BOOST_HAS_STATIC_ASSERT
#endif
#define BOOST_HAS_CHAR16_T
#define BOOST_HAS_CHAR32_T
#define BOOST_HAS_LONG_LONG
...
...
@@ -91,7 +105,6 @@
#define BOOST_NO_RAW_LITERALS
#define BOOST_NO_RVALUE_REFERENCES
#define BOOST_NO_SFINAE_EXPR
#define BOOST_NO_STATIC_ASSERT
#define BOOST_NO_TEMPLATE_ALIASES
#define BOOST_NO_UNICODE_LITERALS
#define BOOST_NO_VARIADIC_TEMPLATES
...
...
@@ -122,7 +135,7 @@
//
// check for exception handling support:
//
#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS)
#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS)
&& !defined(BOOST_NO_EXCEPTIONS)
# define BOOST_NO_EXCEPTIONS
#endif
//
...
...
@@ -134,8 +147,9 @@
//
// all versions support __declspec:
//
#if !defined(__STRICT_ANSI__)
# define BOOST_HAS_DECLSPEC
#if defined(__STRICT_ANSI__)
// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined
# define BOOST_SYMBOL_EXPORT
#endif
//
// ABI fixing headers:
...
...
include/boost/config/compiler/common_edg.hpp
View file @
5eaa391d
...
...
@@ -44,7 +44,7 @@
#endif
// See also kai.hpp which checks a Kai-specific symbol for EH
# if !defined(__KCC) && !defined(__EXCEPTIONS)
# if !defined(__KCC) && !defined(__EXCEPTIONS)
&& !defined(BOOST_NO_EXCEPTIONS)
# define BOOST_NO_EXCEPTIONS
# endif
...
...
@@ -59,6 +59,9 @@
//
// See above for BOOST_NO_LONG_LONG
//
#if (__EDG_VERSION__ < 310)
# define BOOST_NO_EXTERN_TEMPLATE
#endif
#if (__EDG_VERSION__ <= 310) || !defined(BOOST_STRICT_CONFIG)
// No support for initializer lists
# define BOOST_NO_INITIALIZER_LISTS
...
...
@@ -74,7 +77,6 @@
#define BOOST_NO_DEFAULTED_FUNCTIONS
#define BOOST_NO_DELETED_FUNCTIONS
#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
#define BOOST_NO_EXTERN_TEMPLATE
#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
#define BOOST_NO_LAMBDAS
#define BOOST_NO_NULLPTR
...
...
include/boost/config/compiler/digitalmars.hpp
View file @
5eaa391d
...
...
@@ -51,7 +51,7 @@
// check for exception handling support:
#if
ndef _CPPUNWIND
#if
!defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS)
# define BOOST_NO_EXCEPTIONS
#endif
...
...
include/boost/config/compiler/gcc.hpp
View file @
5eaa391d
...
...
@@ -42,6 +42,7 @@
# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
# define BOOST_NO_IS_ABSTRACT
# define BOOST_NO_EXTERN_TEMPLATE
#elif __GNUC__ == 3
# if defined (__PATHSCALE__)
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
...
...
@@ -58,6 +59,7 @@
# if __GNUC_MINOR__ < 4
# define BOOST_NO_IS_ABSTRACT
# endif
# define BOOST_NO_EXTERN_TEMPLATE
#endif
#if __GNUC__ < 4
//
...
...
@@ -69,7 +71,19 @@
# endif
#endif
#ifndef __EXCEPTIONS
#if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 )
// Previous versions of GCC did not completely implement value-initialization:
// GCC Bug 30111, "Value-initialization of POD base class doesn't initialize
// members", reported by Jonathan Wakely in 2006,
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30111 (fixed for GCC 4.4)
// GCC Bug 33916, "Default constructor fails to initialize array members",
// reported by Michael Elizabeth Chastain in 2007,
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33916 (fixed for GCC 4.2.4)
// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
#endif
#if !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
# define BOOST_NO_EXCEPTIONS
#endif
...
...
@@ -94,20 +108,45 @@
#if __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 1 )
#define BOOST_HAS_NRVO
#endif
//
// Dynamic shared object (DSO) and dynamic-link library (DLL) support
//
#if __GNUC__ >= 4
# if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
// All Win32 development environments, including 64-bit Windows and MinGW, define
// _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment,
// so does not define _WIN32 or its variants.
# define BOOST_HAS_DECLSPEC
# define BOOST_SYMBOL_EXPORT __attribute__((dllexport))
# define BOOST_SYMBOL_IMPORT __attribute__((dllimport))
# else
# define BOOST_SYMBOL_EXPORT __attribute__((visibility("default")))
# define BOOST_SYMBOL_IMPORT
# endif
# define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default")))
#else
// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined
# define BOOST_SYMBOL_EXPORT
#endif
//
// RTTI and typeinfo detection is possible post gcc-4.3:
//
#if __GNUC__ * 100 + __GNUC_MINOR__ >= 403
# ifndef __GXX_RTTI
# ifndef BOOST_NO_TYPEID
# define BOOST_NO_TYPEID
# endif
# ifndef BOOST_NO_RTTI
# define BOOST_NO_RTTI
# endif
# endif
#endif
// C++0x features not implemented in any GCC version
//
#define BOOST_NO_CONSTEXPR
#define BOOST_NO_EXTERN_TEMPLATE
#define BOOST_NO_NULLPTR
#define BOOST_NO_TEMPLATE_ALIASES
...
...
include/boost/config/compiler/gcc_xml.hpp
View file @
5eaa391d
...
...
@@ -25,6 +25,31 @@
//
#define BOOST_HAS_LONG_LONG
// C++0x features:
//
# define BOOST_NO_CONSTEXPR
# define BOOST_NO_NULLPTR
# define BOOST_NO_TEMPLATE_ALIASES
# define BOOST_NO_DECLTYPE
# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
# define BOOST_NO_RVALUE_REFERENCES
# define BOOST_NO_STATIC_ASSERT
# define BOOST_NO_VARIADIC_TEMPLATES
# define BOOST_NO_AUTO_DECLARATIONS
# define BOOST_NO_AUTO_MULTIDECLARATIONS
# define BOOST_NO_CHAR16_T
# define BOOST_NO_CHAR32_T
# define BOOST_NO_DEFAULTED_FUNCTIONS
# define BOOST_NO_DELETED_FUNCTIONS
# define BOOST_NO_INITIALIZER_LISTS
# define BOOST_NO_SCOPED_ENUMS
# define BOOST_NO_SFINAE_EXPR
# define BOOST_NO_SCOPED_ENUMS
# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
# define BOOST_NO_LAMBDAS
# define BOOST_NO_RAW_LITERALS
# define BOOST_NO_UNICODE_LITERALS
#define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__
include/boost/config/compiler/intel.hpp
View file @
5eaa391d
...
...
@@ -157,6 +157,29 @@ template<> struct assert_intrinsic_wchar_t<unsigned short> {};
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
#endif
//
// An attempt to value-initialize a pointer-to-member may trigger an
// internal error on Intel <= 11.1 (last checked version), as was
// reported by John Maddock, Intel support issue 589832, May 2010.
// Moreover, according to test results from Huang-Vista-x86_32_intel,
// intel-vc9-win-11.1 may leave a non-POD array uninitialized, in some
// cases when it should be value-initialized.
// (Niels Dekker, LKEB, May 2010)
#if defined(__INTEL_COMPILER)
# if __INTEL_COMPILER <= 1110
# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
# endif
#endif
//
// Dynamic shared object (DSO) and dynamic-link library (DLL) support
//
#if defined(__GNUC__) && (__GNUC__ >= 4)
# define BOOST_SYMBOL_EXPORT __attribute__((visibility("default")))
# define BOOST_SYMBOL_IMPORT
# define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default")))
#endif
//
// last known and checked version:
#if (BOOST_INTEL_CXX_VERSION > 1110)
...
...
include/boost/config/compiler/kai.hpp
View file @
5eaa391d
...
...
@@ -17,7 +17,7 @@
# endif
// see also common_edg.hpp which needs a special check for __KCC
# if !defined(_EXCEPTIONS)
# if !defined(_EXCEPTIONS)
&& !defined(BOOST_NO_EXCEPTIONS)
# define BOOST_NO_EXCEPTIONS
# endif
...
...
include/boost/config/compiler/metrowerks.hpp
View file @
5eaa391d
...
...
@@ -48,7 +48,7 @@
# define BOOST_NO_INTRINSIC_WCHAR_T
#endif
#if !__option(exceptions)
#if !__option(exceptions)
&& !defined(BOOST_NO_EXCEPTIONS)
# define BOOST_NO_EXCEPTIONS
#endif
...
...
include/boost/config/compiler/nvcc.hpp
View file @
5eaa391d
...
...
@@ -66,6 +66,7 @@
#define BOOST_NO_0X_HDR_TYPE_TRAITS
#define BOOST_NO_0X_HDR_TUPLE
#define BOOST_NO_0X_HDR_THREAD
#define BOOST_NO_0X_HDR_TYPEINDEX
#define BOOST_NO_0X_HDR_SYSTEM_ERROR
#define BOOST_NO_0X_HDR_REGEX
#define BOOST_NO_0X_HDR_RATIO
...
...
include/boost/config/compiler/sunpro_cc.hpp
View file @
5eaa391d
...
...
@@ -69,6 +69,25 @@
# define BOOST_NO_IS_ABSTRACT
# endif
# if (__SUNPRO_CC <= 0x5100)
// Sun 5.10 may not correctly value-initialize objects of
// some user defined types, as was reported in April 2010
// (CR 6947016), and confirmed by Steve Clamage.
// (Niels Dekker, LKEB, May 2010).
# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
# endif
//
// Dynamic shared object (DSO) and dynamic-link library (DLL) support
//
#if __SUNPRO_CC > 0x500
# define BOOST_SYMBOL_EXPORT __global
# define BOOST_SYMBOL_IMPORT __global
# define BOOST_SYMBOL_VISIBLE __global
#endif
//
// Issues that effect all known versions:
//
...
...
@@ -78,12 +97,7 @@
//
// C++0x features
//
#if(__SUNPRO_CC >= 0x590)
# define BOOST_HAS_LONG_LONG
#else
# define BOOST_NO_LONG_LONG
#endif
#define BOOST_NO_AUTO_DECLARATIONS
#define BOOST_NO_AUTO_MULTIDECLARATIONS
...
...
include/boost/config/compiler/vacpp.hpp
View file @
5eaa391d
...
...
@@ -30,6 +30,14 @@
# define BOOST_NO_INITIALIZER_LISTS
#endif
#if (__IBMCPP__ <= 1110)
// XL C++ V11.1 and earlier versions may not always value-initialize
// a temporary object T(), when T is a non-POD aggregate class type.
// Michael Wong (IBM Canada Ltd) has confirmed this issue and gave it
// high priority. -- Niels Dekker (LKEB), May 2010.
# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
#endif
//
// On AIX thread support seems to be indicated by _THREAD_SAFE:
//
...
...
include/boost/config/compiler/visualc.hpp
View file @
5eaa391d
...
...
@@ -79,6 +79,8 @@
// although a conforming signature for swprint exists in VC7.1
// it appears not to actually work:
# define BOOST_NO_SWPRINTF
// Our extern template tests also fail for this compiler:
# define BOOST_NO_EXTERN_TEMPLATE
#endif
#if defined(UNDER_CE)
...
...
@@ -99,6 +101,24 @@
# define BOOST_NO_ADL_BARRIER
#endif
#if (_MSC_VER <= 1600)
// MSVC (including the latest checked version) has not yet completely
// implemented value-initialization, as is reported:
// "VC++ does not value-initialize members of derived classes without
// user-declared constructor", reported in 2009 by Sylvester Hesp:
// https://connect.microsoft.com/VisualStudio/feedback/details/484295
// "Presence of copy constructor breaks member class initialization",
// reported in 2009 by Alex Vakulenko:
// https://connect.microsoft.com/VisualStudio/feedback/details/499606
// "Value-initialization in new-expression", reported in 2005 by
// Pavel Kuznetsov (MetaCommunications Engineering):
// https://connect.microsoft.com/VisualStudio/feedback/details/100744
// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
// (Niels Dekker, LKEB, May 2010)
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
#endif
#if _MSC_VER <= 1500 || !defined(BOOST_STRICT_CONFIG) // 1500 == VC++ 9.0
# define BOOST_NO_INITIALIZER_LISTS
#endif
...
...
@@ -115,7 +135,7 @@
//
// check for exception handling support:
#if
ndef _CPPUNWIND
#if
!defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS)
# define BOOST_NO_EXCEPTIONS
#endif
...
...
@@ -144,11 +164,6 @@
# define BOOST_NO_RTTI
#endif
//
// all versions support __declspec:
//
#define BOOST_HAS_DECLSPEC
//
// C++0x features
//
...
...
@@ -159,11 +174,14 @@
#if _MSC_VER < 1600
#define BOOST_NO_AUTO_DECLARATIONS
#define BOOST_NO_AUTO_MULTIDECLARATIONS
#define BOOST_NO_DECLTYPE
#define BOOST_NO_LAMBDAS
#define BOOST_NO_RVALUE_REFERENCES
#define BOOST_NO_STATIC_ASSERT
#define BOOST_NO_NULLPTR
#endif // _MSC_VER < 1600
#if _MSC_VER >= 1600
#define BOOST_HAS_STDINT_H
#endif
// C++0x features not supported by any versions
#define BOOST_NO_CHAR16_T
...
...
@@ -171,19 +189,17 @@
#define BOOST_NO_CONCEPTS
#define BOOST_NO_CONSTEXPR
#define BOOST_NO_DEFAULTED_FUNCTIONS
#define BOOST_NO_DECLTYPE
#define BOOST_NO_DELETED_FUNCTIONS
#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
#define BOOST_NO_EXTERN_TEMPLATE
#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
#define BOOST_NO_INITIALIZER_LISTS
#define BOOST_NO_NULLPTR
#define BOOST_NO_RAW_LITERALS
#define BOOST_NO_SCOPED_ENUMS
#define BOOST_NO_SFINAE_EXPR
#define BOOST_NO_TEMPLATE_ALIASES
#define BOOST_NO_UNICODE_LITERALS
#define BOOST_NO_VARIADIC_TEMPLATES
//
// prefix and suffix headers:
//
...
...
include/boost/config/platform/cygwin.hpp
View file @
5eaa391d
...
...
@@ -8,9 +8,6 @@
// cygwin specific config options:
#define BOOST_PLATFORM "Cygwin"
#define BOOST_NO_CWCTYPE
#define BOOST_NO_CWCHAR
#define BOOST_NO_SWPRINTF
#define BOOST_HAS_DIRENT_H
#define BOOST_HAS_LOG1P
#define BOOST_HAS_EXPM1
...
...
include/boost/config/platform/win32.hpp
View file @
5eaa391d
...
...
@@ -21,10 +21,17 @@
# define BOOST_NO_SWPRINTF
#endif
#if !defined(__GNUC__) && !defined(BOOST_HAS_DECLSPEC)
// Default defines for BOOST_SYMBOL_EXPORT and BOOST_SYMBOL_IMPORT
// If a compiler doesn't support __declspec(dllexport)/__declspec(dllimport),
// its boost/config/compiler/ file must define BOOST_SYMBOL_EXPORT and
// BOOST_SYMBOL_IMPORT
#ifndef BOOST_SYMBOL_EXPORT
# define BOOST_HAS_DECLSPEC
# define BOOST_SYMBOL_EXPORT __declspec(dllexport)
# define BOOST_SYMBOL_IMPORT __declspec(dllimport)
#endif
#if defined(__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 2) || ((__MINGW32_MAJOR_VERSION == 2) && (__MINGW32_MINOR_VERSION >= 0)))
# define BOOST_HAS_STDINT_H
# define __STDC_LIMIT_MACROS
...
...
include/boost/config/select_compiler_config.hpp
View file @
5eaa391d
...
...
@@ -15,6 +15,7 @@
// compilers we support:
# define BOOST_CXX_GCCXML 0
# define BOOST_CXX_CLANG 0
# define BOOST_CXX_COMO 0
# define BOOST_CXX_DMC 0
# define BOOST_CXX_INTEL 0
...
...
@@ -49,6 +50,10 @@
// Comeau C++
# define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp"
#elif defined __clang__
// Clang C++ emulates GCC, so it has to appear early.
# define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp"
#elif defined __DMC__
// Digital Mars C++
# define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp"
...
...
include/boost/config/stdlib/dinkumware.hpp
View file @
5eaa391d
...
...
@@ -86,6 +86,11 @@
# define BOOST_NO_STD_LOCALE
#endif
#include <typeinfo>
#if !_HAS_EXCEPTIONS
# define BOOST_NO_STD_TYPEINFO
#endif
// C++0x headers implemented in 520 (as shipped by Microsoft)
//
#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 520
...
...
@@ -100,6 +105,12 @@
# define BOOST_NO_STD_UNORDERED // deprecated; see following
# define BOOST_NO_0X_HDR_UNORDERED_MAP
# define BOOST_NO_0X_HDR_UNORDERED_SET
# define BOOST_NO_0X_HDR_TUPLE
# define BOOST_NO_0X_HDR_TYPEINDEX
#endif
#if !defined(_HAS_TR1_IMPORTS) && !defined(BOOST_NO_0X_HDR_TUPLE)
# define BOOST_NO_0X_HDR_TUPLE
#endif
// C++0x headers not yet implemented
...
...
@@ -114,7 +125,6 @@
# define BOOST_NO_0X_HDR_MUTEX
# define BOOST_NO_0X_HDR_RATIO
# define BOOST_NO_0X_HDR_THREAD
# define BOOST_NO_0X_HDR_TUPLE
#ifdef _CPPLIB_VER
# define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER
...
...
include/boost/config/stdlib/libcomo.hpp
View file @
5eaa391d
...
...
@@ -54,6 +54,7 @@
# define BOOST_NO_0X_HDR_THREAD
# define BOOST_NO_0X_HDR_TUPLE
# define BOOST_NO_0X_HDR_TYPE_TRAITS
# define BOOST_NO_0X_HDR_TYPEINDEX
# define BOOST_NO_STD_UNORDERED // deprecated; see following
# define BOOST_NO_0X_HDR_UNORDERED_MAP
# define BOOST_NO_0X_HDR_UNORDERED_SET
...
...
include/boost/config/stdlib/libstdcpp3.hpp
View file @
5eaa391d
...
...
@@ -123,5 +123,6 @@
# define BOOST_NO_0X_HDR_FUTURE
# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
# define BOOST_NO_0X_HDR_TYPEINDEX
// --- end ---
include/boost/config/stdlib/modena.hpp
View file @
5eaa391d
...
...
@@ -43,6 +43,7 @@
# define BOOST_NO_0X_HDR_THREAD
# define BOOST_NO_0X_HDR_TUPLE
# define BOOST_NO_0X_HDR_TYPE_TRAITS
# define BOOST_NO_0X_HDR_TYPEINDEX
# define BOOST_NO_STD_UNORDERED // deprecated; see following
# define BOOST_NO_0X_HDR_UNORDERED_MAP
# define BOOST_NO_0X_HDR_UNORDERED_SET
...
...
include/boost/config/stdlib/msl.hpp
View file @
5eaa391d
...
...
@@ -67,6 +67,7 @@
# define BOOST_NO_0X_HDR_THREAD
# define BOOST_NO_0X_HDR_TUPLE
# define BOOST_NO_0X_HDR_TYPE_TRAITS
# define BOOST_NO_0X_HDR_TYPEINDEX
# define BOOST_NO_STD_UNORDERED // deprecated; see following
# define BOOST_NO_0X_HDR_UNORDERED_MAP
# define BOOST_NO_0X_HDR_UNORDERED_SET
...
...
include/boost/config/stdlib/roguewave.hpp
View file @
5eaa391d
...
...
@@ -173,6 +173,7 @@
# define BOOST_NO_0X_HDR_THREAD
# define BOOST_NO_0X_HDR_TUPLE
# define BOOST_NO_0X_HDR_TYPE_TRAITS
# define BOOST_NO_0X_HDR_TYPEINDEX
# define BOOST_NO_STD_UNORDERED // deprecated; see following
# define BOOST_NO_0X_HDR_UNORDERED_MAP
# define BOOST_NO_0X_HDR_UNORDERED_SET
...
...
include/boost/config/stdlib/sgi.hpp
View file @
5eaa391d
...
...
@@ -126,6 +126,7 @@
# define BOOST_NO_0X_HDR_THREAD
# define BOOST_NO_0X_HDR_TUPLE
# define BOOST_NO_0X_HDR_TYPE_TRAITS
# define BOOST_NO_0X_HDR_TYPEINDEX
# define BOOST_NO_STD_UNORDERED // deprecated; see following
# define BOOST_NO_0X_HDR_UNORDERED_MAP
# define BOOST_NO_0X_HDR_UNORDERED_SET
...
...
include/boost/config/stdlib/stlport.hpp
View file @
5eaa391d
...
...
@@ -221,6 +221,7 @@ namespace boost { using std::min; using std::max; }
# define BOOST_NO_0X_HDR_THREAD
# define BOOST_NO_0X_HDR_TUPLE
# define BOOST_NO_0X_HDR_TYPE_TRAITS
# define BOOST_NO_0X_HDR_TYPEINDEX
# define BOOST_NO_STD_UNORDERED // deprecated; see following
# define BOOST_NO_0X_HDR_UNORDERED_MAP
# define BOOST_NO_0X_HDR_UNORDERED_SET
...
...
include/boost/config/stdlib/vacpp.hpp
View file @
5eaa391d
...
...
@@ -33,6 +33,7 @@
# define BOOST_NO_0X_HDR_THREAD
# define BOOST_NO_0X_HDR_TUPLE
# define BOOST_NO_0X_HDR_TYPE_TRAITS
# define BOOST_NO_0X_HDR_TYPEINDEX
# define BOOST_NO_STD_UNORDERED // deprecated; see following
# define BOOST_NO_0X_HDR_UNORDERED_MAP
# define BOOST_NO_0X_HDR_UNORDERED_SET
...
...
include/boost/config/suffix.hpp
View file @
5eaa391d
...
...
@@ -25,6 +25,19 @@
#ifndef BOOST_CONFIG_SUFFIX_HPP
#define BOOST_CONFIG_SUFFIX_HPP
//
// ensure that visibility macros are always defined, thus symplifying use
//
#ifndef BOOST_SYMBOL_EXPORT
# define BOOST_SYMBOL_EXPORT
#endif
#ifndef BOOST_SYMBOL_IMPORT
# define BOOST_SYMBOL_IMPORT
#endif
#ifndef BOOST_SYMBOL_VISIBLE
# define BOOST_SYMBOL_VISIBLE
#endif
//
// look for long long by looking for the appropriate macros in <limits.h>.
// Note that we use limits.h rather than climits for maximal portability,
...
...
@@ -82,6 +95,13 @@
# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
#endif
//
// Normalize BOOST_NO_STATIC_ASSERT and (depricated) BOOST_HAS_STATIC_ASSERT:
//
#if !defined(BOOST_NO_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT)
# define BOOST_HAS_STATIC_ASSERT
#endif
//
// if there is no __int64 then there is no specialisation
// for numeric_limits<__int64> either:
...
...
@@ -314,6 +334,13 @@
# define BOOST_NO_INITIALIZER_LISTS
#endif
//
// Set BOOST_HAS_RVALUE_REFS when BOOST_NO_RVALUE_REFERENCES is not defined
//
#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS)
#define BOOST_HAS_RVALUE_REFS
#endif
// BOOST_HAS_ABI_HEADERS
// This macro gets set if we have headers that fix the ABI,
// and prevent ODR violations when linking to external libraries:
...
...
@@ -554,6 +581,12 @@ namespace boost{
#endif // defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
// When BOOST_NO_STD_TYPEINFO is defined, we can just import
// the global definition into std namespace:
#ifdef BOOST_NO_STD_TYPEINFO
#include <typeinfo>
namespace
std
{
using
::
typeinfo
;
}
#endif
// ---------------------------------------------------------------------------//
...
...
include/boost/detail/endian.hpp
View file @
5eaa391d
// Copyright 2005 Caleb Epstein
// Copyright 2006 John Maddock
// Copyright 2010 Rene Rivera
// Distributed under the Boost Software License, Version 1.0. (See accompany-
// ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
...
...
@@ -42,10 +43,12 @@
# error Unknown machine endianness detected.
# endif
# define BOOST_BYTE_ORDER __BYTE_ORDER
#elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN)
#elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) || \
defined
(
__BIG_ENDIAN__
)
&&
!
defined
(
__LITTLE_ENDIAN__
)
# define BOOST_BIG_ENDIAN
# define BOOST_BYTE_ORDER 4321
#elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)
#elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) || \
defined
(
__LITTLE_ENDIAN__
)
&&
!
defined
(
__BIG_ENDIAN__
)
# define BOOST_LITTLE_ENDIAN
# define BOOST_BYTE_ORDER 1234
#elif defined(__sparc) || defined(__sparc__) \
...
...
include/boost/detail/none_t.hpp
View file @
5eaa391d
...
...
@@ -4,7 +4,7 @@
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/lib/optional for documentation.
// See http://www.boost.org/lib
s
/optional for documentation.
//
// You are welcome to contact the author at:
// fernando_cacciola@hotmail.com
...
...
include/boost/detail/sp_typeinfo.hpp
View file @
5eaa391d
...
...
@@ -74,7 +74,7 @@ template<class T> struct sp_typeid_
}
};
template
<
class
T
>
sp_typeinfo
sp_typeid_
<
T
>::
ti_
(
sp_typeid_
<
T
>::
name
()
);
template
<
class
T
>
sp_typeinfo
sp_typeid_
<
T
>::
ti_
=
sp_typeid_
<
T
>::
name
(
);
template
<
class
T
>
struct
sp_typeid_
<
T
&
>:
sp_typeid_
<
T
>
{
...
...
include/boost/detail/workaround.hpp
View file @
5eaa391d
...
...
@@ -65,6 +65,11 @@
#else
#define BOOST_MSVC_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_MSVC_FULL_VER
#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 1
#else
#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 0
#endif
#ifndef __GNUC__
#define __GNUC___WORKAROUND_GUARD 1
#else
...
...
include/boost/foreach.hpp
View file @
5eaa391d
...
...
@@ -31,8 +31,9 @@
// Some compilers let us detect even const-qualified rvalues at compile-time
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1310) && !defined(_PREFAST_) \
||
(
BOOST_WORKAROUND
(
__GNUC__
,
>=
4
)
&&
!
defined
(
BOOST_INTEL
))
\
||
(
BOOST_WORKAROUND
(
__GNUC__
,
==
3
)
&&
(
__GNUC_MINOR__
>=
4
)
&&
!
defined
(
BOOST_INTEL
))
||
(
BOOST_WORKAROUND
(
__GNUC__
,
>=
4
)
&&
!
defined
(
BOOST_INTEL
)
&&
!
defined
(
BOOST_CLANG
))
\
||
(
BOOST_WORKAROUND
(
__GNUC__
,
==
3
)
&&
(
__GNUC_MINOR__
>=
4
)
&&
!
defined
(
BOOST_INTEL
)
&&
\
!
defined
(
BOOST_CLANG
))
# define BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION
#else
// Some compilers allow temporaries to be bound to non-const references.
...
...
@@ -41,7 +42,7 @@
# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
||
BOOST_WORKAROUND
(
__BORLANDC__
,
<
0x593
)
\
||
(
BOOST_WORKAROUND
(
BOOST_INTEL_CXX_VERSION
,
<=
700
)
&&
defined
(
_MSC_VER
))
\
||
BOOST_WORKAROUND
(
__SUNPRO_CC
,
BOOST_TESTED_AT
(
0x570
))
\
||
BOOST_WORKAROUND
(
__SUNPRO_CC
,
<
0x5100
)
\
||
BOOST_WORKAROUND
(
__DECCXX_VER
,
<=
60590042
)
# define BOOST_FOREACH_NO_RVALUE_DETECTION
# endif
...
...
@@ -56,6 +57,7 @@
||
(
BOOST_WORKAROUND
(
__GNUC__
,
==
3
)
&&
(
__GNUC_MINOR__
<=
3
)
&&
defined
(
__APPLE_CC__
))
\
||
BOOST_WORKAROUND
(
__IBMCPP__
,
BOOST_TESTED_AT
(
600
))
\
||
BOOST_WORKAROUND
(
__MWERKS__
,
BOOST_TESTED_AT
(
0x3206
))
\
||
BOOST_WORKAROUND
(
__SUNPRO_CC
,
>=
0x5100
)
\
||
BOOST_WORKAROUND
(
__BORLANDC__
,
BOOST_TESTED_AT
(
0x590
))
# define BOOST_FOREACH_NO_CONST_RVALUE_DETECTION
# else
...
...
@@ -80,6 +82,7 @@
#include <boost/type_traits/is_base_and_derived.hpp>
#include <boost/iterator/iterator_traits.hpp>
#include <boost/utility/addressof.hpp>
#include <boost/foreach_fwd.hpp>
#ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION
# include <new>
...
...
@@ -88,12 +91,6 @@
# include <boost/type_traits/remove_const.hpp>
#endif
// This must be at global scope, hence the uglified name
enum
boost_foreach_argument_dependent_lookup_hack
{
boost_foreach_argument_dependent_lookup_hack_value
};
namespace
boost
{
...
...
@@ -116,11 +113,6 @@ namespace foreach
return
std
::
make_pair
(
begin
,
end
);
}
///////////////////////////////////////////////////////////////////////////////
// boost::foreach::tag
//
typedef
boost_foreach_argument_dependent_lookup_hack
tag
;
///////////////////////////////////////////////////////////////////////////////
// boost::foreach::is_lightweight_proxy
// Specialize this for user-defined collection types if they are inexpensive to copy.
...
...
@@ -705,7 +697,7 @@ end(auto_any_t col, type2type<T, const_> *, bool *)
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template
<
typename
T
,
typename
C
>
inline
auto_any
<
int
>
end
(
auto_any_t
col
,
type2type
<
T
*
,
C
>
*
,
boost
::
mpl
::
true_
*
)
// null-terminated C-style strings
end
(
auto_any_t
,
type2type
<
T
*
,
C
>
*
,
boost
::
mpl
::
true_
*
)
// null-terminated C-style strings
{
return
0
;
// not used
}
...
...
include/boost/iterator/transform_iterator.hpp
View file @
5eaa391d
...
...
@@ -7,7 +7,6 @@
#ifndef BOOST_TRANSFORM_ITERATOR_23022003THW_HPP
#define BOOST_TRANSFORM_ITERATOR_23022003THW_HPP
#include <boost/function.hpp>
#include <boost/iterator.hpp>
#include <boost/iterator/detail/enable_if.hpp>
#include <boost/iterator/iterator_adaptor.hpp>
...
...
include/boost/mpl/aux_/config/has_xxx.hpp
View file @
5eaa391d
...
...
@@ -11,9 +11,9 @@
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: has_xxx.hpp
49267 2008-10-11 06:19:02
Z agurtovoy $
// $Date: 20
08-10-11 02:19:02 -0400 (Sat, 11 Oct 2008
) $
// $Revision:
49267
$
// $Id: has_xxx.hpp
63518 2010-07-02 08:32:03
Z agurtovoy $
// $Date: 20
10-07-02 04:32:03 -0400 (Fri, 02 Jul 2010
) $
// $Revision:
63518
$
#include <boost/mpl/aux_/config/overload_resolution.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
...
...
@@ -27,6 +27,7 @@
)
# define BOOST_MPL_CFG_NO_HAS_XXX
# define BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE
#endif
...
...
include/boost/mpl/bitand.hpp
View file @
5eaa391d
...
...
@@ -2,7 +2,7 @@
#ifndef BOOST_MPL_BITAND_HPP_INCLUDED
#define BOOST_MPL_BITAND_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-200
4
// Copyright Aleksey Gurtovoy 2000-200
9
// Copyright Jaap Suter 2003
//
// Distributed under the Boost Software License, Version 1.0.
...
...
@@ -11,13 +11,35 @@
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: bitand.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
// $Id: bitand.hpp 63520 2010-07-02 08:59:55Z agurtovoy $
// $Date: 2010-07-02 04:59:55 -0400 (Fri, 02 Jul 2010) $
// $Revision: 63520 $
// agurt, 23/jan/10: workaround a conflict with <iso646.h> header's
// macros, see http://tinyurl.com/ycwdxco; 'defined(bitand)'
// has to be checked in a separate condition, otherwise GCC complains
// about 'bitand' being an alternative token
#if defined(_MSC_VER)
#ifndef __GCCXML__
#if defined(bitand)
# pragma push_macro("bitand")
# undef bitand
# define bitand(x)
#endif
#endif
#endif
#define AUX778076_OP_NAME bitand_
#define AUX778076_OP_PREFIX bitand
#define AUX778076_OP_TOKEN &
#include <boost/mpl/aux_/arithmetic_op.hpp>
#if defined(_MSC_VER)
#ifndef __GCCXML__
#if defined(bitand)
# pragma pop_macro("bitand")
#endif
#endif
#endif
#endif // BOOST_MPL_BITAND_HPP_INCLUDED
include/boost/mpl/bitor.hpp
View file @
5eaa391d
...
...
@@ -2,7 +2,7 @@
#ifndef BOOST_MPL_BITOR_HPP_INCLUDED
#define BOOST_MPL_BITOR_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-200
4
// Copyright Aleksey Gurtovoy 2000-200
9
// Copyright Jaap Suter 2003
//
// Distributed under the Boost Software License, Version 1.0.
...
...
@@ -11,13 +11,35 @@
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: bitor.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
// $Id: bitor.hpp 63520 2010-07-02 08:59:55Z agurtovoy $
// $Date: 2010-07-02 04:59:55 -0400 (Fri, 02 Jul 2010) $
// $Revision: 63520 $
// agurt, 23/jan/10: workaround a conflict with <iso646.h> header's
// macros, see http://tinyurl.com/ycwdxco; 'defined(bitor)'
// has to be checked in a separate condition, otherwise GCC complains
// about 'bitor' being an alternative token
#if defined(_MSC_VER)
#ifndef __GCCXML__
#if defined(bitor)
# pragma push_macro("bitor")
# undef bitor
# define bitor(x)
#endif
#endif
#endif
#define AUX778076_OP_NAME bitor_
#define AUX778076_OP_PREFIX bitor
#define AUX778076_OP_TOKEN |
#include <boost/mpl/aux_/arithmetic_op.hpp>
#if defined(_MSC_VER)
#ifndef __GCCXML__
#if defined(bitor)
# pragma pop_macro("bitor")
#endif
#endif
#endif
#endif // BOOST_MPL_BITOR_HPP_INCLUDED
include/boost/mpl/eval_if.hpp
View file @
5eaa391d
...
...
@@ -10,9 +10,9 @@
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: eval_if.hpp
49267 2008-10-11 06:19:02Z agurtovoy
$
// $Date: 20
08-10-11 02:19:02 -0400 (Sat, 11 Oct 2008
) $
// $Revision:
49267
$
// $Id: eval_if.hpp
61921 2010-05-11 21:33:24Z neilgroves
$
// $Date: 20
10-05-11 17:33:24 -0400 (Tue, 11 May 2010
) $
// $Revision:
61921
$
#include <boost/mpl/if.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
...
...
include/boost/mpl/has_xxx.hpp
View file @
5eaa391d
...
...
@@ -4,6 +4,7 @@
// Copyright Aleksey Gurtovoy 2002-2006
// Copyright David Abrahams 2002-2003
// Copyright Daniel Walker 2007
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
...
...
@@ -11,20 +12,26 @@
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: has_xxx.hpp
49273 2008-10-11 06:54:06Z agurtovoy
$
// $Date: 20
08-10-11 02:54:06 -0400 (Sat, 11 Oct 2008
) $
// $Revision:
49273
$
// $Id: has_xxx.hpp
64146 2010-07-19 00:46:31Z djwalker
$
// $Date: 20
10-07-18 20:46:31 -0400 (Sun, 18 Jul 2010
) $
// $Revision:
64146
$
#include <boost/mpl/bool.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/type_wrapper.hpp>
#include <boost/mpl/aux_/yes_no.hpp>
#include <boost/mpl/aux_/config/gcc.hpp>
#include <boost/mpl/aux_/config/has_xxx.hpp>
#include <boost/mpl/aux_/config/msvc_typename.hpp>
#include <boost/mpl/aux_/config/msvc.hpp>
#include <boost/mpl/aux_/config/static_constant.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
#include <boost/preprocessor/array/elem.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/control/if.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
#if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x590) )
# include <boost/type_traits/is_class.hpp>
...
...
@@ -271,4 +278,363 @@ struct trait \
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF
(
BOOST_PP_CAT
(
has_
,
name
),
name
,
false
)
\
/**/
#if !defined(BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE)
// Create a boolean Metafunction to detect a nested template
// member. This implementation is based on a USENET newsgroup's
// posting by Aleksey Gurtovoy (comp.lang.c++.moderated, 2002-03-19),
// Rani Sharoni's USENET posting cited above, the non-template has_xxx
// implementations above, and discussion on the Boost mailing list.
# if !defined(BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES)
# if BOOST_WORKAROUND(BOOST_MSVC, <= 1400)
# define BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES 1
# endif
# endif
# if !defined(BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION)
# if (defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS))
# define BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION 1
# endif
# endif
# if !defined(BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE)
# if BOOST_WORKAROUND(BOOST_MSVC, <= 1400)
# define BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE 1
# endif
# endif
// NOTE: Many internal implementation macros take a Boost.Preprocessor
// array argument called args which is of the following form.
// ( 4, ( trait, name, max_arity, default_ ) )
# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args) \
BOOST_PP_CAT
(
BOOST_PP_ARRAY_ELEM
(
0
,
args
)
,
_introspect
)
\
/**/
# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) \
BOOST_PP_CAT
(
BOOST_PP_CAT
(
BOOST_PP_ARRAY_ELEM
(
0
,
args
)
,
_substitute
),
n
)
\
/**/
# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args) \
BOOST_PP_CAT
(
BOOST_PP_ARRAY_ELEM
(
0
,
args
)
,
_test
)
\
/**/
// Thanks to Guillaume Melquiond for pointing out the need for the
// "substitute" template as an argument to the overloaded test
// functions to get SFINAE to work for member templates with the
// correct name but different number of arguments.
# define BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE(z, n, args) \
template
<
\
template
<
BOOST_PP_ENUM_PARAMS
(
BOOST_PP_INC
(
n
),
typename
V
)
>
class
V
\
>
\
struct
BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME
(
args
,
n
)
{
\
};
\
/**/
# define BOOST_MPL_HAS_MEMBER_SUBSTITUTE(args, substitute_macro) \
BOOST_PP_REPEAT
(
\
BOOST_PP_ARRAY_ELEM
(
2
,
args
)
\
,
BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE
\
,
args
\
)
\
/**/
# if !BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION
# define BOOST_MPL_HAS_MEMBER_REJECT(args, member_macro) \
template
<
typename
V
>
\
static
boost
::
mpl
::
aux
::
no_tag
\
BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME
(
args
)(...);
\
/**/
# else
# define BOOST_MPL_HAS_MEMBER_REJECT(args, member_macro) \
static
boost
::
mpl
::
aux
::
no_tag
\
BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME
(
args
)(...);
\
/**/
# endif
# if !BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES
# define BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT(z, n, args) \
template
<
typename
V
>
\
static
boost
::
mpl
::
aux
::
yes_tag
\
BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME
(
args
)(
\
boost
::
mpl
::
aux
::
type_wrapper
<
V
>
const
volatile
*
\
,
BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME
(
args
,
n
)
<
\
V
::
template
BOOST_PP_ARRAY_ELEM
(
1
,
args
)
\
>*
=
0
\
);
\
/**/
# define BOOST_MPL_HAS_MEMBER_ACCEPT(args, member_macro) \
BOOST_PP_REPEAT
(
\
BOOST_PP_ARRAY_ELEM
(
2
,
args
)
\
,
BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT
\
,
args
\
)
\
/**/
# else
# define BOOST_MPL_HAS_MEMBER_ACCEPT(args, member_macro) \
template
<
typename
V
>
\
static
boost
::
mpl
::
aux
::
yes_tag
\
BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME
(
args
)(
\
V
const
volatile
*
\
,
member_macro
(
args
,
V
,
T
)
*
=
0
\
);
\
/**/
# endif
# if !BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION
# define BOOST_MPL_HAS_MEMBER_TEST(args) \
sizeof
(
BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME
(
args
)
<
U
>
(
0
))
\
==
sizeof
(
boost
::
mpl
::
aux
::
yes_tag
)
\
/**/
# else
# if !BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES
# define BOOST_MPL_HAS_MEMBER_TEST(args) \
sizeof
(
\
BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME
(
args
)(
\
static_cast
<
boost
::
mpl
::
aux
::
type_wrapper
<
U
>*
>
(
0
)
\
)
\
)
==
sizeof
(
boost
::
mpl
::
aux
::
yes_tag
)
\
/**/
# else
# define BOOST_MPL_HAS_MEMBER_TEST(args) \
sizeof
(
\
BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME
(
args
)(
\
static_cast
<
U
*
>
(
0
)
\
)
\
)
==
sizeof
(
boost
::
mpl
::
aux
::
yes_tag
)
\
/**/
# endif
# endif
# define BOOST_MPL_HAS_MEMBER_INTROSPECT( \
args
,
substitute_macro
,
member_macro
\
)
\
template
<
typename
U
>
\
struct
BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME
(
args
)
{
\
BOOST_MPL_HAS_MEMBER_SUBSTITUTE
(
args
,
substitute_macro
)
\
BOOST_MPL_HAS_MEMBER_REJECT
(
args
,
member_macro
)
\
BOOST_MPL_HAS_MEMBER_ACCEPT
(
args
,
member_macro
)
\
BOOST_STATIC_CONSTANT
(
\
bool
,
value
=
BOOST_MPL_HAS_MEMBER_TEST
(
args
)
\
);
\
typedef
boost
::
mpl
::
bool_
<
value
>
type
;
\
};
\
/**/
# define BOOST_MPL_HAS_MEMBER_IMPLEMENTATION( \
args
,
introspect_macro
,
substitute_macro
,
member_macro
\
)
\
template
<
\
typename
T
\
,
typename
fallback_
\
=
boost
::
mpl
::
bool_
<
BOOST_PP_ARRAY_ELEM
(
3
,
args
)
>
\
>
\
class
BOOST_PP_ARRAY_ELEM
(
0
,
args
)
{
\
introspect_macro
(
args
,
substitute_macro
,
member_macro
)
\
public
:
\
static
const
bool
value
\
=
BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME
(
args
)
<
T
>::
value
;
\
typedef
typename
BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME
(
args
)
<
\
T
\
>::
type
type
;
\
};
\
/**/
// BOOST_MPL_HAS_MEMBER_WITH_FUNCTION_SFINAE expands to the full
// implementation of the function-based metafunction. Compile with -E
// to see the preprocessor output for this macro.
# define BOOST_MPL_HAS_MEMBER_WITH_FUNCTION_SFINAE( \
args
,
substitute_macro
,
member_macro
\
)
\
BOOST_MPL_HAS_MEMBER_IMPLEMENTATION
(
\
args
\
,
BOOST_MPL_HAS_MEMBER_INTROSPECT
\
,
substitute_macro
\
,
member_macro
\
)
\
/**/
# if BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE
# if !defined(BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE)
# if BOOST_WORKAROUND(BOOST_MSVC, <= 1400)
# define BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE 1
# endif
# endif
# if !BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE
# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \
args
,
n
\
)
\
BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME
(
args
,
n
)
\
/**/
# else
# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \
args
,
n
\
)
\
BOOST_PP_CAT
(
\
boost_mpl_has_xxx_
\
,
BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME
(
args
,
n
)
\
)
\
/**/
# endif
# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME( \
args
\
)
\
BOOST_PP_CAT
(
\
BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE
(
\
args
,
0
\
)
\
,
_tag
\
)
\
/**/
# define BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE_WITH_TEMPLATE_SFINAE( \
z
,
n
,
args
\
)
\
template
<
\
template
<
BOOST_PP_ENUM_PARAMS
(
BOOST_PP_INC
(
n
),
typename
U
)
>
class
U
\
>
\
struct
BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE
(
\
args
,
n
\
)
{
\
typedef
\
BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME
(
args
)
\
type
;
\
};
\
/**/
# define BOOST_MPL_HAS_MEMBER_SUBSTITUTE_WITH_TEMPLATE_SFINAE( \
args
,
substitute_macro
\
)
\
typedef
void
\
BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME
(
args
);
\
BOOST_PP_REPEAT
(
\
BOOST_PP_ARRAY_ELEM
(
2
,
args
)
\
,
BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE_WITH_TEMPLATE_SFINAE
\
,
args
\
)
\
/**/
# define BOOST_MPL_HAS_MEMBER_REJECT_WITH_TEMPLATE_SFINAE( \
args
,
member_macro
\
)
\
template
<
\
typename
U
\
,
typename
V
\
=
BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME
(
args
)
\
>
\
struct
BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME
(
args
)
{
\
BOOST_STATIC_CONSTANT
(
bool
,
value
=
false
);
\
typedef
boost
::
mpl
::
bool_
<
value
>
type
;
\
};
\
/**/
# define BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT_WITH_TEMPLATE_SFINAE( \
z
,
n
,
args
\
)
\
template
<
typename
U
>
\
struct
BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME
(
args
)
<
\
U
\
,
typename
\
BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE
(
\
args
,
n
\
)
<
\
BOOST_MSVC_TYPENAME
U
::
BOOST_PP_ARRAY_ELEM
(
1
,
args
)
<
>
\
>::
type
\
>
{
\
BOOST_STATIC_CONSTANT
(
bool
,
value
=
true
);
\
typedef
boost
::
mpl
::
bool_
<
value
>
type
;
\
};
\
/**/
# define BOOST_MPL_HAS_MEMBER_ACCEPT_WITH_TEMPLATE_SFINAE( \
args
,
member_macro
\
)
\
BOOST_PP_REPEAT
(
\
BOOST_PP_ARRAY_ELEM
(
2
,
args
)
\
,
BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT_WITH_TEMPLATE_SFINAE
\
,
args
\
)
\
/**/
# define BOOST_MPL_HAS_MEMBER_INTROSPECT_WITH_TEMPLATE_SFINAE( \
args
,
substitute_macro
,
member_macro
\
)
\
BOOST_MPL_HAS_MEMBER_REJECT_WITH_TEMPLATE_SFINAE
(
args
,
member_macro
)
\
BOOST_MPL_HAS_MEMBER_ACCEPT_WITH_TEMPLATE_SFINAE
(
args
,
member_macro
)
\
template
<
typename
U
>
\
struct
BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME
(
args
)
\
:
BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME
(
args
)
<
U
>
{
\
};
\
/**/
// BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE expands to the full
// implementation of the template-based metafunction. Compile with -E
// to see the preprocessor output for this macro.
//
// Note that if BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE is
// defined BOOST_MPL_HAS_MEMBER_SUBSTITUTE_WITH_TEMPLATE_SFINAE needs
// to be expanded at namespace level before
// BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE can be used.
# define BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE( \
args
,
substitute_macro
,
member_macro
\
)
\
BOOST_MPL_HAS_MEMBER_SUBSTITUTE_WITH_TEMPLATE_SFINAE
(
\
args
,
substitute_macro
\
)
\
BOOST_MPL_HAS_MEMBER_IMPLEMENTATION
(
\
args
\
,
BOOST_MPL_HAS_MEMBER_INTROSPECT_WITH_TEMPLATE_SFINAE
\
,
substitute_macro
\
,
member_macro
\
)
\
/**/
# endif // BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE
// Note: In the current implementation the parameter and access macros
// are no longer expanded.
# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1400)
# define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, default_) \
BOOST_MPL_HAS_MEMBER_WITH_FUNCTION_SFINAE
(
\
(
4
,
(
trait
,
name
,
BOOST_MPL_LIMIT_METAFUNCTION_ARITY
,
default_
)
)
\
,
BOOST_MPL_HAS_MEMBER_TEMPLATE_SUBSTITUTE_PARAMETER
\
,
BOOST_MPL_HAS_MEMBER_TEMPLATE_ACCESS
\
)
\
/**/
# else
# define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, default_) \
BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE
(
\
(
4
,
(
trait
,
name
,
BOOST_MPL_LIMIT_METAFUNCTION_ARITY
,
default_
)
)
\
,
BOOST_MPL_HAS_MEMBER_TEMPLATE_SUBSTITUTE_PARAMETER
\
,
BOOST_MPL_HAS_MEMBER_TEMPLATE_ACCESS
\
)
\
/**/
# endif
#else // BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE
// placeholder implementation
# define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, default_) \
template
<
typename
T
\
,
typename
fallback_
=
boost
::
mpl
::
bool_
<
default_
>
>
\
struct
trait
{
\
BOOST_STATIC_CONSTANT
(
bool
,
value
=
fallback_
::
value
);
\
typedef
fallback_
type
;
\
};
\
/**/
#endif // BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE
# define BOOST_MPL_HAS_XXX_TEMPLATE_DEF(name) \
BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF
(
\
BOOST_PP_CAT
(
has_
,
name
),
name
,
false
\
)
\
/**/
#endif // BOOST_MPL_HAS_XXX_HPP_INCLUDED
include/boost/mpl/string.hpp
View file @
5eaa391d
...
...
@@ -240,6 +240,18 @@ namespace boost { namespace mpl
};
};
template
<
typename
Tag
>
struct
has_push_back_impl
;
template
<>
struct
has_push_back_impl
<
mpl
::
string_tag
>
{
template
<
typename
Sequence
>
struct
apply
:
mpl
::
true_
{};
};
template
<
typename
Tag
>
struct
pop_back_impl
;
...
...
@@ -267,6 +279,18 @@ namespace boost { namespace mpl
#undef M0
};
template
<
typename
Tag
>
struct
has_pop_back_impl
;
template
<>
struct
has_pop_back_impl
<
mpl
::
string_tag
>
{
template
<
typename
Sequence
>
struct
apply
:
mpl
::
true_
{};
};
template
<
typename
Tag
>
struct
push_front_impl
;
...
...
@@ -341,6 +365,18 @@ namespace boost { namespace mpl
};
};
template
<
typename
Tag
>
struct
has_push_front_impl
;
template
<>
struct
has_push_front_impl
<
mpl
::
string_tag
>
{
template
<
typename
Sequence
>
struct
apply
:
mpl
::
true_
{};
};
template
<
typename
Tag
>
struct
pop_front_impl
;
...
...
@@ -375,6 +411,18 @@ namespace boost { namespace mpl
};
};
template
<
typename
Tag
>
struct
has_pop_front_impl
;
template
<>
struct
has_pop_front_impl
<
mpl
::
string_tag
>
{
template
<
typename
Sequence
>
struct
apply
:
mpl
::
true_
{};
};
template
<
typename
Tag
>
struct
insert_range_impl
;
...
...
include/boost/range/adaptor/adjacent_filtered.hpp
View file @
5eaa391d
...
...
@@ -27,7 +27,6 @@
namespace
boost
{
namespace
range_detail
{
template
<
class
Iter
,
class
Pred
,
bool
default_pass
>
...
...
@@ -140,10 +139,14 @@ namespace boost
public
:
adjacent_filter_range
(
const
P
&
p
,
R
&
r
)
:
base_range
(
skip_iter
(
boost
::
begin
(
r
),
boost
::
end
(
r
),
p
),
skip_iter
(
boost
::
end
(
r
),
boost
::
end
(
r
),
p
)
)
:
base_range
(
skip_iter
(
boost
::
begin
(
r
),
boost
::
end
(
r
),
p
),
skip_iter
(
boost
::
end
(
r
),
boost
::
end
(
r
),
p
)
)
{
}
private
:
P
m_pred
;
R
*
m_range
;
};
template
<
class
T
>
...
...
include/boost/range/adaptor/map.hpp
View file @
5eaa391d
...
...
@@ -25,7 +25,7 @@ namespace boost
template
<
class
Map
>
struct
select_first
{
typedef
BOOST_DEDUCED_TYPENAME
Map
::
value_
type
pair_t
;
typedef
BOOST_DEDUCED_TYPENAME
range_value
<
Map
>::
type
pair_t
;
typedef
const
BOOST_DEDUCED_TYPENAME
pair_t
::
first_type
&
result_type
;
...
...
@@ -38,7 +38,7 @@ namespace boost
template
<
class
Map
>
struct
select_second_mutable
{
typedef
BOOST_DEDUCED_TYPENAME
Map
::
value_
type
pair_t
;
typedef
BOOST_DEDUCED_TYPENAME
range_value
<
Map
>::
type
pair_t
;
typedef
BOOST_DEDUCED_TYPENAME
pair_t
::
second_type
&
result_type
;
result_type
operator
()(
pair_t
&
r
)
const
...
...
@@ -50,7 +50,7 @@ namespace boost
template
<
class
Map
>
struct
select_second_const
{
typedef
BOOST_DEDUCED_TYPENAME
Map
::
value_
type
pair_t
;
typedef
BOOST_DEDUCED_TYPENAME
range_value
<
Map
>::
type
pair_t
;
typedef
const
BOOST_DEDUCED_TYPENAME
pair_t
::
second_type
&
result_type
;
...
...
include/boost/range/adaptor/replaced.hpp
View file @
5eaa391d
...
...
@@ -47,7 +47,7 @@ namespace boost
};
template
<
class
R
>
class
replace_range
:
class
replace
d
_range
:
public
boost
::
iterator_range
<
boost
::
transform_iterator
<
replace_value
<
BOOST_DEDUCED_TYPENAME
range_value
<
R
>::
type
>
,
...
...
@@ -64,7 +64,7 @@ namespace boost
public
:
typedef
BOOST_DEDUCED_TYPENAME
range_value
<
R
>::
type
value_type
;
replace_range
(
R
&
r
,
value_type
from
,
value_type
to
)
replace
d
_range
(
R
&
r
,
value_type
from
,
value_type
to
)
:
base_t
(
make_transform_iterator
(
boost
::
begin
(
r
),
Fn
(
from
,
to
)
),
make_transform_iterator
(
boost
::
end
(
r
),
Fn
(
from
,
to
)
)
)
{
}
...
...
@@ -83,23 +83,23 @@ namespace boost
};
template
<
class
InputRng
>
inline
replace_range
<
InputRng
>
inline
replace
d
_range
<
InputRng
>
operator
|
(
InputRng
&
r
,
const
replace_holder
<
BOOST_DEDUCED_TYPENAME
range_value
<
InputRng
>::
type
>&
f
)
{
return
replace_range
<
InputRng
>
(
r
,
f
.
val1
,
f
.
val2
);
return
replace
d
_range
<
InputRng
>
(
r
,
f
.
val1
,
f
.
val2
);
}
template
<
class
InputRng
>
inline
replace_range
<
const
InputRng
>
inline
replace
d
_range
<
const
InputRng
>
operator
|
(
const
InputRng
&
r
,
const
replace_holder
<
BOOST_DEDUCED_TYPENAME
range_value
<
InputRng
>::
type
>&
f
)
{
return
replace_range
<
const
InputRng
>
(
r
,
f
.
val1
,
f
.
val2
);
return
replace
d
_range
<
const
InputRng
>
(
r
,
f
.
val1
,
f
.
val2
);
}
}
// 'range_detail'
using
range_detail
::
replace_range
;
using
range_detail
::
replace
d
_range
;
namespace
adaptors
{
...
...
@@ -111,21 +111,21 @@ namespace boost
}
template
<
class
InputRange
>
inline
replace_range
<
InputRange
>
inline
replace
d
_range
<
InputRange
>
replace
(
InputRange
&
rng
,
BOOST_DEDUCED_TYPENAME
range_value
<
InputRange
>::
type
from
,
BOOST_DEDUCED_TYPENAME
range_value
<
InputRange
>::
type
to
)
{
return
replace_range
<
InputRange
>
(
rng
,
from
,
to
);
return
replace
d
_range
<
InputRange
>
(
rng
,
from
,
to
);
}
template
<
class
InputRange
>
inline
replace_range
<
const
InputRange
>
inline
replace
d
_range
<
const
InputRange
>
replace
(
const
InputRange
&
rng
,
BOOST_DEDUCED_TYPENAME
range_value
<
const
InputRange
>::
type
from
,
BOOST_DEDUCED_TYPENAME
range_value
<
const
InputRange
>::
type
to
)
{
return
replace_range
<
const
InputRange
>
(
rng
,
from
,
to
);
return
replace
d
_range
<
const
InputRange
>
(
rng
,
from
,
to
);
}
}
// 'adaptors'
...
...
include/boost/range/adaptor/sliced.hpp
View file @
5eaa391d
...
...
@@ -28,14 +28,26 @@ namespace boost
};
template
<
class
RandomAccessRange
>
inline
iterator_range
<
BOOST_DEDUCED_TYPENAME
range_iterator
<
RandomAccessRange
>::
type
>
class
sliced_range
:
public
boost
::
iterator_range
<
BOOST_DEDUCED_TYPENAME
range_iterator
<
RandomAccessRange
>::
type
>
{
typedef
boost
::
iterator_range
<
BOOST_DEDUCED_TYPENAME
range_iterator
<
RandomAccessRange
>::
type
>
base_t
;
public
:
template
<
typename
Rng
,
typename
T
,
typename
U
>
sliced_range
(
Rng
&
rng
,
T
t
,
U
u
)
:
base_t
(
boost
::
make_iterator_range
(
rng
,
t
,
u
-
boost
::
size
(
rng
)))
{
}
};
template
<
class
RandomAccessRange
>
inline
sliced_range
<
RandomAccessRange
>
slice
(
RandomAccessRange
&
rng
,
std
::
size_t
t
,
std
::
size_t
u
)
{
BOOST_ASSERT
(
t
<=
u
&&
"error in slice indices"
);
BOOST_ASSERT
(
static_cast
<
std
::
size_t
>
(
boost
::
size
(
rng
))
>=
u
&&
"second slice index out of bounds"
);
return
boost
::
make_iterator_range
(
rng
,
t
,
u
-
boost
::
size
(
rng
)
);
return
sliced_range
<
RandomAccessRange
>
(
rng
,
t
,
u
);
}
template
<
class
RandomAccessRange
>
...
...
@@ -46,23 +58,21 @@ namespace boost
BOOST_ASSERT
(
static_cast
<
std
::
size_t
>
(
boost
::
size
(
rng
))
>=
u
&&
"second slice index out of bounds"
);
return
boost
::
make_iterator_range
(
rng
,
t
,
u
-
boost
::
size
(
rng
)
);
return
sliced_range
<
const
RandomAccessRange
>
(
rng
,
t
,
u
);
}
template
<
class
RandomAccessRange
>
inline
iterator_range
<
BOOST_DEDUCED_TYPENAME
range_iterator
<
RandomAccessRange
>::
type
>
inline
sliced_range
<
RandomAccessRange
>
operator
|
(
RandomAccessRange
&
r
,
const
sliced
&
f
)
{
return
adaptors
::
slice
(
r
,
f
.
t
,
f
.
u
);
return
sliced_range
<
RandomAccessRange
>
(
r
,
f
.
t
,
f
.
u
);
}
template
<
class
RandomAccessRange
>
inline
iterator_range
<
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
RandomAccessRange
>::
type
>
inline
sliced_range
<
const
RandomAccessRange
>
operator
|
(
const
RandomAccessRange
&
r
,
const
sliced
&
f
)
{
return
adaptors
::
slice
(
r
,
f
.
t
,
f
.
u
);
return
sliced_range
<
const
RandomAccessRange
>
(
r
,
f
.
t
,
f
.
u
);
}
}
// namespace adaptors
...
...
include/boost/range/algorithm/copy.hpp
View file @
5eaa391d
...
...
@@ -30,7 +30,7 @@ namespace boost
template
<
class
SinglePassRange
,
class
OutputIterator
>
inline
OutputIterator
copy
(
const
SinglePassRange
&
rng
,
OutputIterator
out
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
SinglePassRange
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange
>
));
return
std
::
copy
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
out
);
}
...
...
include/boost/range/algorithm/copy_backward.hpp
View file @
5eaa391d
...
...
@@ -32,7 +32,7 @@ inline BidirectionalTraversalWriteableIterator
copy_backward
(
const
BidirectionalRange
&
rng
,
BidirectionalTraversalWriteableIterator
out
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
BidirectionalRangeConcept
<
BidirectionalRange
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
BidirectionalRangeConcept
<
const
BidirectionalRange
>
));
return
std
::
copy_backward
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
out
);
}
...
...
include/boost/range/algorithm/equal.hpp
View file @
5eaa391d
...
...
@@ -159,8 +159,8 @@ namespace boost
template
<
class
SinglePassRange1
,
class
SinglePassRange2
>
inline
bool
equal
(
const
SinglePassRange1
&
rng1
,
const
SinglePassRange2
&
rng2
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
SinglePassRange1
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
SinglePassRange2
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange1
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange2
>
));
return
::
boost
::
range_detail
::
equal
(
::
boost
::
begin
(
rng1
),
::
boost
::
end
(
rng1
),
...
...
@@ -172,8 +172,8 @@ namespace boost
inline
bool
equal
(
const
SinglePassRange1
&
rng1
,
const
SinglePassRange2
&
rng2
,
BinaryPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
SinglePassRange1
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
SinglePassRange2
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange1
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange2
>
));
return
::
boost
::
range_detail
::
equal
(
::
boost
::
begin
(
rng1
),
::
boost
::
end
(
rng1
),
...
...
include/boost/range/algorithm/fill.hpp
View file @
5eaa391d
...
...
@@ -33,6 +33,15 @@ inline ForwardRange& fill(ForwardRange& rng, const Value& val)
return
rng
;
}
/// \overload
template
<
class
ForwardRange
,
class
Value
>
inline
const
ForwardRange
&
fill
(
const
ForwardRange
&
rng
,
const
Value
&
val
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
std
::
fill
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
val
);
return
rng
;
}
}
// namespace range
using
range
::
fill
;
}
...
...
include/boost/range/algorithm/fill_n.hpp
View file @
5eaa391d
...
...
@@ -36,6 +36,16 @@ inline ForwardRange& fill_n(ForwardRange& rng, Size n, const Value& val)
return
rng
;
}
/// \overload
template
<
class
ForwardRange
,
class
Size
,
class
Value
>
inline
const
ForwardRange
&
fill_n
(
const
ForwardRange
&
rng
,
Size
n
,
const
Value
&
val
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
BOOST_ASSERT
(
static_cast
<
Size
>
(
std
::
distance
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
)))
>=
n
);
std
::
fill_n
(
boost
::
begin
(
rng
),
n
,
val
);
return
rng
;
}
}
// namespace range
using
range
::
fill_n
;
}
// namespace boost
...
...
include/boost/range/algorithm/find.hpp
View file @
5eaa391d
...
...
@@ -27,18 +27,33 @@ namespace boost
///
/// \pre SinglePassRange is a model of the SinglePassRangeConcept
template
<
class
SinglePassRange
,
class
Value
>
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
SinglePassRange
>::
type
inline
BOOST_DEDUCED_TYPENAME
disable_if
<
is_const
<
SinglePassRange
>
,
BOOST_DEDUCED_TYPENAME
range_iterator
<
SinglePassRange
>::
type
>::
type
find
(
SinglePassRange
&
rng
,
const
Value
&
val
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
SinglePassRange
>
));
return
std
::
find
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
val
);
}
/// \overload
template
<
class
SinglePassRange
,
class
Value
>
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
SinglePassRange
>::
type
find
(
const
SinglePassRange
&
rng
,
const
Value
&
val
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange
>
));
return
std
::
find
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
val
);
}
// range_return overloads
/// \overload
template
<
range_return_value
re
,
class
SinglePassRange
,
class
Value
>
inline
BOOST_DEDUCED_TYPENAME
range_return
<
SinglePassRange
,
re
>::
type
inline
BOOST_DEDUCED_TYPENAME
disable_if
<
is_const
<
SinglePassRange
>
,
BOOST_DEDUCED_TYPENAME
range_return
<
SinglePassRange
,
re
>::
type
>::
type
find
(
SinglePassRange
&
rng
,
const
Value
&
val
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
SinglePassRange
>
));
...
...
@@ -47,6 +62,17 @@ find( SinglePassRange& rng, const Value& val )
rng
);
}
/// \overload
template
<
range_return_value
re
,
class
SinglePassRange
,
class
Value
>
inline
BOOST_DEDUCED_TYPENAME
range_return
<
const
SinglePassRange
,
re
>::
type
find
(
const
SinglePassRange
&
rng
,
const
Value
&
val
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange
>
));
return
range_return
<
const
SinglePassRange
,
re
>::
pack
(
std
::
find
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
val
),
rng
);
}
}
// namespace range
using
range
::
find
;
}
...
...
include/boost/range/algorithm/find_end.hpp
View file @
5eaa391d
...
...
@@ -29,7 +29,10 @@ namespace boost
/// \pre ForwardRange2 is a model of the ForwardRangeConcept
/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
template
<
class
ForwardRange1
,
class
ForwardRange2
>
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
ForwardRange1
>::
type
inline
BOOST_DEDUCED_TYPENAME
disable_if
<
is_const
<
ForwardRange1
>
,
BOOST_DEDUCED_TYPENAME
range_iterator
<
ForwardRange1
>::
type
>::
type
find_end
(
ForwardRange1
&
rng1
,
const
ForwardRange2
&
rng2
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
ForwardRange1
>
));
...
...
@@ -39,9 +42,24 @@ find_end(ForwardRange1 & rng1, const ForwardRange2& rng2)
boost
::
begin
(
rng2
),
boost
::
end
(
rng2
));
}
/// \overload
template
<
class
ForwardRange1
,
class
ForwardRange2
>
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
ForwardRange1
>::
type
find_end
(
const
ForwardRange1
&
rng1
,
const
ForwardRange2
&
rng2
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange1
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange2
>
));
return
std
::
find_end
(
boost
::
begin
(
rng1
),
boost
::
end
(
rng1
),
boost
::
begin
(
rng2
),
boost
::
end
(
rng2
));
}
/// \overload
template
<
class
ForwardRange1
,
class
ForwardRange2
,
class
BinaryPredicate
>
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
ForwardRange1
>::
type
inline
BOOST_DEDUCED_TYPENAME
disable_if
<
is_const
<
ForwardRange1
>
,
BOOST_DEDUCED_TYPENAME
range_iterator
<
ForwardRange1
>::
type
>::
type
find_end
(
ForwardRange1
&
rng1
,
const
ForwardRange2
&
rng2
,
BinaryPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
ForwardRange1
>
));
...
...
@@ -51,9 +69,24 @@ find_end(ForwardRange1 & rng1, const ForwardRange2& rng2, BinaryPredicate pred)
boost
::
begin
(
rng2
),
boost
::
end
(
rng2
),
pred
);
}
/// \overload
template
<
class
ForwardRange1
,
class
ForwardRange2
,
class
BinaryPredicate
>
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
ForwardRange1
>::
type
find_end
(
const
ForwardRange1
&
rng1
,
const
ForwardRange2
&
rng2
,
BinaryPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange1
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange2
>
));
return
std
::
find_end
(
boost
::
begin
(
rng1
),
boost
::
end
(
rng1
),
boost
::
begin
(
rng2
),
boost
::
end
(
rng2
),
pred
);
}
/// \overload
template
<
range_return_value
re
,
class
ForwardRange1
,
class
ForwardRange2
>
inline
BOOST_DEDUCED_TYPENAME
range_return
<
ForwardRange1
,
re
>::
type
inline
BOOST_DEDUCED_TYPENAME
disable_if
<
is_const
<
ForwardRange1
>
,
BOOST_DEDUCED_TYPENAME
range_return
<
ForwardRange1
,
re
>::
type
>::
type
find_end
(
ForwardRange1
&
rng1
,
const
ForwardRange2
&
rng2
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
ForwardRange1
>
));
...
...
@@ -65,10 +98,27 @@ find_end(ForwardRange1& rng1, const ForwardRange2& rng2)
rng1
);
}
/// \overload
template
<
range_return_value
re
,
class
ForwardRange1
,
class
ForwardRange2
>
inline
BOOST_DEDUCED_TYPENAME
range_return
<
const
ForwardRange1
,
re
>::
type
find_end
(
const
ForwardRange1
&
rng1
,
const
ForwardRange2
&
rng2
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange1
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange2
>
));
return
range_return
<
const
ForwardRange1
,
re
>::
pack
(
std
::
find_end
(
boost
::
begin
(
rng1
),
boost
::
end
(
rng1
),
boost
::
begin
(
rng2
),
boost
::
end
(
rng2
)),
rng1
);
}
/// \overload
template
<
range_return_value
re
,
class
ForwardRange1
,
class
ForwardRange2
,
class
BinaryPredicate
>
inline
BOOST_DEDUCED_TYPENAME
range_return
<
ForwardRange1
,
re
>::
type
inline
BOOST_DEDUCED_TYPENAME
disable_if
<
is_const
<
ForwardRange1
>
,
BOOST_DEDUCED_TYPENAME
range_return
<
ForwardRange1
,
re
>::
type
>::
type
find_end
(
ForwardRange1
&
rng1
,
const
ForwardRange2
&
rng2
,
BinaryPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
ForwardRange1
>
));
...
...
@@ -80,6 +130,21 @@ find_end(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred)
rng1
);
}
/// \overload
template
<
range_return_value
re
,
class
ForwardRange1
,
class
ForwardRange2
,
class
BinaryPredicate
>
inline
BOOST_DEDUCED_TYPENAME
range_return
<
const
ForwardRange1
,
re
>::
type
find_end
(
const
ForwardRange1
&
rng1
,
const
ForwardRange2
&
rng2
,
BinaryPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange1
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange2
>
));
return
range_return
<
const
ForwardRange1
,
re
>::
pack
(
std
::
find_end
(
boost
::
begin
(
rng1
),
boost
::
end
(
rng1
),
boost
::
begin
(
rng2
),
boost
::
end
(
rng2
),
pred
),
rng1
);
}
}
// namespace range
using
range
::
find_end
;
}
// namespace boost
...
...
include/boost/range/algorithm/find_first_of.hpp
View file @
5eaa391d
...
...
@@ -29,7 +29,10 @@ namespace boost
/// \pre ForwardRange2 is a model of the ForwardRangeConcept
/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
template
<
class
SinglePassRange1
,
class
ForwardRange2
>
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
SinglePassRange1
>::
type
inline
BOOST_DEDUCED_TYPENAME
disable_if
<
is_const
<
SinglePassRange1
>
,
BOOST_DEDUCED_TYPENAME
range_iterator
<
SinglePassRange1
>::
type
>::
type
find_first_of
(
SinglePassRange1
&
rng1
,
ForwardRange2
const
&
rng2
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
SinglePassRange1
>
));
...
...
@@ -39,9 +42,24 @@ find_first_of(SinglePassRange1 & rng1, ForwardRange2 const & rng2)
boost
::
begin
(
rng2
),
boost
::
end
(
rng2
));
}
/// \overload
template
<
class
SinglePassRange1
,
class
ForwardRange2
>
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
SinglePassRange1
>::
type
find_first_of
(
const
SinglePassRange1
&
rng1
,
const
ForwardRange2
&
rng2
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange1
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange2
>
));
return
std
::
find_first_of
(
boost
::
begin
(
rng1
),
boost
::
end
(
rng1
),
boost
::
begin
(
rng2
),
boost
::
end
(
rng2
));
}
/// \overload
template
<
class
SinglePassRange1
,
class
ForwardRange2
,
class
BinaryPredicate
>
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
SinglePassRange1
>::
type
inline
BOOST_DEDUCED_TYPENAME
disable_if
<
is_const
<
SinglePassRange1
>
,
BOOST_DEDUCED_TYPENAME
range_iterator
<
SinglePassRange1
>::
type
>::
type
find_first_of
(
SinglePassRange1
&
rng1
,
ForwardRange2
const
&
rng2
,
BinaryPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
SinglePassRange1
>
));
...
...
@@ -51,10 +69,25 @@ find_first_of(SinglePassRange1 & rng1, ForwardRange2 const & rng2, BinaryPredica
boost
::
begin
(
rng2
),
boost
::
end
(
rng2
),
pred
);
}
/// \overload
template
<
class
SinglePassRange1
,
class
ForwardRange2
,
class
BinaryPredicate
>
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
SinglePassRange1
>::
type
find_first_of
(
const
SinglePassRange1
&
rng1
,
const
ForwardRange2
&
rng2
,
BinaryPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange1
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange2
>
));
return
std
::
find_first_of
(
boost
::
begin
(
rng1
),
boost
::
end
(
rng1
),
boost
::
begin
(
rng2
),
boost
::
end
(
rng2
),
pred
);
}
// range return overloads
/// \overload
template
<
range_return_value
re
,
class
SinglePassRange1
,
class
ForwardRange2
>
inline
BOOST_DEDUCED_TYPENAME
range_return
<
SinglePassRange1
,
re
>::
type
inline
BOOST_DEDUCED_TYPENAME
disable_if
<
is_const
<
SinglePassRange1
>
,
BOOST_DEDUCED_TYPENAME
range_return
<
SinglePassRange1
,
re
>::
type
>::
type
find_first_of
(
SinglePassRange1
&
rng1
,
const
ForwardRange2
&
rng2
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
SinglePassRange1
>
));
...
...
@@ -66,10 +99,27 @@ find_first_of(SinglePassRange1& rng1, const ForwardRange2& rng2)
rng1
);
}
/// \overload
template
<
range_return_value
re
,
class
SinglePassRange1
,
class
ForwardRange2
>
inline
BOOST_DEDUCED_TYPENAME
range_return
<
const
SinglePassRange1
,
re
>::
type
find_first_of
(
const
SinglePassRange1
&
rng1
,
const
ForwardRange2
&
rng2
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange1
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange2
>
));
return
range_return
<
const
SinglePassRange1
,
re
>::
pack
(
std
::
find_first_of
(
boost
::
begin
(
rng1
),
boost
::
end
(
rng1
),
boost
::
begin
(
rng2
),
boost
::
end
(
rng2
)),
rng1
);
}
/// \overload
template
<
range_return_value
re
,
class
SinglePassRange1
,
class
ForwardRange2
,
class
BinaryPredicate
>
inline
BOOST_DEDUCED_TYPENAME
range_return
<
SinglePassRange1
,
re
>::
type
inline
BOOST_DEDUCED_TYPENAME
disable_if
<
is_const
<
SinglePassRange1
>
,
BOOST_DEDUCED_TYPENAME
range_return
<
SinglePassRange1
,
re
>::
type
>::
type
find_first_of
(
SinglePassRange1
&
rng1
,
const
ForwardRange2
&
rng2
,
BinaryPredicate
pred
)
{
...
...
@@ -82,6 +132,22 @@ find_first_of(SinglePassRange1 & rng1, const ForwardRange2& rng2,
rng1
);
}
/// \overload
template
<
range_return_value
re
,
class
SinglePassRange1
,
class
ForwardRange2
,
class
BinaryPredicate
>
inline
BOOST_DEDUCED_TYPENAME
range_return
<
const
SinglePassRange1
,
re
>::
type
find_first_of
(
const
SinglePassRange1
&
rng1
,
const
ForwardRange2
&
rng2
,
BinaryPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange1
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange2
>
));
return
range_return
<
const
SinglePassRange1
,
re
>::
pack
(
std
::
find_first_of
(
boost
::
begin
(
rng1
),
boost
::
end
(
rng1
),
boost
::
begin
(
rng2
),
boost
::
end
(
rng2
),
pred
),
rng1
);
}
}
// namespace range
using
range
::
find_first_of
;
}
// namespace boost
...
...
include/boost/range/algorithm/find_if.hpp
View file @
5eaa391d
...
...
@@ -28,18 +28,33 @@ namespace boost
/// \pre SinglePassRange is a model of the SinglePassRangeConcept
/// \pre UnaryPredicate is a model of the UnaryPredicateConcept
template
<
class
SinglePassRange
,
class
UnaryPredicate
>
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
SinglePassRange
>::
type
inline
BOOST_DEDUCED_TYPENAME
disable_if
<
is_const
<
SinglePassRange
>
,
BOOST_DEDUCED_TYPENAME
range_iterator
<
SinglePassRange
>::
type
>::
type
find_if
(
SinglePassRange
&
rng
,
UnaryPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
SinglePassRange
>
));
return
std
::
find_if
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
pred
);
}
/// \overload
template
<
class
SinglePassRange
,
class
UnaryPredicate
>
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
SinglePassRange
>::
type
find_if
(
const
SinglePassRange
&
rng
,
UnaryPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange
>
));
return
std
::
find_if
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
pred
);
}
// range_return overloads
/// \overload
template
<
range_return_value
re
,
class
SinglePassRange
,
class
UnaryPredicate
>
inline
BOOST_DEDUCED_TYPENAME
range_return
<
SinglePassRange
,
re
>::
type
inline
BOOST_DEDUCED_TYPENAME
disable_if
<
is_const
<
SinglePassRange
>
,
BOOST_DEDUCED_TYPENAME
range_return
<
SinglePassRange
,
re
>::
type
>::
type
find_if
(
SinglePassRange
&
rng
,
UnaryPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
SinglePassRange
>
));
...
...
@@ -48,6 +63,17 @@ find_if( SinglePassRange& rng, UnaryPredicate pred )
rng
);
}
/// \overload
template
<
range_return_value
re
,
class
SinglePassRange
,
class
UnaryPredicate
>
inline
BOOST_DEDUCED_TYPENAME
range_return
<
const
SinglePassRange
,
re
>::
type
find_if
(
const
SinglePassRange
&
rng
,
UnaryPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange
>
));
return
range_return
<
const
SinglePassRange
,
re
>::
pack
(
std
::
find_if
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
pred
),
rng
);
}
}
// namespace range
using
range
::
find_if
;
}
// namespace boost
...
...
include/boost/range/algorithm/generate.hpp
View file @
5eaa391d
...
...
@@ -33,6 +33,15 @@ inline ForwardRange& generate( ForwardRange& rng, Generator gen )
return
rng
;
}
/// \overload
template
<
class
ForwardRange
,
class
Generator
>
inline
const
ForwardRange
&
generate
(
const
ForwardRange
&
rng
,
Generator
gen
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
std
::
generate
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
gen
);
return
rng
;
}
}
// namespace range
using
range
::
generate
;
}
// namespace boost
...
...
include/boost/range/algorithm/heap_algorithm.hpp
View file @
5eaa391d
...
...
@@ -34,6 +34,15 @@ inline RandomAccessRange& push_heap(RandomAccessRange& rng)
return
rng
;
}
/// \overload
template
<
class
RandomAccessRange
>
inline
const
RandomAccessRange
&
push_heap
(
const
RandomAccessRange
&
rng
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
RandomAccessRangeConcept
<
const
RandomAccessRange
>
));
std
::
push_heap
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
));
return
rng
;
}
/// \overload
template
<
class
RandomAccessRange
,
class
Compare
>
inline
RandomAccessRange
&
push_heap
(
RandomAccessRange
&
rng
,
Compare
comp_pred
)
...
...
@@ -43,6 +52,15 @@ inline RandomAccessRange& push_heap(RandomAccessRange& rng, Compare comp_pred)
return
rng
;
}
/// \overload
template
<
class
RandomAccessRange
,
class
Compare
>
inline
const
RandomAccessRange
&
push_heap
(
const
RandomAccessRange
&
rng
,
Compare
comp_pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
RandomAccessRangeConcept
<
const
RandomAccessRange
>
));
std
::
push_heap
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
comp_pred
);
return
rng
;
}
/// \brief template function pop_heap
///
/// range-based version of the pop_heap std algorithm
...
...
@@ -57,6 +75,15 @@ inline RandomAccessRange& pop_heap(RandomAccessRange& rng)
return
rng
;
}
/// \overload
template
<
class
RandomAccessRange
>
inline
const
RandomAccessRange
&
pop_heap
(
const
RandomAccessRange
&
rng
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
RandomAccessRangeConcept
<
const
RandomAccessRange
>
));
std
::
pop_heap
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
));
return
rng
;
}
/// \overload
template
<
class
RandomAccessRange
,
class
Compare
>
inline
RandomAccessRange
&
pop_heap
(
RandomAccessRange
&
rng
,
Compare
comp_pred
)
...
...
@@ -66,6 +93,15 @@ inline RandomAccessRange& pop_heap(RandomAccessRange& rng, Compare comp_pred)
return
rng
;
}
/// \overload
template
<
class
RandomAccessRange
,
class
Compare
>
inline
const
RandomAccessRange
&
pop_heap
(
const
RandomAccessRange
&
rng
,
Compare
comp_pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
RandomAccessRangeConcept
<
const
RandomAccessRange
>
));
std
::
pop_heap
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
comp_pred
);
return
rng
;
}
/// \brief template function make_heap
///
/// range-based version of the make_heap std algorithm
...
...
@@ -80,6 +116,15 @@ inline RandomAccessRange& make_heap(RandomAccessRange& rng)
return
rng
;
}
/// \overload
template
<
class
RandomAccessRange
>
inline
const
RandomAccessRange
&
make_heap
(
const
RandomAccessRange
&
rng
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
RandomAccessRangeConcept
<
const
RandomAccessRange
>
));
std
::
make_heap
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
));
return
rng
;
}
/// \overload
template
<
class
RandomAccessRange
,
class
Compare
>
inline
RandomAccessRange
&
make_heap
(
RandomAccessRange
&
rng
,
Compare
comp_pred
)
...
...
@@ -89,6 +134,15 @@ inline RandomAccessRange& make_heap(RandomAccessRange& rng, Compare comp_pred)
return
rng
;
}
/// \overload
template
<
class
RandomAccessRange
,
class
Compare
>
inline
const
RandomAccessRange
&
make_heap
(
const
RandomAccessRange
&
rng
,
Compare
comp_pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
RandomAccessRangeConcept
<
const
RandomAccessRange
>
));
std
::
make_heap
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
comp_pred
);
return
rng
;
}
/// \brief template function sort_heap
///
/// range-based version of the sort_heap std algorithm
...
...
@@ -103,6 +157,15 @@ inline RandomAccessRange& sort_heap(RandomAccessRange& rng)
return
rng
;
}
/// \overload
template
<
class
RandomAccessRange
>
inline
const
RandomAccessRange
&
sort_heap
(
const
RandomAccessRange
&
rng
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
RandomAccessRangeConcept
<
const
RandomAccessRange
>
));
std
::
sort_heap
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
));
return
rng
;
}
/// \overload
template
<
class
RandomAccessRange
,
class
Compare
>
inline
RandomAccessRange
&
sort_heap
(
RandomAccessRange
&
rng
,
Compare
comp_pred
)
...
...
@@ -112,6 +175,15 @@ inline RandomAccessRange& sort_heap(RandomAccessRange& rng, Compare comp_pred)
return
rng
;
}
/// \overload
template
<
class
RandomAccessRange
,
class
Compare
>
inline
const
RandomAccessRange
&
sort_heap
(
const
RandomAccessRange
&
rng
,
Compare
comp_pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
RandomAccessRangeConcept
<
const
RandomAccessRange
>
));
std
::
sort_heap
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
comp_pred
);
return
rng
;
}
}
// namespace range
using
range
::
push_heap
;
using
range
::
pop_heap
;
...
...
include/boost/range/algorithm/lower_bound.hpp
View file @
5eaa391d
...
...
@@ -27,23 +27,52 @@ namespace boost
///
/// \pre ForwardRange is a model of the ForwardRangeConcept
template
<
class
ForwardRange
,
class
Value
>
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
ForwardRange
>::
type
inline
BOOST_DEDUCED_TYPENAME
disable_if
<
is_const
<
ForwardRange
>
,
BOOST_DEDUCED_TYPENAME
range_iterator
<
ForwardRange
>::
type
>::
type
lower_bound
(
ForwardRange
&
rng
,
Value
val
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
ForwardRange
>
));
return
std
::
lower_bound
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
val
);
}
/// \overload
template
<
class
ForwardRange
,
class
Value
>
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
ForwardRange
>::
type
lower_bound
(
const
ForwardRange
&
rng
,
Value
val
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
return
std
::
lower_bound
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
val
);
}
/// \overload
template
<
class
ForwardRange
,
class
Value
,
class
SortPredicate
>
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
ForwardRange
>::
type
inline
BOOST_DEDUCED_TYPENAME
disable_if
<
is_const
<
ForwardRange
>
,
BOOST_DEDUCED_TYPENAME
range_iterator
<
ForwardRange
>::
type
>::
type
lower_bound
(
ForwardRange
&
rng
,
Value
val
,
SortPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
ForwardRange
>
));
return
std
::
lower_bound
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
val
,
pred
);
}
/// \overload
template
<
class
ForwardRange
,
class
Value
,
class
SortPredicate
>
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
ForwardRange
>::
type
lower_bound
(
const
ForwardRange
&
rng
,
Value
val
,
SortPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
return
std
::
lower_bound
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
val
,
pred
);
}
/// \overload
template
<
range_return_value
re
,
class
ForwardRange
,
class
Value
>
inline
BOOST_DEDUCED_TYPENAME
range_return
<
ForwardRange
,
re
>::
type
inline
BOOST_DEDUCED_TYPENAME
disable_if
<
is_const
<
ForwardRange
>
,
BOOST_DEDUCED_TYPENAME
range_return
<
ForwardRange
,
re
>::
type
>::
type
lower_bound
(
ForwardRange
&
rng
,
Value
val
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
ForwardRange
>
));
...
...
@@ -51,9 +80,24 @@ lower_bound( ForwardRange& rng, Value val )
pack
(
std
::
lower_bound
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
val
),
rng
);
}
/// \overload
template
<
range_return_value
re
,
class
ForwardRange
,
class
Value
>
inline
BOOST_DEDUCED_TYPENAME
range_return
<
const
ForwardRange
,
re
>::
type
lower_bound
(
const
ForwardRange
&
rng
,
Value
val
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
return
range_return
<
const
ForwardRange
,
re
>::
pack
(
std
::
lower_bound
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
val
),
rng
);
}
/// \overload
template
<
range_return_value
re
,
class
ForwardRange
,
class
Value
,
class
SortPredicate
>
inline
BOOST_DEDUCED_TYPENAME
range_return
<
ForwardRange
,
re
>::
type
inline
BOOST_DEDUCED_TYPENAME
disable_if
<
is_const
<
ForwardRange
>
,
BOOST_DEDUCED_TYPENAME
range_return
<
ForwardRange
,
re
>::
type
>::
type
lower_bound
(
ForwardRange
&
rng
,
Value
val
,
SortPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
ForwardRange
>
));
...
...
@@ -62,6 +106,17 @@ lower_bound( ForwardRange& rng, Value val, SortPredicate pred )
rng
);
}
/// \overload
template
<
range_return_value
re
,
class
ForwardRange
,
class
Value
,
class
SortPredicate
>
inline
BOOST_DEDUCED_TYPENAME
range_return
<
const
ForwardRange
,
re
>::
type
lower_bound
(
const
ForwardRange
&
rng
,
Value
val
,
SortPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
return
range_return
<
const
ForwardRange
,
re
>::
pack
(
std
::
lower_bound
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
val
,
pred
),
rng
);
}
}
// namespace range
using
range
::
lower_bound
;
}
// namespace boost
...
...
include/boost/range/algorithm/partial_sort.hpp
View file @
5eaa391d
...
...
@@ -35,6 +35,16 @@ inline RandomAccessRange& partial_sort(RandomAccessRange& rng,
return
rng
;
}
/// \overload
template
<
class
RandomAccessRange
>
inline
const
RandomAccessRange
&
partial_sort
(
const
RandomAccessRange
&
rng
,
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
RandomAccessRange
>::
type
middle
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
RandomAccessRangeConcept
<
const
RandomAccessRange
>
));
std
::
partial_sort
(
boost
::
begin
(
rng
),
middle
,
boost
::
end
(
rng
));
return
rng
;
}
/// \overload
template
<
class
RandomAccessRange
,
class
BinaryPredicate
>
inline
RandomAccessRange
&
partial_sort
(
RandomAccessRange
&
rng
,
...
...
@@ -47,6 +57,18 @@ inline RandomAccessRange& partial_sort(RandomAccessRange& rng,
return
rng
;
}
/// \overload
template
<
class
RandomAccessRange
,
class
BinaryPredicate
>
inline
const
RandomAccessRange
&
partial_sort
(
const
RandomAccessRange
&
rng
,
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
RandomAccessRange
>::
type
middle
,
BinaryPredicate
sort_pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
RandomAccessRangeConcept
<
const
RandomAccessRange
>
));
std
::
partial_sort
(
boost
::
begin
(
rng
),
middle
,
boost
::
end
(
rng
),
sort_pred
);
return
rng
;
}
}
// namespace range
using
range
::
partial_sort
;
}
// namespace boost
...
...
include/boost/range/algorithm/partial_sort_copy.hpp
View file @
5eaa391d
...
...
@@ -32,7 +32,18 @@ template<class SinglePassRange, class RandomAccessRange>
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
RandomAccessRange
>::
type
partial_sort_copy
(
const
SinglePassRange
&
rng1
,
RandomAccessRange
&
rng2
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
SinglePassRange
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange
>
));
return
std
::
partial_sort_copy
(
boost
::
begin
(
rng1
),
boost
::
end
(
rng1
),
boost
::
begin
(
rng2
),
boost
::
end
(
rng2
));
}
/// \overload
template
<
class
SinglePassRange
,
class
RandomAccessRange
>
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
RandomAccessRange
>::
type
partial_sort_copy
(
const
SinglePassRange
&
rng1
,
const
RandomAccessRange
&
rng2
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange
>
));
return
std
::
partial_sort_copy
(
boost
::
begin
(
rng1
),
boost
::
end
(
rng1
),
boost
::
begin
(
rng2
),
boost
::
end
(
rng2
));
...
...
@@ -45,7 +56,20 @@ inline BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type
partial_sort_copy
(
const
SinglePassRange
&
rng1
,
RandomAccessRange
&
rng2
,
BinaryPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
SinglePassRange
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange
>
));
return
std
::
partial_sort_copy
(
boost
::
begin
(
rng1
),
boost
::
end
(
rng1
),
boost
::
begin
(
rng2
),
boost
::
end
(
rng2
),
pred
);
}
/// \overload
template
<
class
SinglePassRange
,
class
RandomAccessRange
,
class
BinaryPredicate
>
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
RandomAccessRange
>::
type
partial_sort_copy
(
const
SinglePassRange
&
rng1
,
const
RandomAccessRange
&
rng2
,
BinaryPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange
>
));
return
std
::
partial_sort_copy
(
boost
::
begin
(
rng1
),
boost
::
end
(
rng1
),
boost
::
begin
(
rng2
),
boost
::
end
(
rng2
),
pred
);
...
...
include/boost/range/algorithm/partition.hpp
View file @
5eaa391d
...
...
@@ -34,6 +34,15 @@ partition(ForwardRange& rng, UnaryPredicate pred)
return
std
::
partition
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
pred
);
}
/// \overload
template
<
class
ForwardRange
,
class
UnaryPredicate
>
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
ForwardRange
>::
type
partition
(
const
ForwardRange
&
rng
,
UnaryPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
return
std
::
partition
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
pred
);
}
// range_return overloads
/// \overload
...
...
@@ -47,6 +56,17 @@ partition(ForwardRange& rng, UnaryPredicate pred)
pack
(
std
::
partition
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
pred
),
rng
);
}
/// \overload
template
<
range_return_value
re
,
class
ForwardRange
,
class
UnaryPredicate
>
inline
BOOST_DEDUCED_TYPENAME
range_return
<
const
ForwardRange
,
re
>::
type
partition
(
const
ForwardRange
&
rng
,
UnaryPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
return
boost
::
range_return
<
const
ForwardRange
,
re
>::
pack
(
std
::
partition
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
pred
),
rng
);
}
}
// namespace range
using
range
::
partition
;
}
// namespace boost
...
...
include/boost/range/algorithm/random_shuffle.hpp
View file @
5eaa391d
...
...
@@ -34,6 +34,15 @@ inline RandomAccessRange& random_shuffle(RandomAccessRange& rng)
return
rng
;
}
/// \overload
template
<
class
RandomAccessRange
>
inline
const
RandomAccessRange
&
random_shuffle
(
const
RandomAccessRange
&
rng
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
RandomAccessRangeConcept
<
const
RandomAccessRange
>
));
std
::
random_shuffle
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
));
return
rng
;
}
/// \overload
template
<
class
RandomAccessRange
,
class
Generator
>
inline
RandomAccessRange
&
random_shuffle
(
RandomAccessRange
&
rng
,
Generator
&
gen
)
...
...
@@ -43,6 +52,15 @@ inline RandomAccessRange& random_shuffle(RandomAccessRange& rng, Generator& gen)
return
rng
;
}
/// \overload
template
<
class
RandomAccessRange
,
class
Generator
>
inline
const
RandomAccessRange
&
random_shuffle
(
const
RandomAccessRange
&
rng
,
Generator
&
gen
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
RandomAccessRangeConcept
<
const
RandomAccessRange
>
));
std
::
random_shuffle
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
gen
);
return
rng
;
}
}
// namespace range
using
range
::
random_shuffle
;
}
// namespace boost
...
...
include/boost/range/algorithm/remove.hpp
View file @
5eaa391d
...
...
@@ -34,6 +34,15 @@ remove(ForwardRange& rng, const Value& val)
return
std
::
remove
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
val
);
}
/// \overload
template
<
class
ForwardRange
,
class
Value
>
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
ForwardRange
>::
type
remove
(
const
ForwardRange
&
rng
,
const
Value
&
val
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
return
std
::
remove
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
val
);
}
// range_return overloads
/// \overload
...
...
@@ -47,6 +56,17 @@ remove(ForwardRange& rng, const Value& val)
rng
);
}
/// \overload
template
<
range_return_value
re
,
class
ForwardRange
,
class
Value
>
inline
BOOST_DEDUCED_TYPENAME
range_return
<
const
ForwardRange
,
re
>::
type
remove
(
const
ForwardRange
&
rng
,
const
Value
&
val
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
return
range_return
<
const
ForwardRange
,
re
>::
pack
(
std
::
remove
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
val
),
rng
);
}
}
// namespace range
using
range
::
remove
;
}
// namespace boost
...
...
include/boost/range/algorithm/remove_copy.hpp
View file @
5eaa391d
...
...
@@ -31,9 +31,9 @@ namespace boost
/// InputIterator's value type.
template
<
class
SinglePassRange
,
class
OutputIterator
,
class
Value
>
inline
OutputIterator
remove_copy
(
SinglePassRange
&
rng
,
OutputIterator
out_it
,
const
Value
&
val
)
remove_copy
(
const
SinglePassRange
&
rng
,
OutputIterator
out_it
,
const
Value
&
val
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
SinglePassRange
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange
>
));
return
std
::
remove_copy
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
out_it
,
val
);
}
...
...
include/boost/range/algorithm/remove_copy_if.hpp
View file @
5eaa391d
...
...
@@ -28,9 +28,9 @@ namespace boost
/// \pre out_it is not an iterator in the range rng
template
<
class
SinglePassRange
,
class
OutputIterator
,
class
Predicate
>
inline
OutputIterator
remove_copy_if
(
SinglePassRange
&
rng
,
OutputIterator
out_it
,
Predicate
pred
)
remove_copy_if
(
const
SinglePassRange
&
rng
,
OutputIterator
out_it
,
Predicate
pred
)
{
boost
::
function_requires
<
SinglePassRangeConcept
<
SinglePassRange
>
>
(
);
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange
>
)
);
return
std
::
remove_copy_if
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
out_it
,
pred
);
}
}
...
...
include/boost/range/algorithm/remove_if.hpp
View file @
5eaa391d
...
...
@@ -35,6 +35,15 @@ remove_if(ForwardRange& rng, UnaryPredicate pred)
return
std
::
remove_if
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
pred
);
}
/// \overload
template
<
class
ForwardRange
,
class
UnaryPredicate
>
inline
BOOST_DEDUCED_TYPENAME
boost
::
range_iterator
<
const
ForwardRange
>::
type
remove_if
(
const
ForwardRange
&
rng
,
UnaryPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
return
std
::
remove_if
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
pred
);
}
// range_return overloads
/// \overload
...
...
@@ -48,6 +57,17 @@ remove_if(ForwardRange& rng, UnaryPredicate pred)
rng
);
}
/// \overload
template
<
range_return_value
re
,
class
ForwardRange
,
class
UnaryPredicate
>
inline
BOOST_DEDUCED_TYPENAME
range_return
<
const
ForwardRange
,
re
>::
type
remove_if
(
const
ForwardRange
&
rng
,
UnaryPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
return
range_return
<
const
ForwardRange
,
re
>::
pack
(
std
::
remove_if
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
pred
),
rng
);
}
}
// namespace range
using
range
::
remove_if
;
}
// namespace boost
...
...
include/boost/range/algorithm/replace.hpp
View file @
5eaa391d
...
...
@@ -35,6 +35,17 @@ replace(ForwardRange& rng, const Value& what,
return
rng
;
}
/// \overload
template
<
class
ForwardRange
,
class
Value
>
inline
const
ForwardRange
&
replace
(
const
ForwardRange
&
rng
,
const
Value
&
what
,
const
Value
&
with_what
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
std
::
replace
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
what
,
with_what
);
return
rng
;
}
}
// namespace range
using
range
::
replace
;
}
// namespace boost;
...
...
include/boost/range/algorithm/replace_copy.hpp
View file @
5eaa391d
...
...
@@ -27,10 +27,10 @@ namespace boost
/// \pre ForwardRange is a model of the ForwardRangeConcept
template
<
class
ForwardRange
,
class
OutputIterator
,
class
Value
>
inline
OutputIterator
replace_copy
(
ForwardRange
&
rng
,
OutputIterator
out_it
,
const
Value
&
what
,
replace_copy
(
const
ForwardRange
&
rng
,
OutputIterator
out_it
,
const
Value
&
what
,
const
Value
&
with_what
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
ForwardRange
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
return
std
::
replace_copy
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
out_it
,
what
,
with_what
);
}
...
...
include/boost/range/algorithm/replace_copy_if.hpp
View file @
5eaa391d
...
...
@@ -31,10 +31,10 @@ namespace boost
/// \pre Value is convertible to a type in OutputIterator's set of value types.
template
<
class
ForwardRange
,
class
OutputIterator
,
class
Predicate
,
class
Value
>
inline
OutputIterator
replace_copy_if
(
ForwardRange
&
rng
,
OutputIterator
out_it
,
Predicate
pred
,
replace_copy_if
(
const
ForwardRange
&
rng
,
OutputIterator
out_it
,
Predicate
pred
,
const
Value
&
with_what
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
ForwardRange
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
return
std
::
replace_copy_if
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
out_it
,
pred
,
with_what
);
}
...
...
include/boost/range/algorithm/replace_if.hpp
View file @
5eaa391d
...
...
@@ -36,6 +36,17 @@ inline ForwardRange&
return
rng
;
}
/// \overload
template
<
class
ForwardRange
,
class
UnaryPredicate
,
class
Value
>
inline
const
ForwardRange
&
replace_if
(
const
ForwardRange
&
rng
,
UnaryPredicate
pred
,
const
Value
&
val
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
std
::
replace_if
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
pred
,
val
);
return
rng
;
}
}
// namespace range
using
range
::
replace_if
;
}
// namespace boost
...
...
include/boost/range/algorithm/reverse.hpp
View file @
5eaa391d
...
...
@@ -34,6 +34,15 @@ inline BidirectionalRange& reverse(BidirectionalRange& rng)
return
rng
;
}
/// \overload
template
<
class
BidirectionalRange
>
inline
const
BidirectionalRange
&
reverse
(
const
BidirectionalRange
&
rng
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
BidirectionalRangeConcept
<
const
BidirectionalRange
>
));
std
::
reverse
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
));
return
rng
;
}
}
// namespace range
using
range
::
reverse
;
}
// namespace boost
...
...
include/boost/range/algorithm/reverse_copy.hpp
View file @
5eaa391d
...
...
@@ -29,7 +29,7 @@ namespace boost
template
<
class
BidirectionalRange
,
class
OutputIterator
>
inline
OutputIterator
reverse_copy
(
const
BidirectionalRange
&
rng
,
OutputIterator
out
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
BidirectionalRangeConcept
<
BidirectionalRange
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
BidirectionalRangeConcept
<
const
BidirectionalRange
>
));
return
std
::
reverse_copy
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
out
);
}
...
...
include/boost/range/algorithm/rotate.hpp
View file @
5eaa391d
...
...
@@ -34,6 +34,16 @@ inline ForwardRange& rotate(ForwardRange& rng,
return
rng
;
}
/// \overload
template
<
class
ForwardRange
>
inline
const
ForwardRange
&
rotate
(
const
ForwardRange
&
rng
,
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
ForwardRange
>::
type
middle
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
std
::
rotate
(
boost
::
begin
(
rng
),
middle
,
boost
::
end
(
rng
));
return
rng
;
}
}
// namespace range
using
range
::
rotate
;
}
// namespace boost
...
...
include/boost/range/algorithm/search_n.hpp
View file @
5eaa391d
...
...
@@ -44,7 +44,7 @@ template< class ForwardRange, class Integer, class Value >
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
ForwardRange
>::
type
search_n
(
const
ForwardRange
&
rng
,
Integer
count
,
const
Value
&
value
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
ForwardRange
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
return
std
::
search_n
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
count
,
value
);
}
...
...
@@ -69,7 +69,7 @@ inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
search_n
(
const
ForwardRange
&
rng
,
Integer
count
,
const
Value
&
value
,
BinaryPredicate
binary_pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
ForwardRange
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
BinaryPredicateConcept
<
BinaryPredicate
,
BOOST_DEDUCED_TYPENAME
range_value
<
const
ForwardRange
>::
type
,
const
Value
&>
));
return
std
::
search_n
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
...
...
@@ -97,7 +97,7 @@ template< range_return_value re, class ForwardRange, class Integer,
inline
BOOST_DEDUCED_TYPENAME
range_return
<
const
ForwardRange
,
re
>::
type
search_n
(
const
ForwardRange
&
rng
,
Integer
count
,
const
Value
&
value
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
ForwardRange
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
return
range_return
<
const
ForwardRange
,
re
>::
pack
(
std
::
search_n
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
count
,
value
),
...
...
@@ -128,7 +128,7 @@ inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
search_n
(
const
ForwardRange
&
rng
,
Integer
count
,
const
Value
&
value
,
BinaryPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
ForwardRange
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
BinaryPredicateConcept
<
BinaryPredicate
,
BOOST_DEDUCED_TYPENAME
range_value
<
const
ForwardRange
>::
type
,
const
Value
&>
));
...
...
include/boost/range/algorithm/sort.hpp
View file @
5eaa391d
...
...
@@ -34,6 +34,15 @@ inline RandomAccessRange& sort(RandomAccessRange& rng)
return
rng
;
}
/// \overload
template
<
class
RandomAccessRange
>
inline
const
RandomAccessRange
&
sort
(
const
RandomAccessRange
&
rng
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
RandomAccessRangeConcept
<
const
RandomAccessRange
>
));
std
::
sort
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
));
return
rng
;
}
/// \overload
template
<
class
RandomAccessRange
,
class
BinaryPredicate
>
inline
RandomAccessRange
&
sort
(
RandomAccessRange
&
rng
,
BinaryPredicate
pred
)
...
...
@@ -43,6 +52,15 @@ inline RandomAccessRange& sort(RandomAccessRange& rng, BinaryPredicate pred)
return
rng
;
}
/// \overload
template
<
class
RandomAccessRange
,
class
BinaryPredicate
>
inline
const
RandomAccessRange
&
sort
(
const
RandomAccessRange
&
rng
,
BinaryPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
RandomAccessRangeConcept
<
const
RandomAccessRange
>
));
std
::
sort
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
pred
);
return
rng
;
}
}
// namespace range
using
range
::
sort
;
}
// namespace boost
...
...
include/boost/range/algorithm/stable_sort.hpp
View file @
5eaa391d
...
...
@@ -34,6 +34,15 @@ inline RandomAccessRange& stable_sort(RandomAccessRange& rng)
return
rng
;
}
/// \overload
template
<
class
RandomAccessRange
>
inline
const
RandomAccessRange
&
stable_sort
(
const
RandomAccessRange
&
rng
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
RandomAccessRangeConcept
<
const
RandomAccessRange
>
));
std
::
stable_sort
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
));
return
rng
;
}
/// \overload
template
<
class
RandomAccessRange
,
class
BinaryPredicate
>
inline
RandomAccessRange
&
stable_sort
(
RandomAccessRange
&
rng
,
BinaryPredicate
sort_pred
)
...
...
@@ -43,6 +52,15 @@ inline RandomAccessRange& stable_sort(RandomAccessRange& rng, BinaryPredicate so
return
rng
;
}
/// \overload
template
<
class
RandomAccessRange
,
class
BinaryPredicate
>
inline
const
RandomAccessRange
&
stable_sort
(
const
RandomAccessRange
&
rng
,
BinaryPredicate
sort_pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
RandomAccessRangeConcept
<
const
RandomAccessRange
>
));
std
::
stable_sort
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
sort_pred
);
return
rng
;
}
}
// namespace range
using
range
::
stable_sort
;
}
// namespace boost
...
...
include/boost/range/algorithm/swap_ranges.hpp
View file @
5eaa391d
...
...
@@ -80,6 +80,51 @@ swap_ranges(SinglePassRange1& range1, SinglePassRange2& range2)
return
range2
;
}
/// \overload
template
<
class
SinglePassRange1
,
class
SinglePassRange2
>
inline
SinglePassRange2
&
swap_ranges
(
const
SinglePassRange1
&
range1
,
SinglePassRange2
&
range2
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange1
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
SinglePassRange2
>
));
boost
::
range_detail
::
swap_ranges_impl
(
boost
::
begin
(
range1
),
boost
::
end
(
range1
),
boost
::
begin
(
range2
),
boost
::
end
(
range2
));
return
range2
;
}
/// \overload
template
<
class
SinglePassRange1
,
class
SinglePassRange2
>
inline
const
SinglePassRange2
&
swap_ranges
(
SinglePassRange1
&
range1
,
const
SinglePassRange2
&
range2
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
SinglePassRange1
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange2
>
));
boost
::
range_detail
::
swap_ranges_impl
(
boost
::
begin
(
range1
),
boost
::
end
(
range1
),
boost
::
begin
(
range2
),
boost
::
end
(
range2
));
return
range2
;
}
/// \overload
template
<
class
SinglePassRange1
,
class
SinglePassRange2
>
inline
const
SinglePassRange2
&
swap_ranges
(
const
SinglePassRange1
&
range1
,
const
SinglePassRange2
&
range2
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange1
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange2
>
));
boost
::
range_detail
::
swap_ranges_impl
(
boost
::
begin
(
range1
),
boost
::
end
(
range1
),
boost
::
begin
(
range2
),
boost
::
end
(
range2
));
return
range2
;
}
}
// namespace range
using
range
::
swap_ranges
;
}
// namespace boost
...
...
include/boost/range/algorithm/upper_bound.hpp
View file @
5eaa391d
...
...
@@ -27,24 +27,53 @@ namespace boost
///
/// \pre ForwardRange is a model of the ForwardRangeConcept
template
<
class
ForwardRange
,
class
Value
>
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
ForwardRange
>::
type
inline
BOOST_DEDUCED_TYPENAME
disable_if
<
is_const
<
ForwardRange
>
,
BOOST_DEDUCED_TYPENAME
range_iterator
<
ForwardRange
>::
type
>::
type
upper_bound
(
ForwardRange
&
rng
,
Value
val
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
ForwardRange
>
));
return
std
::
upper_bound
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
val
);
}
/// \overload
template
<
class
ForwardRange
,
class
Value
>
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
ForwardRange
>::
type
upper_bound
(
const
ForwardRange
&
rng
,
Value
val
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
return
std
::
upper_bound
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
val
);
}
/// \overload
template
<
class
ForwardRange
,
class
Value
,
class
SortPredicate
>
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
ForwardRange
>::
type
inline
BOOST_DEDUCED_TYPENAME
disable_if
<
is_const
<
ForwardRange
>
,
BOOST_DEDUCED_TYPENAME
range_iterator
<
ForwardRange
>::
type
>::
type
upper_bound
(
ForwardRange
&
rng
,
Value
val
,
SortPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
ForwardRange
>
));
return
std
::
upper_bound
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
val
,
pred
);
}
/// \overload
template
<
class
ForwardRange
,
class
Value
,
class
SortPredicate
>
inline
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
ForwardRange
>::
type
upper_bound
(
const
ForwardRange
&
rng
,
Value
val
,
SortPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
return
std
::
upper_bound
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
val
,
pred
);
}
/// \overload
template
<
range_return_value
re
,
class
ForwardRange
,
class
Value
>
inline
BOOST_DEDUCED_TYPENAME
range_return
<
ForwardRange
,
re
>::
type
inline
BOOST_DEDUCED_TYPENAME
disable_if
<
is_const
<
ForwardRange
>
,
BOOST_DEDUCED_TYPENAME
range_return
<
ForwardRange
,
re
>::
type
>::
type
upper_bound
(
ForwardRange
&
rng
,
Value
val
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
ForwardRange
>
));
...
...
@@ -52,10 +81,25 @@ upper_bound( ForwardRange& rng, Value val )
pack
(
std
::
upper_bound
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
val
),
rng
);
}
/// \overload
template
<
range_return_value
re
,
class
ForwardRange
,
class
Value
>
inline
BOOST_DEDUCED_TYPENAME
range_return
<
const
ForwardRange
,
re
>::
type
upper_bound
(
const
ForwardRange
&
rng
,
Value
val
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
return
range_return
<
const
ForwardRange
,
re
>::
pack
(
std
::
upper_bound
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
val
),
rng
);
}
/// \overload
template
<
range_return_value
re
,
class
ForwardRange
,
class
Value
,
class
SortPredicate
>
inline
BOOST_DEDUCED_TYPENAME
range_return
<
ForwardRange
,
re
>::
type
inline
BOOST_DEDUCED_TYPENAME
disable_if
<
is_const
<
ForwardRange
>
,
BOOST_DEDUCED_TYPENAME
range_return
<
ForwardRange
,
re
>::
type
>::
type
upper_bound
(
ForwardRange
&
rng
,
Value
val
,
SortPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
ForwardRange
>
));
...
...
@@ -64,6 +108,18 @@ upper_bound( ForwardRange& rng, Value val, SortPredicate pred )
rng
);
}
/// \overload
template
<
range_return_value
re
,
class
ForwardRange
,
class
Value
,
class
SortPredicate
>
inline
BOOST_DEDUCED_TYPENAME
range_return
<
const
ForwardRange
,
re
>::
type
upper_bound
(
const
ForwardRange
&
rng
,
Value
val
,
SortPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
return
range_return
<
const
ForwardRange
,
re
>::
pack
(
std
::
upper_bound
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
val
,
pred
),
rng
);
}
}
// namespace range
using
range
::
upper_bound
;
}
// namespace boost
...
...
include/boost/range/algorithm_ext/iota.hpp
View file @
5eaa391d
...
...
@@ -34,6 +34,19 @@ inline ForwardRange& iota( ForwardRange& rng, Value x )
return
rng
;
}
template
<
class
ForwardRange
,
class
Value
>
inline
const
ForwardRange
&
iota
(
const
ForwardRange
&
rng
,
Value
x
)
{
BOOST_CONCEPT_ASSERT
((
ForwardRangeConcept
<
const
ForwardRange
>
));
typedef
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
ForwardRange
>::
type
iterator_t
;
iterator_t
last_target
=
::
boost
::
end
(
rng
);
for
(
iterator_t
target
=
::
boost
::
begin
(
rng
);
target
!=
last_target
;
++
target
,
++
x
)
*
target
=
x
;
return
rng
;
}
}
// namespace range
using
range
::
iota
;
}
// namespace boost
...
...
include/boost/range/algorithm_ext/is_sorted.hpp
View file @
5eaa391d
...
...
@@ -51,7 +51,7 @@ template<class SinglePassRange>
inline
bool
is_sorted
(
const
SinglePassRange
&
rng
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
LessThanComparableConcept
<
BOOST_DEDUCED_TYPENAME
range_value
<
SinglePassRange
>::
type
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
LessThanComparableConcept
<
BOOST_DEDUCED_TYPENAME
range_value
<
const
SinglePassRange
>::
type
>
));
return
range_detail
::
is_sorted
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
));
}
...
...
@@ -59,8 +59,8 @@ inline bool is_sorted(const SinglePassRange& rng)
template
<
class
SinglePassRange
,
class
BinaryPredicate
>
inline
bool
is_sorted
(
const
SinglePassRange
&
rng
,
BinaryPredicate
pred
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
SinglePassRange
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
BinaryPredicateConcept
<
BinaryPredicate
,
BOOST_DEDUCED_TYPENAME
range_value
<
SinglePassRange
>::
type
,
BOOST_DEDUCED_TYPENAME
range_value
<
SinglePassRange
>::
type
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
BinaryPredicateConcept
<
BinaryPredicate
,
BOOST_DEDUCED_TYPENAME
range_value
<
const
SinglePassRange
>::
type
,
BOOST_DEDUCED_TYPENAME
range_value
<
const
SinglePassRange
>::
type
>
));
return
range_detail
::
is_sorted
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
pred
);
}
...
...
include/boost/range/algorithm_ext/overwrite.hpp
View file @
5eaa391d
...
...
@@ -50,6 +50,33 @@ inline void overwrite( const SinglePassRange1& from, SinglePassRange2& to )
}
}
template
<
class
SinglePassRange1
,
class
SinglePassRange2
>
inline
void
overwrite
(
const
SinglePassRange1
&
from
,
const
SinglePassRange2
&
to
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange1
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange2
>
));
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
SinglePassRange1
>::
type
i
=
boost
::
begin
(
from
),
e
=
boost
::
end
(
from
);
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
SinglePassRange2
>::
type
out
=
boost
::
begin
(
to
);
#ifndef NDEBUG
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
SinglePassRange2
>::
type
last_out
=
boost
::
end
(
to
);
#endif
for
(
;
i
!=
e
;
++
out
,
++
i
)
{
#ifndef NDEBUG
BOOST_ASSERT
(
out
!=
last_out
&&
"out of bounds in boost::overwrite()"
);
#endif
*
out
=
*
i
;
}
}
}
// namespace range
using
range
::
overwrite
;
}
// namespace boost
...
...
include/boost/range/detail/join_iterator.hpp
View file @
5eaa391d
...
...
@@ -12,9 +12,9 @@
#define BOOST_RANGE_DETAIL_JOIN_ITERATOR_HPP_INCLUDED
#include <iterator>
#include <boost/assert.hpp>
#include <boost/iterator/iterator_traits.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include <boost/intrusive_ptr.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/empty.hpp>
...
...
@@ -30,21 +30,6 @@ namespace boost
template
<
typename
Iterator1
,
typename
Iterator2
>
struct
join_iterator_link
{
private
:
class
reference_count_t
{
public
:
reference_count_t
()
:
m_count
(
0u
)
{}
reference_count_t
(
const
reference_count_t
&
)
:
m_count
(
0u
)
{}
reference_count_t
&
operator
=
(
const
reference_count_t
&
)
{
return
*
this
;
}
void
increment
()
{
++
m_count
;
}
bool
decrement
()
{
return
--
m_count
?
false
:
true
;
}
private
:
unsigned
int
m_count
;
};
public
:
join_iterator_link
(
Iterator1
last1
,
Iterator2
first2
)
:
last1
(
last1
)
...
...
@@ -52,43 +37,13 @@ public:
{
}
void
add_reference
()
const
{
count
.
increment
();
}
bool
release_reference
()
const
{
return
count
.
decrement
();
}
Iterator1
last1
;
Iterator2
first2
;
private
:
join_iterator_link
()
/* = delete */
;
mutable
reference_count_t
count
;
};
}
// range_detail
template
<
typename
Iterator1
,
typename
Iterator2
>
inline
void
intrusive_ptr_add_ref
(
const
range_detail
::
join_iterator_link
<
Iterator1
,
Iterator2
>*
p
)
{
p
->
add_reference
();
}
template
<
typename
Iterator1
,
typename
Iterator2
>
inline
void
intrusive_ptr_release
(
const
range_detail
::
join_iterator_link
<
Iterator1
,
Iterator2
>*
p
)
{
if
(
p
->
release_reference
())
delete
p
;
}
namespace
range_detail
{
class
join_iterator_begin_tag
{};
class
join_iterator_end_tag
{};
...
...
@@ -179,12 +134,16 @@ public:
typedef
Iterator1
iterator1_t
;
typedef
Iterator2
iterator2_t
;
join_iterator
()
:
m_section
(
0u
)
{}
join_iterator
()
:
m_section
(
0u
)
,
m_it
(
0u
,
iterator1_t
(),
iterator2_t
())
,
m_link
(
link_t
(
iterator1_t
(),
iterator2_t
()))
{}
join_iterator
(
unsigned
int
section
,
Iterator1
current1
,
Iterator1
last1
,
Iterator2
first2
,
Iterator2
current2
)
:
m_section
(
section
)
,
m_it
(
section
,
current1
,
current2
)
,
m_link
(
new
link_t
(
last1
,
first2
))
,
m_link
(
link_t
(
last1
,
first2
))
{
}
...
...
@@ -192,7 +151,7 @@ public:
join_iterator
(
Range1
&
r1
,
Range2
&
r2
,
join_iterator_begin_tag
)
:
m_section
(
boost
::
empty
(
r1
)
?
1u
:
0u
)
,
m_it
(
boost
::
empty
(
r1
)
?
1u
:
0u
,
boost
::
begin
(
r1
),
boost
::
begin
(
r2
))
,
m_link
(
new
link_t
(
boost
::
end
(
r1
),
boost
::
begin
(
r2
)))
,
m_link
(
link_t
(
boost
::
end
(
r1
),
boost
::
begin
(
r2
)))
{
}
...
...
@@ -200,7 +159,7 @@ public:
join_iterator
(
const
Range1
&
r1
,
const
Range2
&
r2
,
join_iterator_begin_tag
)
:
m_section
(
boost
::
empty
(
r1
)
?
1u
:
0u
)
,
m_it
(
boost
::
empty
(
r1
)
?
1u
:
0u
,
boost
::
const_begin
(
r1
),
boost
::
const_begin
(
r2
))
,
m_link
(
new
link_t
(
boost
::
const_end
(
r1
),
boost
::
const_begin
(
r2
)))
,
m_link
(
link_t
(
boost
::
const_end
(
r1
),
boost
::
const_begin
(
r2
)))
{
}
...
...
@@ -208,7 +167,7 @@ public:
join_iterator
(
Range1
&
r1
,
Range2
&
r2
,
join_iterator_end_tag
)
:
m_section
(
1u
)
,
m_it
(
1u
,
boost
::
end
(
r1
),
boost
::
end
(
r2
))
,
m_link
(
new
link_t
(
boost
::
end
(
r1
),
boost
::
begin
(
r2
)))
,
m_link
(
link_t
(
boost
::
end
(
r1
),
boost
::
begin
(
r2
)))
{
}
...
...
@@ -216,7 +175,7 @@ public:
join_iterator
(
const
Range1
&
r1
,
const
Range2
&
r2
,
join_iterator_end_tag
)
:
m_section
(
1u
)
,
m_it
(
1u
,
boost
::
const_end
(
r1
),
boost
::
const_end
(
r2
))
,
m_link
(
new
link_t
(
boost
::
const_end
(
r1
),
boost
::
const_begin
(
r2
)))
,
m_link
(
link_t
(
boost
::
const_end
(
r1
),
boost
::
const_begin
(
r2
)))
{
}
...
...
@@ -228,9 +187,9 @@ private:
else
{
++
m_it
.
it1
();
if
(
m_it
.
it1
()
==
m_link
->
last1
)
if
(
m_it
.
it1
()
==
m_link
.
last1
)
{
m_it
.
it2
()
=
m_link
->
first2
;
m_it
.
it2
()
=
m_link
.
first2
;
m_section
=
1u
;
}
}
...
...
@@ -240,9 +199,9 @@ private:
{
if
(
m_section
)
{
if
(
m_it
.
it2
()
==
m_link
->
first2
)
if
(
m_it
.
it2
()
==
m_link
.
first2
)
{
m_it
.
it1
()
=
boost
::
prior
(
m_link
->
last1
);
m_it
.
it1
()
=
boost
::
prior
(
m_link
.
last1
);
m_section
=
0u
;
}
else
...
...
@@ -280,8 +239,8 @@ private:
result
=
other
.
m_it
.
it2
()
-
m_it
.
it2
();
else
{
result
=
(
m_link
->
first2
-
m_it
.
it2
())
+
(
other
.
m_it
.
it1
()
-
m_link
->
last1
);
result
=
(
m_link
.
first2
-
m_it
.
it2
())
+
(
other
.
m_it
.
it1
()
-
m_link
.
last1
);
BOOST_ASSERT
(
result
<=
0
);
}
...
...
@@ -290,8 +249,8 @@ private:
{
if
(
other
.
m_section
)
{
result
=
(
m_link
->
last1
-
m_it
.
it1
())
+
(
other
.
m_it
.
it2
()
-
m_link
->
first2
);
result
=
(
m_link
.
last1
-
m_it
.
it1
())
+
(
other
.
m_it
.
it2
()
-
m_link
.
first2
);
}
else
result
=
other
.
m_it
.
it1
()
-
m_it
.
it1
();
...
...
@@ -305,7 +264,7 @@ private:
BOOST_ASSERT
(
m_section
==
1u
);
if
(
offset
<
0
)
{
difference_t
r2_dist
=
m_link
->
first2
-
m_it
.
it2
();
difference_t
r2_dist
=
m_link
.
first2
-
m_it
.
it2
();
BOOST_ASSERT
(
r2_dist
<=
0
);
if
(
offset
>=
r2_dist
)
std
::
advance
(
m_it
.
it2
(),
offset
);
...
...
@@ -313,7 +272,7 @@ private:
{
difference_t
r1_dist
=
offset
-
r2_dist
;
BOOST_ASSERT
(
r1_dist
<=
0
);
m_it
.
it1
()
=
m_link
->
last1
+
r1_dist
;
m_it
.
it1
()
=
m_link
.
last1
+
r1_dist
;
m_section
=
0u
;
}
}
...
...
@@ -327,7 +286,7 @@ private:
BOOST_ASSERT
(
m_section
==
0u
);
if
(
offset
>
0
)
{
difference_t
r1_dist
=
m_link
->
last1
-
m_it
.
it1
();
difference_t
r1_dist
=
m_link
.
last1
-
m_it
.
it1
();
BOOST_ASSERT
(
r1_dist
>=
0
);
if
(
offset
<
r1_dist
)
std
::
advance
(
m_it
.
it1
(),
offset
);
...
...
@@ -335,7 +294,7 @@ private:
{
difference_t
r2_dist
=
offset
-
r1_dist
;
BOOST_ASSERT
(
r2_dist
>=
0
);
m_it
.
it2
()
=
m_link
->
first2
+
r2_dist
;
m_it
.
it2
()
=
m_link
.
first2
+
r2_dist
;
m_section
=
1u
;
}
}
...
...
@@ -345,7 +304,7 @@ private:
unsigned
int
m_section
;
iterator_union
m_it
;
intrusive_ptr
<
const
link_t
>
m_link
;
link_t
m_link
;
friend
class
::
boost
::
iterator_core_access
;
};
...
...
include/boost/range/irange.hpp
View file @
5eaa391d
...
...
@@ -173,28 +173,54 @@ namespace boost
}
// namespace range_detail
template
<
typename
Integer
>
iterator_range
<
range_detail
::
integer_iterator
<
Integer
>
>
class
integer_range
:
public
iterator_range
<
range_detail
::
integer_iterator
<
Integer
>
>
{
typedef
range_detail
::
integer_iterator
<
Integer
>
iterator_t
;
typedef
iterator_range
<
iterator_t
>
base_t
;
public
:
integer_range
(
Integer
first
,
Integer
last
)
:
base_t
(
iterator_t
(
first
),
iterator_t
(
last
))
{
}
};
template
<
typename
Integer
>
class
strided_integer_range
:
public
iterator_range
<
range_detail
::
integer_iterator_with_step
<
Integer
>
>
{
typedef
range_detail
::
integer_iterator_with_step
<
Integer
>
iterator_t
;
typedef
iterator_range
<
iterator_t
>
base_t
;
public
:
template
<
typename
Iterator
>
strided_integer_range
(
Iterator
first
,
Iterator
last
)
:
base_t
(
first
,
last
)
{
}
};
template
<
typename
Integer
>
integer_range
<
Integer
>
irange
(
Integer
first
,
Integer
last
)
{
BOOST_ASSERT
(
first
<=
last
);
return
boost
::
iterator_range
<
range_detail
::
integer_iterator
<
Integer
>
>
(
range_detail
::
integer_iterator
<
Integer
>
(
first
),
range_detail
::
integer_iterator
<
Integer
>
(
last
));
return
integer_range
<
Integer
>
(
first
,
last
);
}
template
<
typename
Integer
,
typename
StepSize
>
iterator_range
<
range_detail
::
integer_iterator_with_step
<
Integer
>
>
strided_integer_range
<
Integer
>
irange
(
Integer
first
,
Integer
last
,
StepSize
step_size
)
{
BOOST_ASSERT
(
step_size
!=
0
);
BOOST_ASSERT
(
(
step_size
>
0
)
?
(
last
>=
first
)
:
(
last
<=
first
)
);
typedef
typename
range_detail
::
integer_iterator_with_step
<
Integer
>
iterator_t
;
const
std
::
ptrdiff_t
last_step
=
(
static_cast
<
std
::
ptrdiff_t
>
(
last
)
-
static_cast
<
std
::
ptrdiff_t
>
(
first
))
/
(
static_cast
<
std
::
ptrdiff_t
>
(
step_size
));
return
boost
::
iterator_range
<
iterator_t
>
(
return
strided_integer_range
<
Integer
>
(
iterator_t
(
first
,
0
,
step_size
),
iterator_t
(
first
,
last_step
,
step_size
));
}
...
...
include/boost/range/join.hpp
View file @
5eaa391d
...
...
@@ -18,49 +18,64 @@
namespace
boost
{
namespace
range_detail
{
template
<
class
SinglePassRange1
,
class
SinglePassRange2
>
iterator_range
<
range_detail
::
join_iterator
<
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
SinglePassRange1
>::
type
,
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
SinglePassRange2
>::
type
,
BOOST_DEDUCED_TYPENAME
add_const
<
BOOST_DEDUCED_TYPENAME
range_value
<
const
SinglePassRange1
>::
type
>::
type
>
>
class
joined_type
{
public
:
typedef
iterator_range
<
range_detail
::
join_iterator
<
BOOST_DEDUCED_TYPENAME
range_iterator
<
SinglePassRange1
>::
type
,
BOOST_DEDUCED_TYPENAME
range_iterator
<
SinglePassRange2
>::
type
,
BOOST_DEDUCED_TYPENAME
range_value
<
SinglePassRange1
>::
type
>
>
type
;
};
}
// namespace range_detail
template
<
class
SinglePassRange1
,
class
SinglePassRange2
>
class
joined_range
:
public
range_detail
::
joined_type
<
SinglePassRange1
,
SinglePassRange2
>::
type
{
typedef
range_detail
::
join_iterator
<
BOOST_DEDUCED_TYPENAME
range_iterator
<
SinglePassRange1
>::
type
,
BOOST_DEDUCED_TYPENAME
range_iterator
<
SinglePassRange2
>::
type
,
BOOST_DEDUCED_TYPENAME
range_value
<
SinglePassRange1
>::
type
>
iterator_t
;
typedef
BOOST_DEDUCED_TYPENAME
range_detail
::
joined_type
<
SinglePassRange1
,
SinglePassRange2
>::
type
base_t
;
public
:
joined_range
(
SinglePassRange1
&
rng1
,
SinglePassRange2
&
rng2
)
:
base_t
(
iterator_t
(
rng1
,
rng2
,
range_detail
::
join_iterator_begin_tag
()),
iterator_t
(
rng1
,
rng2
,
range_detail
::
join_iterator_end_tag
())
)
{
}
};
template
<
class
SinglePassRange1
,
class
SinglePassRange2
>
joined_range
<
const
SinglePassRange1
,
const
SinglePassRange2
>
join
(
const
SinglePassRange1
&
r1
,
const
SinglePassRange2
&
r2
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
SinglePassRange1
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
SinglePassRange2
>
));
typedef
range_detail
::
join_iterator
<
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
SinglePassRange1
>::
type
,
BOOST_DEDUCED_TYPENAME
range_iterator
<
const
SinglePassRange2
>::
type
,
BOOST_DEDUCED_TYPENAME
add_const
<
BOOST_DEDUCED_TYPENAME
range_value
<
const
SinglePassRange1
>::
type
>::
type
>
iterator_t
;
return
iterator_range
<
iterator_t
>
(
iterator_t
(
r1
,
r2
,
range_detail
::
join_iterator_begin_tag
()),
iterator_t
(
r1
,
r2
,
range_detail
::
join_iterator_end_tag
()));
return
joined_range
<
const
SinglePassRange1
,
const
SinglePassRange2
>
(
r1
,
r2
);
}
template
<
class
SinglePassRange1
,
class
SinglePassRange2
>
iterator_range
<
range_detail
::
join_iterator
<
BOOST_DEDUCED_TYPENAME
range_iterator
<
SinglePassRange1
>::
type
,
BOOST_DEDUCED_TYPENAME
range_iterator
<
SinglePassRange2
>::
type
,
BOOST_DEDUCED_TYPENAME
range_value
<
SinglePassRange1
>::
type
>
>
joined_range
<
SinglePassRange1
,
SinglePassRange2
>
join
(
SinglePassRange1
&
r1
,
SinglePassRange2
&
r2
)
{
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
SinglePassRange1
>
));
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
SinglePassRange2
>
));
typedef
range_detail
::
join_iterator
<
BOOST_DEDUCED_TYPENAME
range_iterator
<
SinglePassRange1
>::
type
,
BOOST_DEDUCED_TYPENAME
range_iterator
<
SinglePassRange2
>::
type
,
BOOST_DEDUCED_TYPENAME
range_value
<
SinglePassRange1
>::
type
>
iterator_t
;
return
iterator_range
<
iterator_t
>
(
iterator_t
(
r1
,
r2
,
range_detail
::
join_iterator_begin_tag
()),
iterator_t
(
r1
,
r2
,
range_detail
::
join_iterator_end_tag
()));
return
joined_range
<
SinglePassRange1
,
SinglePassRange2
>
(
r1
,
r2
);
}
}
// namespace boost
...
...
include/boost/range/numeric.hpp
View file @
5eaa391d
...
...
@@ -31,6 +31,7 @@
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/concepts.hpp>
#include <boost/range/distance.hpp>
#include <numeric>
...
...
@@ -39,14 +40,14 @@ namespace boost
template
<
class
SinglePassRange
,
class
Value
>
inline
Value
accumulate
(
const
SinglePassRange
&
rng
,
Value
init
)
{
boost
::
function_requires
<
SinglePassRangeConcept
<
SinglePassRange
>
>
(
);
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
SinglePassRange
>
)
);
return
std
::
accumulate
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
init
);
}
template
<
class
SinglePassRange
,
class
Value
,
class
BinaryOperation
>
inline
Value
accumulate
(
const
SinglePassRange
&
rng
,
Value
init
,
BinaryOperation
op
)
{
boost
::
function_requires
<
SinglePassRangeConcept
<
SinglePassRange
>
>
(
);
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange
>
)
);
return
std
::
accumulate
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
init
,
op
);
}
...
...
@@ -54,8 +55,8 @@ namespace boost
template
<
class
SinglePassRange1
,
class
SinglePassRange2
,
class
Value
>
inline
Value
inner_product
(
const
SinglePassRange1
&
rng1
,
const
SinglePassRange2
&
rng2
,
Value
init
)
{
boost
::
function_requires
<
SinglePassRangeConcept
<
SinglePassRange1
>
>
(
);
boost
::
function_requires
<
SinglePassRangeConcept
<
SinglePassRange2
>
>
(
);
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange1
>
)
);
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange2
>
)
);
BOOST_ASSERT
(
boost
::
distance
(
rng2
)
>=
boost
::
distance
(
rng1
)
);
return
std
::
inner_product
(
boost
::
begin
(
rng1
),
boost
::
end
(
rng1
),
boost
::
begin
(
rng2
),
init
);
...
...
@@ -69,8 +70,8 @@ namespace boost
Value
init
,
BinaryOperation1
op1
,
BinaryOperation2
op2
)
{
boost
::
function_requires
<
SinglePassRangeConcept
<
SinglePassRange1
>
>
(
);
boost
::
function_requires
<
SinglePassRangeConcept
<
SinglePassRange2
>
>
(
);
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange1
>
)
);
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange2
>
)
);
BOOST_ASSERT
(
boost
::
distance
(
rng2
)
>=
boost
::
distance
(
rng1
)
);
return
std
::
inner_product
(
boost
::
begin
(
rng1
),
boost
::
end
(
rng1
),
...
...
@@ -81,7 +82,7 @@ namespace boost
inline
OutputIterator
partial_sum
(
const
SinglePassRange
&
rng
,
OutputIterator
result
)
{
boost
::
function_requires
<
SinglePassRangeConcept
<
SinglePassRange
>
>
(
);
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange
>
)
);
return
std
::
partial_sum
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
result
);
}
...
...
@@ -89,7 +90,7 @@ namespace boost
inline
OutputIterator
partial_sum
(
const
SinglePassRange
&
rng
,
OutputIterator
result
,
BinaryOperation
op
)
{
boost
::
function_requires
<
SinglePassRangeConcept
<
SinglePassRange
>
>
(
);
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange
>
)
);
return
std
::
partial_sum
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
result
,
op
);
}
...
...
@@ -97,7 +98,7 @@ namespace boost
inline
OutputIterator
adjacent_difference
(
const
SinglePassRange
&
rng
,
OutputIterator
result
)
{
boost
::
function_requires
<
SinglePassRangeConcept
<
SinglePassRange
>
>
(
);
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
const
SinglePassRange
>
)
);
return
std
::
adjacent_difference
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
result
);
}
...
...
@@ -107,7 +108,7 @@ namespace boost
OutputIterator
result
,
BinaryOperation
op
)
{
boost
::
function_requires
<
SinglePassRangeConcept
<
SinglePassRange
>
>
(
);
BOOST_RANGE_CONCEPT_ASSERT
((
SinglePassRangeConcept
<
SinglePassRange
>
)
);
return
std
::
adjacent_difference
(
boost
::
begin
(
rng
),
boost
::
end
(
rng
),
result
,
op
);
}
...
...
include/boost/type_traits/add_reference.hpp
View file @
5eaa391d
...
...
@@ -51,13 +51,31 @@ struct add_reference_impl
};
#else
//
// We can't filter out rvalue_references at the same level as
// references or we get ambiguities from msvc:
//
template
<
typename
T
>
struct
add_reference_
impl
struct
add_reference_
rvalue_layer
{
typedef
T
&
type
;
};
#ifndef BOOST_NO_RVALUE_REFERENCES
template
<
typename
T
>
struct
add_reference_rvalue_layer
<
T
&&>
{
typedef
T
&&
type
;
};
#endif
template
<
typename
T
>
struct
add_reference_impl
{
typedef
typename
add_reference_rvalue_layer
<
T
>::
type
type
;
};
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1
(
typename
T
,
add_reference
,
T
&
,
T
&
)
#endif
...
...
include/boost/type_traits/function_traits.hpp
View file @
5eaa391d
...
...
@@ -166,7 +166,7 @@ struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)>
template
<
typename
Function
>
struct
function_traits
:
public
detail
::
function_traits_helper
<
typename
boost
::
add_pointer
<
Function
>::
type
>
public
boost
::
detail
::
function_traits_helper
<
typename
boost
::
add_pointer
<
Function
>::
type
>
{
};
...
...
@@ -227,7 +227,7 @@ type_of_size<11> function_arity_helper(R (*f)(T1, T2, T3, T4, T5, T6, T7, T8,
template
<
typename
Function
>
struct
function_traits
{
BOOST_STATIC_CONSTANT
(
unsigned
,
arity
=
(
sizeof
(
detail
::
function_arity_helper
((
Function
*
)
0
))
-
1
));
BOOST_STATIC_CONSTANT
(
unsigned
,
arity
=
(
sizeof
(
boost
::
detail
::
function_arity_helper
((
Function
*
)
0
))
-
1
));
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
...
...
include/boost/type_traits/is_complex.hpp
View file @
5eaa391d
...
...
@@ -25,7 +25,7 @@ struct is_convertible_from_tester
}
BOOST_TT_AUX_BOOL_TRAIT_DEF1
(
is_complex
,
T
,(
::
boost
::
is_convertible
<
T
,
detail
::
is_convertible_from_tester
>::
value
))
BOOST_TT_AUX_BOOL_TRAIT_DEF1
(
is_complex
,
T
,(
::
boost
::
is_convertible
<
T
,
boost
::
detail
::
is_convertible_from_tester
>::
value
))
}
// namespace boost
...
...
include/boost/type_traits/is_const.hpp
View file @
5eaa391d
...
...
@@ -50,12 +50,31 @@ BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,__is_const(T))
#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
//* is a type T declared const - is_const<T>
namespace
detail
{
//
// We can't filter out rvalue_references at the same level as
// references or we get ambiguities from msvc:
//
template
<
class
T
>
struct
is_const_rvalue_filter
{
#if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
BOOST_TT_AUX_BOOL_TRAIT_DEF1
(
is_const
,
T
,
::
boost
::
detail
::
cv_traits_imp
<
typename
remove_bounds
<
T
>::
type
*>::
is_const
)
BOOST_STATIC_CONSTANT
(
bool
,
value
=
::
boost
::
detail
::
cv_traits_imp
<
typename
boost
::
remove_bounds
<
T
>::
type
*>::
is_const
);
#else
BOOST_TT_AUX_BOOL_TRAIT_DEF1
(
is_const
,
T
,
::
boost
::
detail
::
cv_traits_imp
<
T
*>::
is_const
)
BOOST_STATIC_CONSTANT
(
bool
,
value
=
::
boost
::
detail
::
cv_traits_imp
<
T
*>::
is_const
);
#endif
};
#ifndef BOOST_NO_RVALUE_REFERENCES
template
<
class
T
>
struct
is_const_rvalue_filter
<
T
&&>
{
BOOST_STATIC_CONSTANT
(
bool
,
value
=
false
);
};
#endif
}
//* is a type T declared const - is_const<T>
BOOST_TT_AUX_BOOL_TRAIT_DEF1
(
is_const
,
T
,
::
boost
::
detail
::
is_const_rvalue_filter
<
T
>::
value
)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1
(
typename
T
,
is_const
,
T
&
,
false
)
#if defined(BOOST_ILLEGAL_CV_REFERENCES)
...
...
@@ -98,7 +117,7 @@ struct is_const_helper<false,false>
{
static
T
*
t
;
BOOST_STATIC_CONSTANT
(
bool
,
value
=
(
sizeof
(
detail
::
yes_type
)
==
sizeof
(
detail
::
is_const_tester
(
t
))
sizeof
(
boost
::
detail
::
yes_type
)
==
sizeof
(
boost
::
detail
::
is_const_tester
(
t
))
));
};
};
...
...
@@ -110,7 +129,7 @@ struct is_const_helper<false,true>
{
static
T
t
;
BOOST_STATIC_CONSTANT
(
bool
,
value
=
(
sizeof
(
detail
::
yes_type
)
==
sizeof
(
detail
::
is_const_tester
(
&
t
))
sizeof
(
boost
::
detail
::
yes_type
)
==
sizeof
(
boost
::
detail
::
is_const_tester
(
&
t
))
));
};
};
...
...
include/boost/type_traits/is_convertible.hpp
View file @
5eaa391d
...
...
@@ -132,7 +132,7 @@ template <typename From, typename To>
struct
is_convertible_basic_impl
{
static
From
_m_from
;
static
bool
const
value
=
sizeof
(
detail
::
checker
<
To
>::
_m_check
(
_m_from
,
0
)
)
static
bool
const
value
=
sizeof
(
boost
::
detail
::
checker
<
To
>::
_m_check
(
_m_from
,
0
)
)
==
sizeof
(
::
boost
::
type_traits
::
yes_type
);
};
...
...
include/boost/type_traits/is_function.hpp
View file @
5eaa391d
...
...
@@ -95,6 +95,9 @@ struct is_function_impl<T&> : public false_type
BOOST_TT_AUX_BOOL_TRAIT_DEF1
(
is_function
,
T
,
__is_function
(
T
))
#else
BOOST_TT_AUX_BOOL_TRAIT_DEF1
(
is_function
,
T
,
::
boost
::
detail
::
is_function_impl
<
T
>::
value
)
#ifndef BOOST_NO_RVALUE_REFERENCES
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1
(
typename
T
,
is_function
,
T
&&
,
false
)
#endif
#endif
}
// namespace boost
...
...
include/boost/type_traits/is_reference.hpp
View file @
5eaa391d
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes,
// Howard Hinnant and John Maddock 2000.
// Howard Hinnant and John Maddock 2000
, 2010
.
// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001
// Use, modification and distribution are subject to the Boost Software License,
...
...
@@ -9,107 +9,34 @@
//
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
// Fixed is_pointer, is_reference, is_const, is_volatile, is_same,
// is_member_pointer based on the Simulated Partial Specialization work
// of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or
// http://groups.yahoo.com/group/boost/message/5441
// Some workarounds in here use ideas suggested from "Generic<Programming>:
// Mappings between Types and Values"
// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html).
#ifndef BOOST_TT_IS_REFERENCE_HPP_INCLUDED
#define BOOST_TT_IS_REFERENCE_HPP_INCLUDED
#include <boost/type_traits/config.hpp>
#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# include <boost/type_traits/detail/yes_no_type.hpp>
# include <boost/type_traits/detail/wrap.hpp>
#endif
#include <boost/type_traits/is_lvalue_reference.hpp>
#include <boost/type_traits/is_rvalue_reference.hpp>
#include <boost/type_traits/ice.hpp>
// should be the last #include
#include <boost/type_traits/detail/bool_trait_def.hpp>
namespace
boost
{
#if defined( __CODEGEARC__ )
BOOST_TT_AUX_BOOL_TRAIT_DEF1
(
is_reference
,
T
,
__is_reference
(
T
))
#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
BOOST_TT_AUX_BOOL_TRAIT_DEF1
(
is_reference
,
T
,
false
)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1
(
typename
T
,
is_reference
,
T
&
,
true
)
#if defined(BOOST_ILLEGAL_CV_REFERENCES)
// these are illegal specialisations; cv-qualifies applied to
// references have no effect according to [8.3.2p1],
// C++ Builder requires them though as it treats cv-qualified
// references as distinct types...
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1
(
typename
T
,
is_reference
,
T
&
const
,
true
)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1
(
typename
T
,
is_reference
,
T
&
volatile
,
true
)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1
(
typename
T
,
is_reference
,
T
&
const
volatile
,
true
)
#endif
#if defined(__GNUC__) && (__GNUC__ < 3)
// these allow us to work around illegally cv-qualified reference
// types.
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1
(
typename
T
,
is_reference
,
T
const
,
::
boost
::
is_reference
<
T
>::
value
)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1
(
typename
T
,
is_reference
,
T
volatile
,
::
boost
::
is_reference
<
T
>::
value
)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1
(
typename
T
,
is_reference
,
T
const
volatile
,
::
boost
::
is_reference
<
T
>::
value
)
// However, the above specializations confuse gcc 2.96 unless we also
// supply these specializations for array types
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2
(
typename
T
,
unsigned
long
N
,
is_reference
,
T
[
N
],
false
)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2
(
typename
T
,
unsigned
long
N
,
is_reference
,
const
T
[
N
],
false
)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2
(
typename
T
,
unsigned
long
N
,
is_reference
,
volatile
T
[
N
],
false
)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2
(
typename
T
,
unsigned
long
N
,
is_reference
,
const
volatile
T
[
N
],
false
)
#endif
#else
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable: 4181 4097)
#endif
namespace
detail
{
using
::
boost
::
type_traits
::
yes_type
;
using
::
boost
::
type_traits
::
no_type
;
using
::
boost
::
type_traits
::
wrap
;
template
<
class
T
>
T
&
(
*
is_reference_helper1
(
wrap
<
T
>
)
)(
wrap
<
T
>
);
char
is_reference_helper1
(...);
template
<
class
T
>
no_type
is_reference_helper2
(
T
&
(
*
)(
wrap
<
T
>
));
yes_type
is_reference_helper2
(...);
template
<
typename
T
>
struct
is_reference_impl
{
BOOST_STATIC_CONSTANT
(
bool
,
value
=
sizeof
(
::
boost
::
detail
::
is_reference_helper2
(
::
boost
::
detail
::
is_reference_helper1
(
::
boost
::
type_traits
::
wrap
<
T
>
())))
==
1
);
BOOST_STATIC_CONSTANT
(
bool
,
value
=
(
::
boost
::
type_traits
::
ice_or
<
::
boost
::
is_lvalue_reference
<
T
>::
value
,
::
boost
::
is_rvalue_reference
<
T
>::
value
>::
value
));
};
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1
(
is_reference
,
void
,
false
)
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1
(
is_reference
,
void
const
,
false
)
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1
(
is_reference
,
void
volatile
,
false
)
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1
(
is_reference
,
void
const
volatile
,
false
)
#endif
}
// namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF1
(
is_reference
,
T
,
::
boost
::
detail
::
is_reference_impl
<
T
>::
value
)
#ifdef BOOST_MSVC
# pragma warning(pop)
#endif
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
}
// namespace boost
#include <boost/type_traits/detail/bool_trait_undef.hpp>
...
...
include/boost/type_traits/is_same.hpp
View file @
5eaa391d
...
...
@@ -61,7 +61,7 @@ struct is_same_part_1
template
<
typename
T1
,
typename
T2
>
struct
is_same_impl
{
enum
{
value
=
detail
::
is_same_part_1
<
T1
>::
template
part_2
<
T2
>::
value
};
enum
{
value
=
boost
::
detail
::
is_same_part_1
<
T1
>::
template
part_2
<
T2
>::
value
};
};
#else // generic "no-partial-specialization" version
...
...
@@ -81,7 +81,7 @@ struct is_same_impl
BOOST_STATIC_CONSTANT
(
bool
,
value
=
(
::
boost
::
type_traits
::
ice_and
<
(
sizeof
(
type_traits
::
yes_type
)
==
sizeof
(
detail
::
is_same_tester
(
&
t
,
&
u
))),
(
sizeof
(
type_traits
::
yes_type
)
==
sizeof
(
boost
::
detail
::
is_same_tester
(
&
t
,
&
u
))),
(
::
boost
::
is_reference
<
T
>::
value
==
::
boost
::
is_reference
<
U
>::
value
),
(
sizeof
(
T
)
==
sizeof
(
U
))
>::
value
));
...
...
include/boost/type_traits/is_volatile.hpp
View file @
5eaa391d
...
...
@@ -41,16 +41,35 @@
namespace
boost
{
namespace
detail
{
template
<
class
T
>
struct
is_volatile_rval_filter
{
#if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
BOOST_STATIC_CONSTANT
(
bool
,
value
=
::
boost
::
detail
::
cv_traits_imp
<
typename
boost
::
remove_bounds
<
T
>::
type
*>::
is_volatile
);
#else
BOOST_STATIC_CONSTANT
(
bool
,
value
=
::
boost
::
detail
::
cv_traits_imp
<
T
*>::
is_volatile
);
#endif
};
#ifndef BOOST_NO_RVALUE_REFERENCES
//
// We can't filter out rvalue_references at the same level as
// references or we get ambiguities from msvc:
//
template
<
class
T
>
struct
is_volatile_rval_filter
<
T
&&>
{
BOOST_STATIC_CONSTANT
(
bool
,
value
=
false
);
};
#endif
}
#if defined( __CODEGEARC__ )
BOOST_TT_AUX_BOOL_TRAIT_DEF1
(
is_volatile
,
T
,
__is_volatile
(
T
))
#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
//* is a type T declared volatile - is_volatile<T>
#if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
BOOST_TT_AUX_BOOL_TRAIT_DEF1
(
is_volatile
,
T
,
::
boost
::
detail
::
cv_traits_imp
<
typename
boost
::
remove_bounds
<
T
>::
type
*>::
is_volatile
)
#else
BOOST_TT_AUX_BOOL_TRAIT_DEF1
(
is_volatile
,
T
,
::
boost
::
detail
::
cv_traits_imp
<
T
*>::
is_volatile
)
#endif
BOOST_TT_AUX_BOOL_TRAIT_DEF1
(
is_volatile
,
T
,
::
boost
::
detail
::
is_volatile_rval_filter
<
T
>::
value
)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1
(
typename
T
,
is_volatile
,
T
&
,
false
)
#if defined(BOOST_ILLEGAL_CV_REFERENCES)
...
...
@@ -86,7 +105,7 @@ struct is_volatile_helper<false,false>
{
static
T
*
t
;
BOOST_STATIC_CONSTANT
(
bool
,
value
=
(
sizeof
(
detail
::
yes_type
)
==
sizeof
(
detail
::
is_volatile_tester
(
t
))
sizeof
(
boost
::
detail
::
yes_type
)
==
sizeof
(
boost
::
detail
::
is_volatile_tester
(
t
))
));
};
};
...
...
@@ -98,7 +117,7 @@ struct is_volatile_helper<false,true>
{
static
T
t
;
BOOST_STATIC_CONSTANT
(
bool
,
value
=
(
sizeof
(
detail
::
yes_type
)
==
sizeof
(
detail
::
is_volatile_tester
(
&
t
))
sizeof
(
boost
::
detail
::
yes_type
)
==
sizeof
(
boost
::
detail
::
is_volatile_tester
(
&
t
))
));
};
};
...
...
include/boost/type_traits/msvc/remove_all_extents.hpp
View file @
5eaa391d
...
...
@@ -36,7 +36,7 @@ namespace boost {
template
<
typename
T
>
struct
remove_all_extents
{
typedef
typename
detail
::
remove_all_extents_impl_typeof
<
typedef
typename
boost
::
detail
::
remove_all_extents_impl_typeof
<
boost
::
is_array
<
T
>::
value
>::
template
inner
<
T
,
remove_all_extents
<
T
>
>::
type
type
;
BOOST_MPL_AUX_LAMBDA_SUPPORT
(
1
,
remove_all_extents
,
T
)
...
...
include/boost/type_traits/msvc/remove_bounds.hpp
View file @
5eaa391d
...
...
@@ -32,7 +32,7 @@ namespace boost {
template
<
typename
T
>
struct
remove_bounds
{
typedef
typename
detail
::
remove_bounds_impl_typeof
<
typedef
typename
boost
::
detail
::
remove_bounds_impl_typeof
<
boost
::
is_array
<
T
>::
value
>::
template
inner
<
T
,
remove_bounds
<
T
>
>::
type
type
;
BOOST_MPL_AUX_LAMBDA_SUPPORT
(
1
,
remove_bounds
,
T
)
...
...
include/boost/type_traits/msvc/remove_const.hpp
View file @
5eaa391d
...
...
@@ -124,7 +124,7 @@ namespace boost {
template
<
typename
T
>
struct
remove_const
{
typedef
detail
::
remove_const_impl_typeof
<
typedef
boost
::
detail
::
remove_const_impl_typeof
<
boost
::
is_pointer
<
T
>::
value
,
boost
::
is_array
<
T
>::
value
,
boost
::
is_const
<
T
>::
value
,
...
...
include/boost/type_traits/msvc/remove_cv.hpp
View file @
5eaa391d
...
...
@@ -171,7 +171,7 @@ namespace boost {
template
<
typename
T
>
struct
remove_cv
{
typedef
detail
::
remove_cv_impl_typeof
<
typedef
boost
::
detail
::
remove_cv_impl_typeof
<
boost
::
is_pointer
<
T
>::
value
,
boost
::
is_array
<
T
>::
value
,
boost
::
is_const
<
T
>::
value
,
...
...
include/boost/type_traits/msvc/remove_extent.hpp
View file @
5eaa391d
...
...
@@ -32,7 +32,7 @@ namespace boost {
template
<
typename
T
>
struct
remove_extent
{
typedef
typename
detail
::
remove_extent_impl_typeof
<
typedef
typename
boost
::
detail
::
remove_extent_impl_typeof
<
boost
::
is_array
<
T
>::
value
>::
template
inner
<
T
,
remove_extent
<
T
>
>::
type
type
;
BOOST_MPL_AUX_LAMBDA_SUPPORT
(
1
,
remove_extent
,
T
)
...
...
include/boost/type_traits/msvc/remove_pointer.hpp
View file @
5eaa391d
...
...
@@ -32,7 +32,7 @@ namespace boost {
template
<
typename
T
>
struct
remove_pointer
{
typedef
typename
detail
::
remove_pointer_impl_typeof
<
typedef
typename
boost
::
detail
::
remove_pointer_impl_typeof
<
boost
::
is_pointer
<
T
>::
value
>::
template
inner
<
T
,
remove_pointer
<
T
>
>::
type
type
;
BOOST_MPL_AUX_LAMBDA_SUPPORT
(
1
,
remove_pointer
,
T
)
...
...
include/boost/type_traits/msvc/remove_reference.hpp
View file @
5eaa391d
...
...
@@ -32,7 +32,7 @@ namespace boost {
template
<
typename
T
>
struct
remove_reference
{
typedef
typename
detail
::
remove_reference_impl_typeof
<
typedef
typename
boost
::
detail
::
remove_reference_impl_typeof
<
boost
::
is_reference
<
T
>::
value
>::
template
inner
<
T
,
remove_reference
<
T
>
>::
type
type
;
BOOST_MPL_AUX_LAMBDA_SUPPORT
(
1
,
remove_reference
,
T
)
...
...
include/boost/type_traits/msvc/remove_volatile.hpp
View file @
5eaa391d
...
...
@@ -124,7 +124,7 @@ namespace boost {
template
<
typename
T
>
struct
remove_volatile
{
typedef
detail
::
remove_volatile_impl_typeof
<
typedef
boost
::
detail
::
remove_volatile_impl_typeof
<
boost
::
is_pointer
<
T
>::
value
,
boost
::
is_array
<
T
>::
value
,
boost
::
is_const
<
T
>::
value
,
...
...
include/boost/type_traits/remove_const.hpp
View file @
5eaa391d
...
...
@@ -54,6 +54,18 @@ struct remove_const_impl
>::
type
type
;
};
#ifndef BOOST_NO_RVALUE_REFERENCES
//
// We can't filter out rvalue_references at the same level as
// references or we get ambiguities from msvc:
//
template
<
typename
T
>
struct
remove_const_impl
<
T
&&>
{
typedef
T
&&
type
;
};
#endif
}
// namespace detail
// * convert a type T to non-const type - remove_const<T>
...
...
include/boost/type_traits/remove_cv.hpp
View file @
5eaa391d
...
...
@@ -27,10 +27,32 @@
namespace
boost
{
namespace
detail
{
template
<
class
T
>
struct
rvalue_ref_filter_rem_cv
{
typedef
typename
boost
::
detail
::
cv_traits_imp
<
T
*>::
unqualified_type
type
;
};
#ifndef BOOST_NO_RVALUE_REFERENCES
//
// We can't filter out rvalue_references at the same level as
// references or we get ambiguities from msvc:
//
template
<
class
T
>
struct
rvalue_ref_filter_rem_cv
<
T
&&>
{
typedef
T
&&
type
;
};
#endif
}
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
// convert a type T to a non-cv-qualified type - remove_cv<T>
BOOST_TT_AUX_TYPE_TRAIT_DEF1
(
remove_cv
,
T
,
typename
boost
::
detail
::
cv_traits_imp
<
T
*>::
unqualified_
type
)
BOOST_TT_AUX_TYPE_TRAIT_DEF1
(
remove_cv
,
T
,
typename
boost
::
detail
::
rvalue_ref_filter_rem_cv
<
T
>::
type
)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1
(
typename
T
,
remove_cv
,
T
&
,
T
&
)
#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2
(
typename
T
,
std
::
size_t
N
,
remove_cv
,
T
const
[
N
],
T
type
[
N
])
...
...
include/boost/type_traits/remove_reference.hpp
View file @
5eaa391d
...
...
@@ -24,7 +24,27 @@ namespace boost {
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_TT_AUX_TYPE_TRAIT_DEF1
(
remove_reference
,
T
,
T
)
namespace
detail
{
//
// We can't filter out rvalue_references at the same level as
// references or we get ambiguities from msvc:
//
template
<
class
T
>
struct
remove_rvalue_ref
{
typedef
T
type
;
};
#ifndef BOOST_NO_RVALUE_REFERENCES
template
<
class
T
>
struct
remove_rvalue_ref
<
T
&&>
{
typedef
T
type
;
};
#endif
}
// namespace detail
BOOST_TT_AUX_TYPE_TRAIT_DEF1
(
remove_reference
,
T
,
typename
boost
::
detail
::
remove_rvalue_ref
<
T
>::
type
)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1
(
typename
T
,
remove_reference
,
T
&
,
T
)
#if defined(BOOST_ILLEGAL_CV_REFERENCES)
...
...
include/boost/type_traits/remove_volatile.hpp
View file @
5eaa391d
...
...
@@ -53,6 +53,17 @@ struct remove_volatile_impl
>::
type
type
;
};
//
// We can't filter out rvalue_references at the same level as
// references or we get ambiguities from msvc:
//
#ifndef BOOST_NO_RVALUE_REFERENCES
template
<
typename
T
>
struct
remove_volatile_impl
<
T
&&>
{
typedef
T
&&
type
;
};
#endif
}
// namespace detail
// * convert a type T to a non-volatile type - remove_volatile<T>
...
...
include/boost/type_traits/type_with_alignment.hpp
View file @
5eaa391d
...
...
@@ -286,43 +286,43 @@ struct __declspec(align(128)) a128 {
template
<>
class
type_with_alignment
<
8
>
{
typedef
mpl
::
if_c
<
::
boost
::
alignment_of
<
detail
::
max_align
>::
value
<
8
,
::
boost
::
alignment_of
<
boost
::
detail
::
max_align
>::
value
<
8
,
align
::
a8
,
detail
::
type_with_alignment_imp
<
8
>
>::
type
t1
;
boost
::
detail
::
type_with_alignment_imp
<
8
>
>::
type
t1
;
public
:
typedef
t1
::
type
type
;
};
template
<>
class
type_with_alignment
<
16
>
{
typedef
mpl
::
if_c
<
::
boost
::
alignment_of
<
detail
::
max_align
>::
value
<
16
,
::
boost
::
alignment_of
<
boost
::
detail
::
max_align
>::
value
<
16
,
align
::
a16
,
detail
::
type_with_alignment_imp
<
16
>
>::
type
t1
;
boost
::
detail
::
type_with_alignment_imp
<
16
>
>::
type
t1
;
public
:
typedef
t1
::
type
type
;
};
template
<>
class
type_with_alignment
<
32
>
{
typedef
mpl
::
if_c
<
::
boost
::
alignment_of
<
detail
::
max_align
>::
value
<
32
,
::
boost
::
alignment_of
<
boost
::
detail
::
max_align
>::
value
<
32
,
align
::
a32
,
detail
::
type_with_alignment_imp
<
32
>
>::
type
t1
;
boost
::
detail
::
type_with_alignment_imp
<
32
>
>::
type
t1
;
public
:
typedef
t1
::
type
type
;
};
template
<>
class
type_with_alignment
<
64
>
{
typedef
mpl
::
if_c
<
::
boost
::
alignment_of
<
detail
::
max_align
>::
value
<
64
,
::
boost
::
alignment_of
<
boost
::
detail
::
max_align
>::
value
<
64
,
align
::
a64
,
detail
::
type_with_alignment_imp
<
64
>
>::
type
t1
;
boost
::
detail
::
type_with_alignment_imp
<
64
>
>::
type
t1
;
public
:
typedef
t1
::
type
type
;
};
template
<>
class
type_with_alignment
<
128
>
{
typedef
mpl
::
if_c
<
::
boost
::
alignment_of
<
detail
::
max_align
>::
value
<
128
,
::
boost
::
alignment_of
<
boost
::
detail
::
max_align
>::
value
<
128
,
align
::
a128
,
detail
::
type_with_alignment_imp
<
128
>
>::
type
t1
;
boost
::
detail
::
type_with_alignment_imp
<
128
>
>::
type
t1
;
public
:
typedef
t1
::
type
type
;
};
...
...
include/boost/utility/compare_pointees.hpp
View file @
5eaa391d
...
...
@@ -4,7 +4,7 @@
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/lib/optional for documentation.
// See http://www.boost.org/lib
s
/optional for documentation.
//
// You are welcome to contact the author at:
// fernando_cacciola@hotmail.com
...
...
include/boost/utility/detail/in_place_factory_prefix.hpp
View file @
5eaa391d
...
...
@@ -5,7 +5,7 @@
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/lib/optional for documentation.
// See http://www.boost.org/lib
s
/optional for documentation.
//
// You are welcome to contact the author at:
// fernando_cacciola@hotmail.com
...
...
include/boost/utility/detail/in_place_factory_suffix.hpp
View file @
5eaa391d
...
...
@@ -5,7 +5,7 @@
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/lib/optional for documentation.
// See http://www.boost.org/lib
s
/optional for documentation.
//
// You are welcome to contact the author at:
// fernando_cacciola@hotmail.com
...
...
include/boost/utility/detail/result_of_iterate.hpp
View file @
5eaa391d
...
...
@@ -17,13 +17,72 @@
# define BOOST_RESULT_OF_ARGS BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)
#endif
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
template
<
typename
F
BOOST_PP_COMMA_IF
(
BOOST_PP_ITERATION
())
BOOST_PP_ENUM_PARAMS
(
BOOST_PP_ITERATION
(),
typename
T
)
>
struct
tr1_result_of
<
F
(
BOOST_RESULT_OF_ARGS
)
>
:
mpl
::
if_
<
mpl
::
or_
<
is_pointer
<
F
>
,
is_member_function_pointer
<
F
>
>
,
boost
::
detail
::
tr1_result_of_impl
<
typename
remove_cv
<
F
>::
type
,
typename
remove_cv
<
F
>::
type
(
BOOST_RESULT_OF_ARGS
),
(
boost
::
detail
::
has_result_type
<
F
>::
value
)
>
,
boost
::
detail
::
tr1_result_of_impl
<
F
,
F
(
BOOST_RESULT_OF_ARGS
),
(
boost
::
detail
::
has_result_type
<
F
>::
value
)
>
>::
type
{
};
#endif
#if !defined(BOOST_NO_DECLTYPE) && defined(BOOST_RESULT_OF_USE_DECLTYPE)
// As of N2588, C++0x result_of only supports function call
// expressions of the form f(x). This precludes support for member
// function pointers, which are invoked with expressions of the form
// o->*f(x). This implementation supports both.
template
<
typename
F
BOOST_PP_COMMA_IF
(
BOOST_PP_ITERATION
())
BOOST_PP_ENUM_PARAMS
(
BOOST_PP_ITERATION
(),
typename
T
)
>
struct
result_of
<
F
(
BOOST_PP_ENUM_PARAMS
(
BOOST_PP_ITERATION
(),
T
))
>
:
mpl
::
if_
<
mpl
::
or_
<
is_pointer
<
F
>
,
is_member_function_pointer
<
F
>
>
,
detail
::
tr1_result_of_impl
<
typename
remove_cv
<
F
>::
type
,
typename
remove_cv
<
F
>::
type
(
BOOST_PP_ENUM_PARAMS
(
BOOST_PP_ITERATION
(),
T
)),
false
>
,
detail
::
cpp0x_result_of_impl
<
F
(
BOOST_PP_ENUM_PARAMS
(
BOOST_PP_ITERATION
(),
T
))
>
>::
type
{};
namespace
detail
{
# define BOOST_RESULT_OF_STATIC_MEMBERS(z, n, _) \
static
T
##
n
t
##
n
;
\
/**/
template
<
typename
F
BOOST_PP_COMMA_IF
(
BOOST_PP_ITERATION
())
BOOST_PP_ENUM_PARAMS
(
BOOST_PP_ITERATION
(),
typename
T
)
>
class
cpp0x_result_of_impl
<
F
(
BOOST_PP_ENUM_PARAMS
(
BOOST_PP_ITERATION
(),
T
))
>
{
static
F
f
;
BOOST_PP_REPEAT
(
BOOST_PP_ITERATION
(),
BOOST_RESULT_OF_STATIC_MEMBERS
,
_
)
public
:
typedef
decltype
(
f
(
BOOST_PP_ENUM_PARAMS
(
BOOST_PP_ITERATION
(),
t
)))
type
;
};
}
// namespace detail
#else // defined(BOOST_NO_DECLTYPE)
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
template
<
typename
F
BOOST_PP_COMMA_IF
(
BOOST_PP_ITERATION
())
BOOST_PP_ENUM_PARAMS
(
BOOST_PP_ITERATION
(),
typename
T
)
>
struct
result_of
<
F
(
BOOST_RESULT_OF_ARGS
)
>
:
boost
::
detail
::
result_of_impl
<
F
,
F
(
BOOST_RESULT_OF_ARGS
),
(
boost
::
detail
::
has_result_type
<
F
>::
value
)
>
{
};
:
tr1_result_of
<
F
(
BOOST_RESULT_OF_ARGS
)
>
{
};
#endif
#endif // defined(BOOST_NO_DECLTYPE)
#undef BOOST_RESULT_OF_ARGS
#if BOOST_PP_ITERATION() >= 1
...
...
@@ -32,14 +91,14 @@ namespace detail {
template
<
typename
R
,
typename
FArgs
BOOST_PP_COMMA_IF
(
BOOST_PP_ITERATION
())
BOOST_PP_ENUM_PARAMS
(
BOOST_PP_ITERATION
(),
typename
T
)
>
struct
result_of_impl
<
R
(
*
)(
BOOST_PP_ENUM_PARAMS
(
BOOST_PP_ITERATION
(),
T
)),
FArgs
,
false
>
struct
tr1_
result_of_impl
<
R
(
*
)(
BOOST_PP_ENUM_PARAMS
(
BOOST_PP_ITERATION
(),
T
)),
FArgs
,
false
>
{
typedef
R
type
;
};
template
<
typename
R
,
typename
FArgs
BOOST_PP_COMMA_IF
(
BOOST_PP_ITERATION
())
BOOST_PP_ENUM_PARAMS
(
BOOST_PP_ITERATION
(),
typename
T
)
>
struct
result_of_impl
<
R
(
&
)(
BOOST_PP_ENUM_PARAMS
(
BOOST_PP_ITERATION
(),
T
)),
FArgs
,
false
>
struct
tr1_
result_of_impl
<
R
(
&
)(
BOOST_PP_ENUM_PARAMS
(
BOOST_PP_ITERATION
(),
T
)),
FArgs
,
false
>
{
typedef
R
type
;
};
...
...
@@ -47,7 +106,7 @@ struct result_of_impl<R (&)(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)), FArgs
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
template
<
typename
R
,
typename
FArgs
BOOST_PP_COMMA_IF
(
BOOST_PP_ITERATION
())
BOOST_PP_ENUM_PARAMS
(
BOOST_PP_ITERATION
(),
typename
T
)
>
struct
result_of_impl
<
R
(
T0
::*
)
struct
tr1_
result_of_impl
<
R
(
T0
::*
)
(
BOOST_PP_ENUM_SHIFTED_PARAMS
(
BOOST_PP_ITERATION
(),
T
)),
FArgs
,
false
>
{
...
...
@@ -56,7 +115,7 @@ struct result_of_impl<R (T0::*)
template
<
typename
R
,
typename
FArgs
BOOST_PP_COMMA_IF
(
BOOST_PP_ITERATION
())
BOOST_PP_ENUM_PARAMS
(
BOOST_PP_ITERATION
(),
typename
T
)
>
struct
result_of_impl
<
R
(
T0
::*
)
struct
tr1_
result_of_impl
<
R
(
T0
::*
)
(
BOOST_PP_ENUM_SHIFTED_PARAMS
(
BOOST_PP_ITERATION
(),
T
))
const
,
FArgs
,
false
>
...
...
@@ -66,7 +125,7 @@ struct result_of_impl<R (T0::*)
template
<
typename
R
,
typename
FArgs
BOOST_PP_COMMA_IF
(
BOOST_PP_ITERATION
())
BOOST_PP_ENUM_PARAMS
(
BOOST_PP_ITERATION
(),
typename
T
)
>
struct
result_of_impl
<
R
(
T0
::*
)
struct
tr1_
result_of_impl
<
R
(
T0
::*
)
(
BOOST_PP_ENUM_SHIFTED_PARAMS
(
BOOST_PP_ITERATION
(),
T
))
volatile
,
FArgs
,
false
>
...
...
@@ -76,7 +135,7 @@ struct result_of_impl<R (T0::*)
template
<
typename
R
,
typename
FArgs
BOOST_PP_COMMA_IF
(
BOOST_PP_ITERATION
())
BOOST_PP_ENUM_PARAMS
(
BOOST_PP_ITERATION
(),
typename
T
)
>
struct
result_of_impl
<
R
(
T0
::*
)
struct
tr1_
result_of_impl
<
R
(
T0
::*
)
(
BOOST_PP_ENUM_SHIFTED_PARAMS
(
BOOST_PP_ITERATION
(),
T
))
const
volatile
,
FArgs
,
false
>
...
...
include/boost/utility/in_place_factory.hpp
View file @
5eaa391d
...
...
@@ -5,7 +5,7 @@
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/lib/optional for documentation.
// See http://www.boost.org/lib
s
/optional for documentation.
//
// You are welcome to contact the author at:
// fernando_cacciola@hotmail.com
...
...
include/boost/utility/result_of.hpp
View file @
5eaa391d
...
...
@@ -10,13 +10,18 @@
#define BOOST_RESULT_OF_HPP
#include <boost/config.hpp>
#include <boost/type_traits/ice.hpp>
#include <boost/type.hpp>
#include <boost/preprocessor.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>
#include <boost/preprocessor/punctuation/comma_if.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/mpl/has_xxx.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/or.hpp>
#include <boost/type_traits/is_pointer.hpp>
#include <boost/type_traits/is_member_function_pointer.hpp>
#include <boost/type_traits/remove_cv.hpp>
#ifndef BOOST_RESULT_OF_NUM_ARGS
# define BOOST_RESULT_OF_NUM_ARGS 10
...
...
@@ -25,13 +30,15 @@
namespace
boost
{
template
<
typename
F
>
struct
result_of
;
template
<
typename
F
>
struct
tr1_result_of
;
// a TR1-style implementation of result_of
#if !defined(BOOST_NO_SFINAE) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
namespace
detail
{
BOOST_MPL_HAS_XXX_TRAIT_DEF
(
result_type
)
template
<
typename
F
,
typename
FArgs
,
bool
HasResultType
>
struct
result_of_impl
;
template
<
typename
F
,
typename
FArgs
,
bool
HasResultType
>
struct
tr1_result_of_impl
;
template
<
typename
F
>
struct
cpp0x_result_of_impl
;
template
<
typename
F
>
struct
result_of_void_impl
...
...
@@ -51,8 +58,13 @@ struct result_of_void_impl<R (&)(void)>
typedef
R
type
;
};
// Determine the return type of a function pointer or pointer to member.
template
<
typename
F
,
typename
FArgs
>
struct
result_of_impl
<
F
,
FArgs
,
true
>
struct
result_of_pointer
:
tr1_result_of_impl
<
typename
remove_cv
<
F
>::
type
,
FArgs
,
false
>
{
};
template
<
typename
F
,
typename
FArgs
>
struct
tr1_result_of_impl
<
F
,
FArgs
,
true
>
{
typedef
typename
F
::
result_type
type
;
};
...
...
@@ -68,7 +80,7 @@ struct result_of_nested_result : F::template result<FArgs>
{};
template
<
typename
F
,
typename
FArgs
>
struct
result_of_impl
<
F
,
FArgs
,
false
>
struct
tr1_
result_of_impl
<
F
,
FArgs
,
false
>
:
mpl
::
if_
<
is_function_with_no_args
<
FArgs
>
,
result_of_void_impl
<
F
>
,
result_of_nested_result
<
F
,
FArgs
>
>::
type
...
...
include/boost/utility/typed_in_place_factory.hpp
View file @
5eaa391d
...
...
@@ -5,7 +5,7 @@
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/lib/optional for documentation.
// See http://www.boost.org/lib
s
/optional for documentation.
//
// You are welcome to contact the author at:
// fernando_cacciola@hotmail.com
...
...
include/boost/utility/value_init.hpp
View file @
5eaa391d
...
...
@@ -9,6 +9,8 @@
// 23 May 2008 (Fixed operator= const issue, added initialized_value) Niels Dekker, Fernando Cacciola
// 21 Ago 2008 (Added swap) Niels Dekker, Fernando Cacciola
// 20 Feb 2009 (Fixed logical const-ness issues) Niels Dekker, Fernando Cacciola
// 03 Apr 2010 (Added initialized<T>, suggested by Jeffrey Hellrung, fixing #3472) Niels Dekker
// 30 May 2010 (Made memset call conditional, fixing #3869) Niels Dekker
//
#ifndef BOOST_UTILITY_VALUE_INIT_21AGO2002_HPP
#define BOOST_UTILITY_VALUE_INIT_21AGO2002_HPP
...
...
@@ -20,6 +22,7 @@
// contains. More details on these issues are at libs/utility/value_init.htm
#include <boost/aligned_storage.hpp>
#include <boost/config.hpp> // For BOOST_NO_COMPLETE_VALUE_INITIALIZATION.
#include <boost/detail/workaround.hpp>
#include <boost/static_assert.hpp>
#include <boost/type_traits/cv_traits.hpp>
...
...
@@ -28,10 +31,39 @@
#include <cstring>
#include <new>
#ifdef BOOST_MSVC
#pragma warning(push)
#if _MSC_VER >= 1310
// It is safe to ignore the following warning from MSVC 7.1 or higher:
// "warning C4351: new behavior: elements of array will be default initialized"
#pragma warning(disable: 4351)
// It is safe to ignore the following MSVC warning, which may pop up when T is
// a const type: "warning C4512: assignment operator could not be generated".
#pragma warning(disable: 4512)
#endif
#endif
#ifdef BOOST_NO_COMPLETE_VALUE_INITIALIZATION
// Implementation detail: The macro BOOST_DETAIL_VALUE_INIT_WORKAROUND_SUGGESTED
// suggests that a workaround should be applied, because of compiler issues
// regarding value-initialization.
#define BOOST_DETAIL_VALUE_INIT_WORKAROUND_SUGGESTED
#endif
// Implementation detail: The macro BOOST_DETAIL_VALUE_INIT_WORKAROUND
// switches the value-initialization workaround either on or off.
#ifndef BOOST_DETAIL_VALUE_INIT_WORKAROUND
#ifdef BOOST_DETAIL_VALUE_INIT_WORKAROUND_SUGGESTED
#define BOOST_DETAIL_VALUE_INIT_WORKAROUND 1
#else
#define BOOST_DETAIL_VALUE_INIT_WORKAROUND 0
#endif
#endif
namespace
boost
{
template
<
class
T
>
class
value_
initialized
class
initialized
{
private
:
struct
wrapper
...
...
@@ -40,6 +72,18 @@ class value_initialized
typename
#endif
remove_const
<
T
>::
type
data
;
wrapper
()
:
data
()
{
}
wrapper
(
T
const
&
arg
)
:
data
(
arg
)
{
}
};
mutable
...
...
@@ -55,30 +99,25 @@ class value_initialized
public
:
value_
initialized
()
initialized
()
{
#if BOOST_DETAIL_VALUE_INIT_WORKAROUND
std
::
memset
(
&
x
,
0
,
sizeof
(
x
));
#ifdef BOOST_MSVC
#pragma warning(push)
#if _MSC_VER >= 1310
// When using MSVC 7.1 or higher, the following placement new expression may trigger warning C4345:
// "behavior change: an object of POD type constructed with an initializer of the form ()
// will be default-initialized". It is safe to ignore this warning when using value_initialized.
#pragma warning(disable: 4345)
#endif
#endif
new
(
wrapper_address
())
wrapper
();
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
}
value_initialized
(
value_
initialized
const
&
arg
)
initialized
(
initialized
const
&
arg
)
{
new
(
wrapper_address
())
wrapper
(
static_cast
<
wrapper
const
&>
(
*
(
arg
.
wrapper_address
())));
}
value_initialized
&
operator
=
(
value_initialized
const
&
arg
)
explicit
initialized
(
T
const
&
arg
)
{
new
(
wrapper_address
())
wrapper
(
arg
);
}
initialized
&
operator
=
(
initialized
const
&
arg
)
{
// Assignment is only allowed when T is non-const.
BOOST_STATIC_ASSERT
(
!
is_const
<
T
>::
value
);
...
...
@@ -86,7 +125,7 @@ class value_initialized
return
*
this
;
}
~
value_
initialized
()
~
initialized
()
{
wrapper_address
()
->
wrapper
::~
wrapper
();
}
...
...
@@ -101,17 +140,81 @@ class value_initialized
return
wrapper_address
()
->
data
;
}
void
swap
(
value_
initialized
&
arg
)
void
swap
(
initialized
&
arg
)
{
::
boost
::
swap
(
this
->
data
(),
arg
.
data
()
);
}
operator
T
const
&
()
const
{
return
this
->
data
();
}
operator
T
const
&
()
const
{
return
wrapper_address
()
->
data
;
}
operator
T
&
()
{
return
this
->
data
();
}
operator
T
&
()
{
return
wrapper_address
()
->
data
;
}
}
;
template
<
class
T
>
T
const
&
get
(
initialized
<
T
>
const
&
x
)
{
return
x
.
data
()
;
}
template
<
class
T
>
T
&
get
(
initialized
<
T
>&
x
)
{
return
x
.
data
()
;
}
template
<
class
T
>
void
swap
(
initialized
<
T
>
&
lhs
,
initialized
<
T
>
&
rhs
)
{
lhs
.
swap
(
rhs
)
;
}
template
<
class
T
>
class
value_initialized
{
private
:
// initialized<T> does value-initialization by default.
initialized
<
T
>
m_data
;
public
:
value_initialized
()
:
m_data
()
{
}
T
const
&
data
()
const
{
return
m_data
.
data
();
}
T
&
data
()
{
return
m_data
.
data
();
}
void
swap
(
value_initialized
&
arg
)
{
m_data
.
swap
(
arg
.
m_data
);
}
operator
T
const
&
()
const
{
return
m_data
;
}
operator
T
&
()
{
return
m_data
;
}
}
;
template
<
class
T
>
...
...
@@ -119,6 +222,7 @@ T const& get ( value_initialized<T> const& x )
{
return
x
.
data
()
;
}
template
<
class
T
>
T
&
get
(
value_initialized
<
T
>&
x
)
{
...
...
@@ -138,7 +242,7 @@ class initialized_value_t
template
<
class
T
>
operator
T
()
const
{
return
get
(
value_initialized
<
T
>
()
);
return
initialized
<
T
>
().
data
(
);
}
};
...
...
@@ -147,5 +251,8 @@ initialized_value_t const initialized_value = {} ;
}
// namespace boost
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment