Convert tabs to spaces.

This commit is contained in:
Andrey Semashev
2017-07-29 17:25:42 +03:00
committed by Andrzej Krzemienski
parent 7e1beb473c
commit e95f9fc254
3 changed files with 33 additions and 33 deletions

View File

@ -746,12 +746,12 @@ class optional : public optional_detail::optional_base<T>
optional ( optional const& rhs ) : base( static_cast<base const&>(rhs) ) {} optional ( optional const& rhs ) : base( static_cast<base const&>(rhs) ) {}
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
// Creates a deep move of another optional<T> // Creates a deep move of another optional<T>
// Can throw if T::T(T&&) does // Can throw if T::T(T&&) does
optional ( optional && rhs ) optional ( optional && rhs )
BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value) BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value)
: base( boost::move(rhs) ) : base( boost::move(rhs) )
{} {}
#endif #endif
// No-throw (assuming T::~T() doesn't) // No-throw (assuming T::~T() doesn't)
@ -819,7 +819,7 @@ class optional : public optional_detail::optional_base<T>
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
// Assigns from another optional<T> (deep-moves the rhs value) // Assigns from another optional<T> (deep-moves the rhs value)
optional& operator= ( optional && rhs ) optional& operator= ( optional && rhs )
BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value) BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
{ {
this->assign( static_cast<base &&>(rhs) ) ; this->assign( static_cast<base &&>(rhs) ) ;
return *this ; return *this ;
@ -892,7 +892,7 @@ class optional : public optional_detail::optional_base<T>
#endif #endif
void swap( optional & arg ) void swap( optional & arg )
BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value) BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
{ {
// allow for Koenig lookup // allow for Koenig lookup
boost::swap(*this, arg); boost::swap(*this, arg);

View File

@ -44,24 +44,24 @@ class aligned_storage
#endif #endif
#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS) #if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS)
// This workaround is supposed to silence GCC warnings about broken strict aliasing rules // This workaround is supposed to silence GCC warnings about broken strict aliasing rules
T const* ptr_ref() const T const* ptr_ref() const
{ {
union { void const* ap_pvoid; T const* as_ptype; } caster = { address() }; union { void const* ap_pvoid; T const* as_ptype; } caster = { address() };
return caster.as_ptype; return caster.as_ptype;
} }
T * ptr_ref() T * ptr_ref()
{ {
union { void* ap_pvoid; T* as_ptype; } caster = { address() }; union { void* ap_pvoid; T* as_ptype; } caster = { address() };
return caster.as_ptype; return caster.as_ptype;
} }
#else #else
T const* ptr_ref() const { return static_cast<T const*>(address()); } T const* ptr_ref() const { return static_cast<T const*>(address()); }
T * ptr_ref() { return static_cast<T *> (address()); } T * ptr_ref() { return static_cast<T *> (address()); }
#endif #endif
T const& ref() const { return *ptr_ref(); } T const& ref() const { return *ptr_ref(); }
T & ref() { return *ptr_ref(); } T & ref() { return *ptr_ref(); }
} ; } ;

View File

@ -67,7 +67,7 @@ struct in_place_init_t
}; };
const in_place_init_t in_place_init ((in_place_init_t::init_tag())); const in_place_init_t in_place_init ((in_place_init_t::init_tag()));
// a tag for conditional in-place initialization of contained value // a tag for conditional in-place initialization of contained value
struct in_place_init_if_t struct in_place_init_if_t
{ {
struct init_tag{}; struct init_tag{};
@ -896,12 +896,12 @@ class optional : public optional_detail::optional_base<T>
optional ( optional const& rhs ) : base( static_cast<base const&>(rhs) ) {} optional ( optional const& rhs ) : base( static_cast<base const&>(rhs) ) {}
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
// Creates a deep move of another optional<T> // Creates a deep move of another optional<T>
// Can throw if T::T(T&&) does // Can throw if T::T(T&&) does
optional ( optional && rhs ) optional ( optional && rhs )
BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value) BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value)
: base( boost::move(rhs) ) : base( boost::move(rhs) )
{} {}
#endif #endif
@ -910,7 +910,7 @@ class optional : public optional_detail::optional_base<T>
~optional() {} ~optional() {}
#endif #endif
#if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION) #if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION)
// Assigns from an expression. See corresponding constructor. // Assigns from an expression. See corresponding constructor.
// Basic Guarantee: If the resolved T ctor throws, this is left UNINITIALIZED // Basic Guarantee: If the resolved T ctor throws, this is left UNINITIALIZED
@ -968,7 +968,7 @@ class optional : public optional_detail::optional_base<T>
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
// Assigns from another optional<T> (deep-moves the rhs value) // Assigns from another optional<T> (deep-moves the rhs value)
optional& operator= ( optional && rhs ) optional& operator= ( optional && rhs )
BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value) BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
{ {
this->assign( static_cast<base &&>(rhs) ) ; this->assign( static_cast<base &&>(rhs) ) ;
return *this ; return *this ;
@ -1112,7 +1112,7 @@ class optional : public optional_detail::optional_base<T>
#endif #endif
void swap( optional & arg ) void swap( optional & arg )
BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value) BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
{ {
// allow for Koenig lookup // allow for Koenig lookup
boost::swap(*this, arg); boost::swap(*this, arg);