mirror of
https://github.com/boostorg/range.git
synced 2025-07-29 20:37:25 +02:00
Merge branch 'develop'
This commit is contained in:
20
.travis.yml
20
.travis.yml
@ -28,6 +28,26 @@ matrix:
|
||||
compiler: g++
|
||||
env: TOOLSET=gcc CXXSTD=03,11
|
||||
|
||||
- os: linux
|
||||
compiler: g++-4.4
|
||||
env: TOOLSET=gcc-4.4 CXXSTD=98,0x
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-4.4
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: g++-4.6
|
||||
env: TOOLSET=gcc-4.6 CXXSTD=03,0x
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-4.6
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: g++-5
|
||||
env: TOOLSET=gcc-5 CXXSTD=03,11
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <boost/range/adaptor/transformed.hpp>
|
||||
#include <boost/range/reference.hpp>
|
||||
#include <boost/range/concepts.hpp>
|
||||
|
||||
#include <boost/type_traits/declval.hpp>
|
||||
#include <utility>
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_DECLTYPE)
|
||||
@ -32,7 +32,7 @@ namespace boost
|
||||
typedef BOOST_DEDUCED_TYPENAME
|
||||
range_reference<SinglePassRange>::type argument_type;
|
||||
|
||||
using result_type = decltype(std::declval<argument_type>().get() );
|
||||
typedef decltype( boost::declval<argument_type>().get() ) result_type;
|
||||
|
||||
result_type operator()( argument_type &&r ) const
|
||||
{
|
||||
@ -46,11 +46,11 @@ namespace boost
|
||||
: public transformed_range<unwrap_ref<SinglePassRange>,
|
||||
SinglePassRange>
|
||||
{
|
||||
using base = transformed_range<unwrap_ref<SinglePassRange>,
|
||||
SinglePassRange>;
|
||||
typedef transformed_range<unwrap_ref<SinglePassRange>,
|
||||
SinglePassRange> base;
|
||||
public:
|
||||
using transform_fn_type = unwrap_ref<SinglePassRange>;
|
||||
using source_range_type = SinglePassRange;
|
||||
typedef unwrap_ref<SinglePassRange> transform_fn_type;
|
||||
typedef SinglePassRange source_range_type;
|
||||
|
||||
unwrap_ref_range(transform_fn_type fn, source_range_type &rng)
|
||||
: base(fn, rng)
|
||||
|
@ -32,12 +32,12 @@ struct wrap_rand
|
||||
{
|
||||
typedef unsigned int result_type;
|
||||
|
||||
static result_type (min)()
|
||||
static BOOST_CONSTEXPR result_type (min)()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static result_type (max)()
|
||||
static BOOST_CONSTEXPR result_type (max)()
|
||||
{
|
||||
return RAND_MAX;
|
||||
}
|
||||
@ -64,12 +64,12 @@ struct wrap_generator
|
||||
|
||||
wrap_generator(Generator& gen) : g(gen) {}
|
||||
|
||||
static result_type (min)()
|
||||
static BOOST_CONSTEXPR result_type (min)()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static result_type (max)()
|
||||
static BOOST_CONSTEXPR result_type (max)()
|
||||
{
|
||||
return max_arg - 1;
|
||||
}
|
||||
|
@ -22,6 +22,8 @@
|
||||
#else
|
||||
|
||||
#include <boost/range/iterator.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/config/workaround.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
@ -94,7 +96,10 @@ namespace range_adl_barrier
|
||||
{
|
||||
|
||||
template< class T >
|
||||
BOOST_CONSTEXPR inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type begin( T& r )
|
||||
#if !BOOST_WORKAROUND(BOOST_GCC, < 40700)
|
||||
BOOST_CONSTEXPR
|
||||
#endif
|
||||
inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type begin( T& r )
|
||||
{
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
using namespace range_detail;
|
||||
@ -103,7 +108,10 @@ BOOST_CONSTEXPR inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type begin( T&
|
||||
}
|
||||
|
||||
template< class T >
|
||||
BOOST_CONSTEXPR inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type begin( const T& r )
|
||||
#if !BOOST_WORKAROUND(BOOST_GCC, < 40700)
|
||||
BOOST_CONSTEXPR
|
||||
#endif
|
||||
inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type begin( const T& r )
|
||||
{
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
using namespace range_detail;
|
||||
|
@ -23,13 +23,18 @@
|
||||
namespace boost
|
||||
{
|
||||
|
||||
template< class T >
|
||||
inline BOOST_CXX14_CONSTEXPR BOOST_DEDUCED_TYPENAME range_difference<T>::type
|
||||
distance( const T& r )
|
||||
namespace range_distance_adl_barrier
|
||||
{
|
||||
return boost::distance( boost::begin( r ), boost::end( r ) );
|
||||
template< class T >
|
||||
inline BOOST_CXX14_CONSTEXPR BOOST_DEDUCED_TYPENAME range_difference<T>::type
|
||||
distance( const T& r )
|
||||
{
|
||||
return boost::iterators::distance( boost::begin( r ), boost::end( r ) );
|
||||
}
|
||||
}
|
||||
|
||||
using namespace range_distance_adl_barrier;
|
||||
|
||||
} // namespace 'boost'
|
||||
|
||||
#endif
|
||||
|
@ -24,6 +24,8 @@
|
||||
#include <boost/range/detail/implementation_help.hpp>
|
||||
#include <boost/range/iterator.hpp>
|
||||
#include <boost/range/const_iterator.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/config/workaround.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
@ -88,7 +90,10 @@ namespace range_adl_barrier
|
||||
{
|
||||
|
||||
template< class T >
|
||||
BOOST_CONSTEXPR inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type end( T& r )
|
||||
#if !BOOST_WORKAROUND(BOOST_GCC, < 40700)
|
||||
BOOST_CONSTEXPR
|
||||
#endif
|
||||
inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type end( T& r )
|
||||
{
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
using namespace range_detail;
|
||||
@ -97,7 +102,10 @@ BOOST_CONSTEXPR inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type end( T& r
|
||||
}
|
||||
|
||||
template< class T >
|
||||
BOOST_CONSTEXPR inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type end( const T& r )
|
||||
#if !BOOST_WORKAROUND(BOOST_GCC, < 40700)
|
||||
BOOST_CONSTEXPR
|
||||
#endif
|
||||
inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type end( const T& r )
|
||||
{
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
using namespace range_detail;
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && !defined(BOOST_NO_CXX11_RANGE_BASED_FOR)
|
||||
#if !defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && !defined(BOOST_NO_CXX11_RANGE_BASED_FOR) && !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
Reference in New Issue
Block a user