Merge branch 'develop'

This commit is contained in:
Peter Dimov
2014-07-15 13:06:44 +03:00
2 changed files with 17 additions and 4 deletions

View File

@@ -108,14 +108,14 @@ namespace boost {
typedef typename array_base<T>::type type;
as_allocator(const A& allocator, type** result)
: A(allocator),
as_allocator(const A& allocator_, type** result)
: A(allocator_),
data(result) {
}
as_allocator(const A& allocator, std::size_t size,
as_allocator(const A& allocator_, std::size_t size,
type** result)
: A(allocator),
: A(allocator_),
data(size, result) {
}

View File

@@ -25,6 +25,17 @@ namespace detail
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
#if defined( __GNUC__ ) && __GNUC__ * 100 + __GNUC_MINOR__ <= 404
// GCC 4.4 supports an outdated version of rvalue references and creates a copy of the forwarded object.
// This results in warnings 'returning reference to temporary'. Therefore we use a special version similar to std::forward.
template< class T > T&& sp_forward( T && t ) BOOST_NOEXCEPT
{
return t;
}
#else
template< class T > T&& sp_forward( T & t ) BOOST_NOEXCEPT
{
return static_cast< T&& >( t );
@@ -32,6 +43,8 @@ template< class T > T&& sp_forward( T & t ) BOOST_NOEXCEPT
#endif
#endif
} // namespace detail
} // namespace boost