mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
update to boost 1.34
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18510 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
af6a9552ed
commit
19fa02ff12
@ -58,7 +58,7 @@ public:
|
|||||||
indirect_streambuf();
|
indirect_streambuf();
|
||||||
|
|
||||||
void open(const T& t BOOST_IOSTREAMS_PUSH_PARAMS());
|
void open(const T& t BOOST_IOSTREAMS_PUSH_PARAMS());
|
||||||
bool is_open();
|
bool is_open() const;
|
||||||
void close();
|
void close();
|
||||||
bool auto_close() const;
|
bool auto_close() const;
|
||||||
void set_auto_close(bool close);
|
void set_auto_close(bool close);
|
||||||
@ -189,7 +189,7 @@ void indirect_streambuf<T, Tr, Alloc, Mode>::open
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, typename Tr, typename Alloc, typename Mode>
|
template<typename T, typename Tr, typename Alloc, typename Mode>
|
||||||
inline bool indirect_streambuf<T, Tr, Alloc, Mode>::is_open()
|
inline bool indirect_streambuf<T, Tr, Alloc, Mode>::is_open() const
|
||||||
{ return (flags_ & f_open) != 0; }
|
{ return (flags_ & f_open) != 0; }
|
||||||
|
|
||||||
template<typename T, typename Tr, typename Alloc, typename Mode>
|
template<typename T, typename Tr, typename Alloc, typename Mode>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#ifndef BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED
|
#ifndef BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED
|
||||||
#define BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED
|
#define BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED
|
||||||
|
|
||||||
// Copyright Aleksey Gurtovoy 2001-2004
|
// Copyright Aleksey Gurtovoy 2001-2007
|
||||||
//
|
//
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
@ -11,8 +11,8 @@
|
|||||||
// See http://www.boost.org/libs/mpl for documentation.
|
// See http://www.boost.org/libs/mpl for documentation.
|
||||||
|
|
||||||
// $Source: /cvsroot/boost/boost/boost/mpl/aux_/lambda_spec.hpp,v $
|
// $Source: /cvsroot/boost/boost/boost/mpl/aux_/lambda_spec.hpp,v $
|
||||||
// $Date: 2004/09/02 15:40:43 $
|
// $Date: 2007/01/29 07:28:45 $
|
||||||
// $Revision: 1.8 $
|
// $Revision: 1.8.14.1 $
|
||||||
|
|
||||||
#include <boost/mpl/void.hpp>
|
#include <boost/mpl/void.hpp>
|
||||||
#include <boost/mpl/lambda_fwd.hpp>
|
#include <boost/mpl/lambda_fwd.hpp>
|
||||||
@ -35,7 +35,8 @@ struct lambda< \
|
|||||||
> \
|
> \
|
||||||
{ \
|
{ \
|
||||||
typedef false_ is_le; \
|
typedef false_ is_le; \
|
||||||
typedef name< BOOST_MPL_PP_PARAMS(i, T) > type; \
|
typedef name< BOOST_MPL_PP_PARAMS(i, T) > result_; \
|
||||||
|
typedef result_ type; \
|
||||||
}; \
|
}; \
|
||||||
/**/
|
/**/
|
||||||
|
|
||||||
|
43
boost/boost/none.hpp
Executable file
43
boost/boost/none.hpp
Executable file
@ -0,0 +1,43 @@
|
|||||||
|
// Copyright (C) 2003, Fernando Luis Cacciola Carballal.
|
||||||
|
// Copyright (C) 2007, Anthony Williams
|
||||||
|
// Copyright (C) 2007, Steven Watanabe, Richard Smith
|
||||||
|
//
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
//
|
||||||
|
// See http://www.boost.org/lib/optional/ for documentation.
|
||||||
|
//
|
||||||
|
// You are welcome to contact the author at:
|
||||||
|
// fernando.cacciola@gmail.com
|
||||||
|
//
|
||||||
|
#ifndef BOOST_NONE_17SEP2003_HPP
|
||||||
|
#define BOOST_NONE_17SEP2003_HPP
|
||||||
|
|
||||||
|
namespace boost
|
||||||
|
{
|
||||||
|
namespace detail
|
||||||
|
{
|
||||||
|
class none_helper;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void none(detail::none_helper);
|
||||||
|
|
||||||
|
namespace detail
|
||||||
|
{
|
||||||
|
class none_helper
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
|
none_helper( none_helper const& ) {}
|
||||||
|
|
||||||
|
friend void boost::none(none_helper);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef void (*none_t)(detail::none_helper);
|
||||||
|
|
||||||
|
inline void none(detail::none_helper) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -1,24 +0,0 @@
|
|||||||
// Copyright (C) 2003, Fernando Luis Cacciola Carballal.
|
|
||||||
//
|
|
||||||
// Use, modification, and distribution is subject to the Boost Software
|
|
||||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
|
||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
|
||||||
//
|
|
||||||
// See http://www.boost.org/lib/optional for documentation.
|
|
||||||
//
|
|
||||||
// You are welcome to contact the author at:
|
|
||||||
// fernando_cacciola@hotmail.com
|
|
||||||
//
|
|
||||||
#ifndef BOOST_NONE_T_17SEP2003_HPP
|
|
||||||
#define BOOST_NONE_T_17SEP2003_HPP
|
|
||||||
|
|
||||||
namespace boost {
|
|
||||||
|
|
||||||
namespace detail { struct none_helper{}; }
|
|
||||||
|
|
||||||
typedef int detail::none_helper::*none_t ;
|
|
||||||
|
|
||||||
} // namespace boost
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
|||||||
#include "boost/mpl/bool.hpp"
|
#include "boost/mpl/bool.hpp"
|
||||||
#include "boost/mpl/not.hpp"
|
#include "boost/mpl/not.hpp"
|
||||||
#include "boost/detail/reference_content.hpp"
|
#include "boost/detail/reference_content.hpp"
|
||||||
#include "boost/none_t.hpp"
|
#include "boost/none.hpp"
|
||||||
#include "boost/utility/compare_pointees.hpp"
|
#include "boost/utility/compare_pointees.hpp"
|
||||||
|
|
||||||
#include "boost/optional/optional_fwd.hpp"
|
#include "boost/optional/optional_fwd.hpp"
|
||||||
@ -76,6 +76,19 @@
|
|||||||
#define BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
|
#define BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Daniel Wallin discovered that bind/apply.hpp badly interacts with the apply<>
|
||||||
|
// member template of a factory as used in the optional<> implementation.
|
||||||
|
// He proposed this simple fix which is to move the call to apply<> outside
|
||||||
|
// namespace boost.
|
||||||
|
namespace boost_optional_detail
|
||||||
|
{
|
||||||
|
template <class T, class Factory>
|
||||||
|
void construct(Factory const& factory, void* address)
|
||||||
|
{
|
||||||
|
factory.BOOST_NESTED_TEMPLATE apply<T>(address);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
|
|
||||||
@ -173,7 +186,7 @@ class optional_base : public optional_tag
|
|||||||
|
|
||||||
// Creates an optional<T> uninitialized.
|
// Creates an optional<T> uninitialized.
|
||||||
// No-throw
|
// No-throw
|
||||||
optional_base ( none_t const& )
|
optional_base ( none_t )
|
||||||
:
|
:
|
||||||
m_initialized(false) {}
|
m_initialized(false) {}
|
||||||
|
|
||||||
@ -185,6 +198,16 @@ class optional_base : public optional_tag
|
|||||||
{
|
{
|
||||||
construct(val);
|
construct(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialzed optional<T>.
|
||||||
|
// Can throw if T::T(T const&) does
|
||||||
|
optional_base ( bool cond, argument_type val )
|
||||||
|
:
|
||||||
|
m_initialized(false)
|
||||||
|
{
|
||||||
|
if ( cond )
|
||||||
|
construct(val);
|
||||||
|
}
|
||||||
|
|
||||||
// Creates a deep copy of another optional<T>
|
// Creates a deep copy of another optional<T>
|
||||||
// Can throw if T::T(T const&) does
|
// Can throw if T::T(T const&) does
|
||||||
@ -256,7 +279,7 @@ class optional_base : public optional_tag
|
|||||||
|
|
||||||
// Assigns from "none", destroying the current value, if any, leaving this UNINITIALIZED
|
// Assigns from "none", destroying the current value, if any, leaving this UNINITIALIZED
|
||||||
// No-throw (assuming T::~T() doesn't)
|
// No-throw (assuming T::~T() doesn't)
|
||||||
void assign ( none_t const& ) { destroy(); }
|
void assign ( none_t ) { destroy(); }
|
||||||
|
|
||||||
#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
|
#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
|
||||||
template<class Expr>
|
template<class Expr>
|
||||||
@ -299,7 +322,7 @@ class optional_base : public optional_tag
|
|||||||
void construct ( Expr const& factory, in_place_factory_base const* )
|
void construct ( Expr const& factory, in_place_factory_base const* )
|
||||||
{
|
{
|
||||||
BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;
|
BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;
|
||||||
factory.BOOST_NESTED_TEMPLATE apply<value_type>(m_storage.address()) ;
|
boost_optional_detail::construct<value_type>(factory, m_storage.address());
|
||||||
m_initialized = true ;
|
m_initialized = true ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -418,6 +441,8 @@ class optional_base : public optional_tag
|
|||||||
// the following olverloads are used to filter out the case and guarantee an error in case of T being a reference.
|
// the following olverloads are used to filter out the case and guarantee an error in case of T being a reference.
|
||||||
pointer_const_type cast_ptr( internal_type const* p, is_not_reference_tag ) const { return p ; }
|
pointer_const_type cast_ptr( internal_type const* p, is_not_reference_tag ) const { return p ; }
|
||||||
pointer_type cast_ptr( internal_type * p, is_not_reference_tag ) { return p ; }
|
pointer_type cast_ptr( internal_type * p, is_not_reference_tag ) { return p ; }
|
||||||
|
pointer_const_type cast_ptr( internal_type const* p, is_reference_tag ) const { return &p->get() ; }
|
||||||
|
pointer_type cast_ptr( internal_type * p, is_reference_tag ) { return &p->get() ; }
|
||||||
|
|
||||||
bool m_initialized ;
|
bool m_initialized ;
|
||||||
storage_type m_storage ;
|
storage_type m_storage ;
|
||||||
@ -449,12 +474,15 @@ class optional : public optional_detail::optional_base<T>
|
|||||||
|
|
||||||
// Creates an optional<T> uninitialized.
|
// Creates an optional<T> uninitialized.
|
||||||
// No-throw
|
// No-throw
|
||||||
optional( none_t const& none_ ) : base(none_) {}
|
optional( none_t none_ ) : base(none_) {}
|
||||||
|
|
||||||
// Creates an optional<T> initialized with 'val'.
|
// Creates an optional<T> initialized with 'val'.
|
||||||
// Can throw if T::T(T const&) does
|
// Can throw if T::T(T const&) does
|
||||||
optional ( argument_type val ) : base(val) {}
|
optional ( argument_type val ) : base(val) {}
|
||||||
|
|
||||||
|
// Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialized optional.
|
||||||
|
// Can throw if T::T(T const&) does
|
||||||
|
optional ( bool cond, argument_type val ) : base(cond,val) {}
|
||||||
|
|
||||||
#ifndef BOOST_OPTIONAL_NO_CONVERTING_COPY_CTOR
|
#ifndef BOOST_OPTIONAL_NO_CONVERTING_COPY_CTOR
|
||||||
// NOTE: MSVC needs templated versions first
|
// NOTE: MSVC needs templated versions first
|
||||||
@ -537,7 +565,7 @@ class optional : public optional_detail::optional_base<T>
|
|||||||
// Assigns from a "none"
|
// Assigns from a "none"
|
||||||
// Which destroys the current value, if any, leaving this UNINITIALIZED
|
// Which destroys the current value, if any, leaving this UNINITIALIZED
|
||||||
// No-throw (assuming T::~T() doesn't)
|
// No-throw (assuming T::~T() doesn't)
|
||||||
optional& operator= ( none_t const& none_ )
|
optional& operator= ( none_t none_ )
|
||||||
{
|
{
|
||||||
this->assign( none_ ) ;
|
this->assign( none_ ) ;
|
||||||
return *this ;
|
return *this ;
|
||||||
@ -549,6 +577,10 @@ class optional : public optional_detail::optional_base<T>
|
|||||||
reference_const_type get() const { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); }
|
reference_const_type get() const { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); }
|
||||||
reference_type get() { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); }
|
reference_type get() { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); }
|
||||||
|
|
||||||
|
// Returns a copy of the value if this is initialized, 'v' otherwise
|
||||||
|
reference_const_type get_value_or ( reference_const_type v ) const { return this->is_initialized() ? get() : v ; }
|
||||||
|
reference_type get_value_or ( reference_type v ) { return this->is_initialized() ? get() : v ; }
|
||||||
|
|
||||||
// Returns a pointer to the value if this is initialized, otherwise,
|
// Returns a pointer to the value if this is initialized, otherwise,
|
||||||
// the behaviour is UNDEFINED
|
// the behaviour is UNDEFINED
|
||||||
// No-throw
|
// No-throw
|
||||||
@ -570,6 +602,22 @@ class optional : public optional_detail::optional_base<T>
|
|||||||
bool operator!() const { return !this->is_initialized() ; }
|
bool operator!() const { return !this->is_initialized() ; }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
// Returns optional<T>(v)
|
||||||
|
template<class T>
|
||||||
|
inline
|
||||||
|
optional<T> make_optional ( T const& v )
|
||||||
|
{
|
||||||
|
return optional<T>(v);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns optional<T>(cond,v)
|
||||||
|
template<class T>
|
||||||
|
inline
|
||||||
|
optional<T> make_optional ( bool cond, T const& v )
|
||||||
|
{
|
||||||
|
return optional<T>(cond,v);
|
||||||
|
}
|
||||||
|
|
||||||
// Returns a reference to the value if this is initialized, otherwise, the behaviour is UNDEFINED.
|
// Returns a reference to the value if this is initialized, otherwise, the behaviour is UNDEFINED.
|
||||||
// No-throw
|
// No-throw
|
||||||
template<class T>
|
template<class T>
|
||||||
@ -606,6 +654,24 @@ get ( optional<T>* opt )
|
|||||||
return opt->get_ptr() ;
|
return opt->get_ptr() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Returns a reference to the value if this is initialized, otherwise, the behaviour is UNDEFINED.
|
||||||
|
// No-throw
|
||||||
|
template<class T>
|
||||||
|
inline
|
||||||
|
BOOST_DEDUCED_TYPENAME optional<T>::reference_const_type
|
||||||
|
get_optional_value_or ( optional<T> const& opt, BOOST_DEDUCED_TYPENAME optional<T>::reference_const_type v )
|
||||||
|
{
|
||||||
|
return opt.get_value_or(v) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
inline
|
||||||
|
BOOST_DEDUCED_TYPENAME optional<T>::reference_type
|
||||||
|
get_optional_value_or ( optional<T>& opt, BOOST_DEDUCED_TYPENAME optional<T>::reference_type v )
|
||||||
|
{
|
||||||
|
return opt.get_value_or(v) ;
|
||||||
|
}
|
||||||
|
|
||||||
// Returns a pointer to the value if this is initialized, otherwise, returns NULL.
|
// Returns a pointer to the value if this is initialized, otherwise, returns NULL.
|
||||||
// No-throw
|
// No-throw
|
||||||
template<class T>
|
template<class T>
|
||||||
@ -627,6 +693,11 @@ get_pointer ( optional<T>& opt )
|
|||||||
// optional's relational operators ( ==, !=, <, >, <=, >= ) have deep-semantics (compare values).
|
// optional's relational operators ( ==, !=, <, >, <=, >= ) have deep-semantics (compare values).
|
||||||
// WARNING: This is UNLIKE pointers. Use equal_pointees()/less_pointess() in generic code instead.
|
// WARNING: This is UNLIKE pointers. Use equal_pointees()/less_pointess() in generic code instead.
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// optional<T> vs optional<T> cases
|
||||||
|
//
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
inline
|
inline
|
||||||
bool operator == ( optional<T> const& x, optional<T> const& y )
|
bool operator == ( optional<T> const& x, optional<T> const& y )
|
||||||
@ -657,64 +728,141 @@ inline
|
|||||||
bool operator >= ( optional<T> const& x, optional<T> const& y )
|
bool operator >= ( optional<T> const& x, optional<T> const& y )
|
||||||
{ return !( x < y ) ; }
|
{ return !( x < y ) ; }
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// optional<T> vs T cases
|
||||||
|
//
|
||||||
template<class T>
|
template<class T>
|
||||||
inline
|
inline
|
||||||
bool operator == ( optional<T> const& x, none_t const& )
|
bool operator == ( optional<T> const& x, T const& y )
|
||||||
|
{ return equal_pointees(x, optional<T>(y)); }
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
inline
|
||||||
|
bool operator < ( optional<T> const& x, T const& y )
|
||||||
|
{ return less_pointees(x, optional<T>(y)); }
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
inline
|
||||||
|
bool operator != ( optional<T> const& x, T const& y )
|
||||||
|
{ return !( x == y ) ; }
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
inline
|
||||||
|
bool operator > ( optional<T> const& x, T const& y )
|
||||||
|
{ return y < x ; }
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
inline
|
||||||
|
bool operator <= ( optional<T> const& x, T const& y )
|
||||||
|
{ return !( y < x ) ; }
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
inline
|
||||||
|
bool operator >= ( optional<T> const& x, T const& y )
|
||||||
|
{ return !( x < y ) ; }
|
||||||
|
|
||||||
|
//
|
||||||
|
// T vs optional<T> cases
|
||||||
|
//
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
inline
|
||||||
|
bool operator == ( T const& x, optional<T> const& y )
|
||||||
|
{ return equal_pointees( optional<T>(x), y ); }
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
inline
|
||||||
|
bool operator < ( T const& x, optional<T> const& y )
|
||||||
|
{ return less_pointees( optional<T>(x), y ); }
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
inline
|
||||||
|
bool operator != ( T const& x, optional<T> const& y )
|
||||||
|
{ return !( x == y ) ; }
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
inline
|
||||||
|
bool operator > ( T const& x, optional<T> const& y )
|
||||||
|
{ return y < x ; }
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
inline
|
||||||
|
bool operator <= ( T const& x, optional<T> const& y )
|
||||||
|
{ return !( y < x ) ; }
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
inline
|
||||||
|
bool operator >= ( T const& x, optional<T> const& y )
|
||||||
|
{ return !( x < y ) ; }
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// optional<T> vs none cases
|
||||||
|
//
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
inline
|
||||||
|
bool operator == ( optional<T> const& x, none_t )
|
||||||
{ return equal_pointees(x, optional<T>() ); }
|
{ return equal_pointees(x, optional<T>() ); }
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
inline
|
inline
|
||||||
bool operator < ( optional<T> const& x, none_t const& )
|
bool operator < ( optional<T> const& x, none_t )
|
||||||
{ return less_pointees(x,optional<T>() ); }
|
{ return less_pointees(x,optional<T>() ); }
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
inline
|
inline
|
||||||
bool operator != ( optional<T> const& x, none_t const& y )
|
bool operator != ( optional<T> const& x, none_t y )
|
||||||
{ return !( x == y ) ; }
|
{ return !( x == y ) ; }
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
inline
|
inline
|
||||||
bool operator > ( optional<T> const& x, none_t const& y )
|
bool operator > ( optional<T> const& x, none_t y )
|
||||||
{ return y < x ; }
|
{ return y < x ; }
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
inline
|
inline
|
||||||
bool operator <= ( optional<T> const& x, none_t const& y )
|
bool operator <= ( optional<T> const& x, none_t y )
|
||||||
{ return !( y < x ) ; }
|
{ return !( y < x ) ; }
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
inline
|
inline
|
||||||
bool operator >= ( optional<T> const& x, none_t const& y )
|
bool operator >= ( optional<T> const& x, none_t y )
|
||||||
{ return !( x < y ) ; }
|
{ return !( x < y ) ; }
|
||||||
|
|
||||||
|
//
|
||||||
|
// none vs optional<T> cases
|
||||||
|
//
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
inline
|
inline
|
||||||
bool operator == ( none_t const& x, optional<T> const& y )
|
bool operator == ( none_t x, optional<T> const& y )
|
||||||
{ return equal_pointees(optional<T>() ,y); }
|
{ return equal_pointees(optional<T>() ,y); }
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
inline
|
inline
|
||||||
bool operator < ( none_t const& x, optional<T> const& y )
|
bool operator < ( none_t x, optional<T> const& y )
|
||||||
{ return less_pointees(optional<T>() ,y); }
|
{ return less_pointees(optional<T>() ,y); }
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
inline
|
inline
|
||||||
bool operator != ( none_t const& x, optional<T> const& y )
|
bool operator != ( none_t x, optional<T> const& y )
|
||||||
{ return !( x == y ) ; }
|
{ return !( x == y ) ; }
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
inline
|
inline
|
||||||
bool operator > ( none_t const& x, optional<T> const& y )
|
bool operator > ( none_t x, optional<T> const& y )
|
||||||
{ return y < x ; }
|
{ return y < x ; }
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
inline
|
inline
|
||||||
bool operator <= ( none_t const& x, optional<T> const& y )
|
bool operator <= ( none_t x, optional<T> const& y )
|
||||||
{ return !( y < x ) ; }
|
{ return !( y < x ) ; }
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
inline
|
inline
|
||||||
bool operator >= ( none_t const& x, optional<T> const& y )
|
bool operator >= ( none_t x, optional<T> const& y )
|
||||||
{ return !( x < y ) ; }
|
{ return !( x < y ) ; }
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -767,10 +915,6 @@ template<class T> inline void swap ( optional<T>& x, optional<T>& y )
|
|||||||
optional_detail::optional_swap(x,y);
|
optional_detail::optional_swap(x,y);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T> inline optional<T> make_optional ( T const& v )
|
|
||||||
{
|
|
||||||
return optional<T>(v);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
|
|
||||||
|
@ -31,7 +31,11 @@
|
|||||||
# elif defined(__MWERKS__) && __MWERKS__ >= 0x3200
|
# elif defined(__MWERKS__) && __MWERKS__ >= 0x3200
|
||||||
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
|
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
|
||||||
# elif defined(__EDG__) || defined(__EDG_VERSION__)
|
# elif defined(__EDG__) || defined(__EDG_VERSION__)
|
||||||
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_EDG() | BOOST_PP_CONFIG_STRICT())
|
# if defined(_MSC_VER) && __EDG_VERSION__ >= 308
|
||||||
|
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC())
|
||||||
|
# else
|
||||||
|
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_EDG() | BOOST_PP_CONFIG_STRICT())
|
||||||
|
# endif
|
||||||
# elif defined(__MWERKS__)
|
# elif defined(__MWERKS__)
|
||||||
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MWCC())
|
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MWCC())
|
||||||
# elif defined(__DMC__)
|
# elif defined(__DMC__)
|
||||||
|
@ -562,7 +562,7 @@ typename cpp_regex_traits_implementation<charT>::string_type
|
|||||||
// std::collate<wchar_t>::transform returns a different string!
|
// std::collate<wchar_t>::transform returns a different string!
|
||||||
// So as a workaround, we'll truncate the string at the first NULL
|
// So as a workaround, we'll truncate the string at the first NULL
|
||||||
// which _seems_ to work....
|
// which _seems_ to work....
|
||||||
#if BOOST_WORKAROUND(__BORLANDC__, < 0x600)
|
#if BOOST_WORKAROUND(__BORLANDC__, < 0x580)
|
||||||
result.erase(result.find(charT(0)));
|
result.erase(result.find(charT(0)));
|
||||||
#else
|
#else
|
||||||
//
|
//
|
||||||
|
@ -76,7 +76,7 @@ struct regex_traits : public implementationT
|
|||||||
// required "standard" ones:
|
// required "standard" ones:
|
||||||
//
|
//
|
||||||
namespace re_detail{
|
namespace re_detail{
|
||||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(55500))
|
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !BOOST_WORKAROUND(__HP_aCC, < 60000)
|
||||||
BOOST_MPL_HAS_XXX_TRAIT_DEF(boost_extensions_tag)
|
BOOST_MPL_HAS_XXX_TRAIT_DEF(boost_extensions_tag)
|
||||||
#else
|
#else
|
||||||
template<class T>
|
template<class T>
|
||||||
@ -129,7 +129,7 @@ struct compute_wrapper_base
|
|||||||
{
|
{
|
||||||
typedef BaseT type;
|
typedef BaseT type;
|
||||||
};
|
};
|
||||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(55500))
|
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !BOOST_WORKAROUND(__HP_aCC, < 60000)
|
||||||
template <class BaseT>
|
template <class BaseT>
|
||||||
struct compute_wrapper_base<BaseT, false>
|
struct compute_wrapper_base<BaseT, false>
|
||||||
{
|
{
|
||||||
|
@ -208,7 +208,7 @@ namespace boost { namespace spirit {
|
|||||||
result_t hit = scan.empty_match();
|
result_t hit = scan.empty_match();
|
||||||
std::size_t n = m_min;
|
std::size_t n = m_min;
|
||||||
|
|
||||||
for (std::size_t i = 0;; ++i)
|
for (std::size_t i = 0; ; ++i)
|
||||||
{
|
{
|
||||||
typename ScannerT::iterator_t save = scan.first;
|
typename ScannerT::iterator_t save = scan.first;
|
||||||
result_t next = this->subject().parse(scan);
|
result_t next = this->subject().parse(scan);
|
||||||
|
@ -340,7 +340,7 @@ struct is_convertible_impl_select<true, false, true>
|
|||||||
template <typename From, typename To>
|
template <typename From, typename To>
|
||||||
struct is_convertible_impl_dispatch_base
|
struct is_convertible_impl_dispatch_base
|
||||||
{
|
{
|
||||||
#ifndef __HP_aCC
|
#if !BOOST_WORKAROUND(__HP_aCC, < 60700)
|
||||||
typedef is_convertible_impl_select<
|
typedef is_convertible_impl_select<
|
||||||
::boost::is_arithmetic<From>::value,
|
::boost::is_arithmetic<From>::value,
|
||||||
::boost::is_arithmetic<To>::value,
|
::boost::is_arithmetic<To>::value,
|
||||||
@ -413,3 +413,4 @@ BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,(::boost::detail::is_convert
|
|||||||
#include <boost/type_traits/detail/bool_trait_undef.hpp>
|
#include <boost/type_traits/detail/bool_trait_undef.hpp>
|
||||||
|
|
||||||
#endif // BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED
|
#endif // BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user