Updated boost to 1.46.1

This commit is contained in:
Alex Zolotarev 2011-04-16 18:29:27 +02:00 committed by Alex Zolotarev
parent d6ad24dad9
commit d36c4fe365
79 changed files with 1904 additions and 927 deletions

View file

@ -237,6 +237,8 @@ public:
*/
void consume(std::size_t n)
{
if (egptr() < pptr())
setg(&buffer_[0], gptr(), pptr());
if (gptr() + n > pptr())
n = pptr() - gptr();
gbump(static_cast<int>(n));

View file

@ -46,7 +46,7 @@ class dev_poll_reactor
: public boost::asio::detail::service_base<dev_poll_reactor>
{
public:
enum { read_op = 0, write_op = 1,
enum op_types { read_op = 0, write_op = 1,
connect_op = 1, except_op = 2, max_ops = 3 };
// Per-descriptor data.

View file

@ -42,7 +42,7 @@ class epoll_reactor
: public boost::asio::detail::service_base<epoll_reactor>
{
public:
enum { read_op = 0, write_op = 1,
enum op_types { read_op = 0, write_op = 1,
connect_op = 1, except_op = 2, max_ops = 3 };
// Per-descriptor queues.

View file

@ -47,9 +47,9 @@ kqueue_reactor::kqueue_reactor(boost::asio::io_service& io_service)
interrupter_(),
shutdown_(false)
{
// The interrupter is put into a permanently readable state. Whenever we
// want to interrupt the blocked kevent call we register a one-shot read
// operation against the descriptor.
// The interrupter is put into a permanently readable state. Whenever we want
// to interrupt the blocked kevent call we register a read operation against
// the descriptor.
interrupter_.interrupt();
}
@ -139,17 +139,17 @@ void kqueue_reactor::start_op(int op_type, socket_type descriptor,
{
case read_op:
BOOST_ASIO_KQUEUE_EV_SET(&event, descriptor, EVFILT_READ,
EV_ADD | EV_ONESHOT, 0, 0, descriptor_data);
EV_ADD | EV_CLEAR, 0, 0, descriptor_data);
break;
case write_op:
BOOST_ASIO_KQUEUE_EV_SET(&event, descriptor, EVFILT_WRITE,
EV_ADD | EV_ONESHOT, 0, 0, descriptor_data);
EV_ADD | EV_CLEAR, 0, 0, descriptor_data);
break;
case except_op:
if (!descriptor_data->op_queue_[read_op].empty())
return; // Already registered for read events.
BOOST_ASIO_KQUEUE_EV_SET(&event, descriptor, EVFILT_READ,
EV_ADD | EV_ONESHOT, EV_OOBAND, 0, descriptor_data);
EV_ADD | EV_CLEAR, EV_OOBAND, 0, descriptor_data);
break;
}
@ -247,7 +247,7 @@ void kqueue_reactor::run(bool block, op_queue<operation>& ops)
if (ptr == &interrupter_)
{
// No need to reset the interrupter since we're leaving the descriptor
// in a ready-to-read state and relying on one-shot notifications.
// in a ready-to-read state and relying on edge-triggered notifications.
}
else
{
@ -296,18 +296,20 @@ void kqueue_reactor::run(bool block, op_queue<operation>& ops)
case EVFILT_READ:
if (!descriptor_data->op_queue_[read_op].empty())
BOOST_ASIO_KQUEUE_EV_SET(&event, descriptor, EVFILT_READ,
EV_ADD | EV_ONESHOT, 0, 0, descriptor_data);
EV_ADD | EV_CLEAR, 0, 0, descriptor_data);
else if (!descriptor_data->op_queue_[except_op].empty())
BOOST_ASIO_KQUEUE_EV_SET(&event, descriptor, EVFILT_READ,
EV_ADD | EV_ONESHOT, EV_OOBAND, 0, descriptor_data);
EV_ADD | EV_CLEAR, EV_OOBAND, 0, descriptor_data);
else
continue;
break;
case EVFILT_WRITE:
if (!descriptor_data->op_queue_[write_op].empty())
BOOST_ASIO_KQUEUE_EV_SET(&event, descriptor, EVFILT_WRITE,
EV_ADD | EV_ONESHOT, 0, 0, descriptor_data);
EV_ADD | EV_CLEAR, 0, 0, descriptor_data);
else
continue;
break;
default:
break;
}
@ -336,7 +338,7 @@ void kqueue_reactor::interrupt()
{
struct kevent event;
BOOST_ASIO_KQUEUE_EV_SET(&event, interrupter_.read_descriptor(),
EVFILT_READ, EV_ADD | EV_ONESHOT, 0, 0, &interrupter_);
EVFILT_READ, EV_ADD | EV_CLEAR, 0, 0, &interrupter_);
::kevent(kqueue_fd_, &event, 1, 0, 0, 0);
}

View file

@ -64,7 +64,7 @@ boost::system::error_code reactive_socket_service_base::close(
if (is_open(impl))
reactor_.close_descriptor(impl.socket_, impl.reactor_data_);
if (socket_ops::close(impl.socket_, impl.state_, true, ec) == 0)
if (socket_ops::close(impl.socket_, impl.state_, false, ec) == 0)
construct(impl);
return ec;

View file

@ -51,10 +51,10 @@ class select_reactor
{
public:
#if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
enum { read_op = 0, write_op = 1, except_op = 2,
enum op_types { read_op = 0, write_op = 1, except_op = 2,
max_select_ops = 3, connect_op = 3, max_ops = 4 };
#else // defined(BOOST_WINDOWS) || defined(__CYGWIN__)
enum { read_op = 0, write_op = 1, except_op = 2,
enum op_types { read_op = 0, write_op = 1, except_op = 2,
max_select_ops = 3, connect_op = 1, max_ops = 3 };
#endif // defined(BOOST_WINDOWS) || defined(__CYGWIN__)

View file

@ -39,7 +39,7 @@ unspecified bytes_transferred;
/// An argument placeholder, for use with boost::bind(), that corresponds to
/// the iterator argument of a handler for asynchronous functions such as
/// boost::asio::basic_resolver::resolve.
/// boost::asio::basic_resolver::async_resolve.
unspecified iterator;
#elif defined(__BORLANDC__) || defined(__GNUC__)

View file

@ -18,6 +18,6 @@
// BOOST_ASIO_VERSION % 100 is the sub-minor version
// BOOST_ASIO_VERSION / 100 % 1000 is the minor version
// BOOST_ASIO_VERSION / 100000 is the major version
#define BOOST_ASIO_VERSION 100408 // 1.4.8
#define BOOST_ASIO_VERSION 100409 // 1.4.9
#endif // BOOST_ASIO_VERSION_HPP

View file

@ -12,9 +12,6 @@
//
// versions check:
// we don't support Borland prior to version 5.4:
#define BOOST_BORLAND __BORLANDC__
#if __BORLANDC__ < 0x540
# error "Compiler not supported or configured - please reconfigure"
#endif

View file

@ -13,8 +13,7 @@
# define BOOST_NO_EXCEPTIONS
#endif
#if __has_feature(cxx_rtti)
#else
#if !__has_feature(cxx_rtti)
# define BOOST_NO_RTTI
#endif
@ -24,35 +23,57 @@
#define BOOST_HAS_NRVO
// NOTE: Clang's C++0x support is not worth detecting. However, it
// supports both extern templates and "long long" even in C++98/03
// mode.
// Clang supports "long long" in all compilation modes.
#define BOOST_NO_AUTO_DECLARATIONS
#define BOOST_NO_AUTO_MULTIDECLARATIONS
#define BOOST_NO_CHAR16_T
#define BOOST_NO_CHAR32_T
#define BOOST_NO_CONCEPTS
#define BOOST_NO_CONSTEXPR
#define BOOST_NO_DECLTYPE
#if !__has_feature(cxx_decltype)
# define BOOST_NO_DECLTYPE
#endif
#define BOOST_NO_DEFAULTED_FUNCTIONS
#define BOOST_NO_DELETED_FUNCTIONS
#if !__has_feature(cxx_deleted_functions)
# define BOOST_NO_DELETED_FUNCTIONS
#endif
#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
#if !__has_feature(cxx_default_function_template_args)
#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
#endif
#define BOOST_NO_INITIALIZER_LISTS
#define BOOST_NO_LAMBDAS
#define BOOST_NO_NULLPTR
#define BOOST_NO_RAW_LITERALS
#define BOOST_NO_RVALUE_REFERENCES
#define BOOST_NO_SCOPED_ENUMS
#define BOOST_NO_STATIC_ASSERT
#if !__has_feature(cxx_rvalue_references)
# define BOOST_NO_RVALUE_REFERENCES
#endif
#if !__has_feature(cxx_strong_enums)
# define BOOST_NO_SCOPED_ENUMS
#endif
#if !__has_feature(cxx_static_assert)
# define BOOST_NO_STATIC_ASSERT
#endif
#define BOOST_NO_TEMPLATE_ALIASES
#define BOOST_NO_UNICODE_LITERALS
#define BOOST_NO_VARIADIC_TEMPLATES
#define BOOST_NO_VARIADIC_MACROS
// HACK: Clang does support extern templates, but Boost's test for
// them is wrong.
#define BOOST_NO_EXTERN_TEMPLATE
#if !__has_feature(cxx_variadic_templates)
# define BOOST_NO_VARIADIC_TEMPLATES
#endif
// Clang always supports variadic macros
// Clang always supports extern templates
#ifndef BOOST_COMPILER
# define BOOST_COMPILER "Clang version " __clang_version__

View file

@ -14,8 +14,6 @@
#include "boost/config/compiler/common_edg.hpp"
#define BOOST_COMO __COMO_VERSION__
#if (__COMO_VERSION__ <= 4245)
# if defined(_MSC_VER) && _MSC_VER <= 1300

View file

@ -89,6 +89,7 @@
# define BOOST_NO_EXCEPTIONS
#endif
//
// Threading support: Turn this on unconditionally here (except for
// those platforms where we can know for sure). It will get turned off again

View file

@ -26,7 +26,19 @@
# define BOOST_INTEL_CXX_VERSION __ECC
#endif
// Flags determined by comparing output of 'icpc -dM -E' with and without '-std=c++0x'
#if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && __STDC_HOSTED__) || defined(__GXX_EXPERIMENTAL_CPP0X__)
# define BOOST_INTEL_STDCXX0X
#endif
#if defined(_MSC_VER) && (_MSC_VER >= 1600)
# define BOOST_INTEL_STDCXX0X
#endif
#ifdef BOOST_INTEL_STDCXX0X
#define BOOST_COMPILER "Intel C++ C++0x mode version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION)
#else
#define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION)
#endif
#define BOOST_INTEL BOOST_INTEL_CXX_VERSION
#if defined(_WIN32) || defined(_WIN64)
@ -99,7 +111,7 @@
# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
# endif
#endif
#if (defined(__GNUC__) && (__GNUC__ < 4)) || defined(_WIN32) || (BOOST_INTEL_CXX_VERSION <= 1110)
#if (defined(__GNUC__) && (__GNUC__ < 4)) || defined(_WIN32) || (BOOST_INTEL_CXX_VERSION <= 1200)
// GCC or VC emulation:
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
#endif
@ -179,6 +191,32 @@ template<> struct assert_intrinsic_wchar_t<unsigned short> {};
# define BOOST_SYMBOL_IMPORT
# define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default")))
#endif
//
// C++0x features
// - ICC added static_assert in 11.0 (first version with C++0x support)
//
#if defined(BOOST_INTEL_STDCXX0X)
# undef BOOST_NO_STATIC_ASSERT
//
// These pass our test cases, but aren't officially supported according to:
// http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/
//
//# undef BOOST_NO_LAMBDAS
//# undef BOOST_NO_DECLTYPE
//# undef BOOST_NO_AUTO_DECLARATIONS
//# undef BOOST_NO_AUTO_MULTIDECLARATIONS
#endif
#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION >= 1200)
# undef BOOST_NO_RVALUE_REFERENCES
# undef BOOST_NO_SCOPED_ENUMS
# undef BOOST_NO_DELETED_FUNCTIONS
# undef BOOST_NO_DEFAULTED_FUNCTIONS
# undef BOOST_NO_LAMBDAS
# undef BOOST_NO_DECLTYPE
# undef BOOST_NO_AUTO_DECLARATIONS
# undef BOOST_NO_AUTO_MULTIDECLARATIONS
#endif
//
// last known and checked version:

View file

@ -12,8 +12,6 @@
// Metrowerks C++ compiler setup:
#define BOOST_MWERKS __MWERKS__
// locale support is disabled when linking with the dynamic runtime
# ifdef _MSL_NO_LOCALE
# define BOOST_NO_STD_LOCALE

View file

@ -17,71 +17,12 @@
// Boost support macro for NVCC
// NVCC Basically behaves like some flavor of MSVC6 + some specific quirks
#define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
#define BOOST_MSVC6_MEMBER_TEMPLATES
#define BOOST_HAS_UNISTD_H
#define BOOST_HAS_STDINT_H
#define BOOST_HAS_SIGACTION
#define BOOST_HAS_SCHED_YIELD
#define BOOST_HAS_PTHREADS
#define BOOST_HAS_PTHREAD_YIELD
#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
#define BOOST_HAS_PARTIAL_STD_ALLOCATOR
#define BOOST_HAS_NRVO
#define BOOST_HAS_NL_TYPES_H
#define BOOST_HAS_NANOSLEEP
#define BOOST_HAS_LONG_LONG
#define BOOST_HAS_LOG1P
#define BOOST_HAS_GETTIMEOFDAY
#define BOOST_HAS_EXPM1
#define BOOST_HAS_DIRENT_H
#define BOOST_HAS_CLOCK_GETTIME
#define BOOST_NO_VARIADIC_TEMPLATES
#define BOOST_NO_VARIADIC_MACROS
#define BOOST_NO_UNICODE_LITERALS
#define BOOST_NO_TEMPLATE_ALIASES
#define BOOST_NO_STD_UNORDERED
#define BOOST_NO_STATIC_ASSERT
#define BOOST_NO_SFINAE_EXPR
#define BOOST_NO_SCOPED_ENUMS
#define BOOST_NO_RVALUE_REFERENCES
#define BOOST_NO_RAW_LITERALS
#define BOOST_NO_NULLPTR
#define BOOST_NO_LAMBDAS
#define BOOST_NO_INITIALIZER_LISTS
#define BOOST_NO_MS_INT64_NUMERIC_LIMITS
#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
#define BOOST_NO_EXTERN_TEMPLATE
#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
#define BOOST_NO_DELETED_FUNCTIONS
#define BOOST_NO_DEFAULTED_FUNCTIONS
#define BOOST_NO_DECLTYPE
#define BOOST_NO_CONSTEXPR
#define BOOST_NO_CONCEPTS
#define BOOST_NO_CHAR32_T
#define BOOST_NO_CHAR16_T
#define BOOST_NO_AUTO_MULTIDECLARATIONS
#define BOOST_NO_AUTO_DECLARATIONS
#define BOOST_NO_0X_HDR_UNORDERED_SET
#define BOOST_NO_0X_HDR_UNORDERED_MAP
#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
#define BOOST_NO_0X_HDR_RANDOM
#define BOOST_NO_0X_HDR_MUTEX
#define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
#define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
#define BOOST_NO_0X_HDR_INITIALIZER_LIST
#define BOOST_NO_0X_HDR_FUTURE
#define BOOST_NO_0X_HDR_FORWARD_LIST
#define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
#define BOOST_NO_0X_HDR_CONDITION_VARIABLE
#define BOOST_NO_0X_HDR_CONCEPTS
#define BOOST_NO_0X_HDR_CODECVT
#define BOOST_NO_0X_HDR_CHRONO
#define BOOST_NO_0X_HDR_ARRAY
#ifdef __GNUC__
#include <boost/config/compiler/gcc.hpp>
#elif defined(_MSC_VER)
#include <boost/config/compiler/visualc.hpp>
#endif

View file

@ -11,10 +11,6 @@
// Sun C++ compiler setup:
// Macro identifying the Sun compiler
#define BOOST_SUNCC __SUNPRO_CC
# if __SUNPRO_CC <= 0x500
# define BOOST_NO_MEMBER_TEMPLATES
# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING

View file

@ -27,7 +27,6 @@
#if (__IBMCPP__ <= 600) || !defined(BOOST_STRICT_CONFIG)
# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
# define BOOST_NO_INITIALIZER_LISTS
#endif
#if (__IBMCPP__ <= 1110)
@ -54,44 +53,66 @@
#error "Compiler not supported or configured - please reconfigure"
#endif
//
// last known and checked version is 600:
#if (__IBMCPP__ > 1010)
// last known and checked version is 1110:
#if (__IBMCPP__ > 1110)
# if defined(BOOST_ASSERT_CONFIG)
# error "Unknown compiler version - please run the configure tests and report the results"
# endif
#endif
// Some versions of the compiler have issues with default arguments on partial specializations
#if __IBMCPP__ <= 1010
#define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS
#endif
//
// C++0x features
//
// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
//
#define BOOST_NO_AUTO_DECLARATIONS
#define BOOST_NO_AUTO_MULTIDECLARATIONS
#define BOOST_NO_CHAR16_T
#define BOOST_NO_CHAR32_T
#if ! __IBMCPP_AUTO_TYPEDEDUCTION
# define BOOST_NO_AUTO_DECLARATIONS
# define BOOST_NO_AUTO_MULTIDECLARATIONS
#endif
#if ! __IBMCPP_UTF_LITERAL__
# define BOOST_NO_CHAR16_T
# define BOOST_NO_CHAR32_T
#endif
#define BOOST_NO_CONCEPTS
#define BOOST_NO_CONSTEXPR
#define BOOST_NO_DECLTYPE
#if ! __IBMCPP_DECLTYPE
# define BOOST_NO_DECLTYPE
#else
# define BOOST_HAS_DECLTYPE
#endif
#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
#if ! __IBMCPP_EXTERN_TEMPLATE
# define BOOST_NO_EXTERN_TEMPLATE
#endif
#if ! __IBMCPP_VARIADIC_TEMPLATES
// not enabled separately at this time
# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
#endif
#define BOOST_NO_INITIALIZER_LISTS
#define BOOST_NO_LAMBDAS
#define BOOST_NO_NULLPTR
#define BOOST_NO_RAW_LITERALS
#define BOOST_NO_RVALUE_REFERENCES
#define BOOST_NO_SCOPED_ENUMS
#define BOOST_NO_SFINAE_EXPR
#define BOOST_NO_STATIC_ASSERT
#if ! __IBMCPP_STATIC_ASSERT
# define BOOST_NO_STATIC_ASSERT
#endif
#define BOOST_NO_TEMPLATE_ALIASES
#define BOOST_NO_UNICODE_LITERALS
#define BOOST_NO_VARIADIC_TEMPLATES
#define BOOST_NO_VARIADIC_MACROS
#if ! __IBMCPP_VARIADIC_TEMPLATES
# define BOOST_NO_VARIADIC_TEMPLATES
#endif
#if ! __C99_MACRO_WITH_VA_ARGS
# define BOOST_NO_VARIADIC_MACROS
#endif

View file

@ -1,5 +1,4 @@
// (C) Copyright John Maddock 2001 - 2002.
// (C) Copyright Bryce Lelbach 2010
// Use, modification and distribution are 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)
@ -10,13 +9,6 @@
#define BOOST_PLATFORM "IBM Aix"
#define BOOST_NIX 1
//#define BOOST_GENETIC_NIX 1
#define BOOST_TRADEMARK_NIX 1
//#define BOOST_FUNCTIONAL_NIX 1
#define BOOST_AIX 1
#define BOOST_HAS_UNISTD_H
#define BOOST_HAS_NL_TYPES_H
#define BOOST_HAS_NANOSLEEP

View file

@ -1,5 +1,4 @@
// (C) Copyright John Maddock 2002.
// (C) Copyright Bryce Lelbach 2010
// Use, modification and distribution are 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)
@ -8,8 +7,6 @@
#define BOOST_PLATFORM "AmigaOS"
#define BOOST_AMIGA 1
#define BOOST_DISABLE_THREADS
#define BOOST_NO_CWCHAR
#define BOOST_NO_STD_WSTRING

View file

@ -1,5 +1,4 @@
// (C) Copyright John Maddock 2001.
// (C) Copyright Bryce Lelbach 2010
// Use, modification and distribution are 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)
@ -10,13 +9,6 @@
#define BOOST_PLATFORM "BeOS"
#define BOOST_BEOS 1
#define BOOST_NIX 1
//#define BOOST_GENETIC_NIX 1
//#define BOOST_TRADEMARK_NIX 1
#define BOOST_FUNCTIONAL_NIX 1
#define BOOST_NO_CWCHAR
#define BOOST_NO_CWCTYPE
#define BOOST_HAS_UNISTD_H

View file

@ -1,7 +1,6 @@
// (C) Copyright John Maddock 2001 - 2003.
// (C) Copyright Darin Adler 2001.
// (C) Copyright Douglas Gregor 2002.
// (C) Copyright Bryce Lelbach 2010
// Use, modification and distribution are 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)
@ -10,30 +9,18 @@
// generic BSD config options:
#if !defined(__FreeBSD__) && \
!defined(__NetBSD__) && \
!defined(__OpenBSD__) && \
!defined(__DragonFly__)
#error "This platform is not BSD"
#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__)
#error "This platform is not BSD"
#endif
#define BOOST_NIX 1
#define BOOST_GENETIC_NIX 1
//#define BOOST_TRADEMARK_NIX 1
//#define BOOST_FUNCTIONAL_NIX 1
#ifdef __FreeBSD__
#define BOOST_PLATFORM "FreeBSD " BOOST_STRINGIZE(__FreeBSD__)
#define BOOST_FREEBSD __FreeBSD__
#define BOOST_PLATFORM "FreeBSD " BOOST_STRINGIZE(__FreeBSD__)
#elif defined(__NetBSD__)
#define BOOST_PLATFORM "NetBSD " BOOST_STRINGIZE(__NetBSD__)
#define BOOST_NETBSD __NetBSD__
#define BOOST_PLATFORM "NetBSD " BOOST_STRINGIZE(__NetBSD__)
#elif defined(__OpenBSD__)
#define BOOST_PLATFORM "OpenBSD " BOOST_STRINGIZE(__OpenBSD__)
#define BOOST_OPENBSD __OpenBSD__
#define BOOST_PLATFORM "OpenBSD " BOOST_STRINGIZE(__OpenBSD__)
#elif defined(__DragonFly__)
#define BOOST_PLATFORM "DragonFly " BOOST_STRINGIZE(__DragonFly__)
#define BOOST_DFBSD __DragonFly__
#define BOOST_PLATFORM "DragonFly " BOOST_STRINGIZE(__DragonFly__)
#endif
//

View file

@ -1,56 +1,55 @@
// (C) Copyright John Maddock 2001 - 2003
// (C) Copyright Bryce Lelbach 2010
//
// Use, modification and distribution are 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 for most recent version.
// (C) Copyright John Maddock 2001 - 2003.
// Use, modification and distribution are 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)
#define BOOST_PLATFORM "Cygwin" // Platform name.
#define BOOST_CYGWIN __CYGWIN__ // Boost platform ID macros.
// See http://www.boost.org for most recent version.
// cygwin specific config options:
#define BOOST_PLATFORM "Cygwin"
#define BOOST_HAS_DIRENT_H
#define BOOST_HAS_LOG1P
#define BOOST_HAS_EXPM1
#define BOOST_NIX 1
//#define BOOST_GENETIC_NIX 1
//#define BOOST_TRADEMARK_NIX 1
#define BOOST_FUNCTIONAL_NIX 1
// See if we have POSIX threads, otherwise revert to native Win threads.
//
// Threading API:
// See if we have POSIX threads, if we do use them, otherwise
// revert to native Win threads.
#define BOOST_HAS_UNISTD_H
#include <unistd.h>
#if defined(_POSIX_THREADS) && (_POSIX_THREADS + 0 >= 0) && \
!defined(BOOST_HAS_WINTHREADS)
#define BOOST_HAS_PTHREADS
#define BOOST_HAS_SCHED_YIELD
#define BOOST_HAS_GETTIMEOFDAY
#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
#define BOOST_HAS_SIGACTION
#if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS)
# define BOOST_HAS_PTHREADS
# define BOOST_HAS_SCHED_YIELD
# define BOOST_HAS_GETTIMEOFDAY
# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
# define BOOST_HAS_SIGACTION
#else
#if !defined(BOOST_HAS_WINTHREADS)
#define BOOST_HAS_WINTHREADS
#endif
#define BOOST_HAS_FTIME
# if !defined(BOOST_HAS_WINTHREADS)
# define BOOST_HAS_WINTHREADS
# endif
# define BOOST_HAS_FTIME
#endif
// Find out if we have a stdint.h, there should be a better way to do this.
//
// find out if we have a stdint.h, there should be a better way to do this:
//
#include <sys/types.h>
#ifdef _STDINT_H
#define BOOST_HAS_STDINT_H
#define BOOST_HAS_STDINT_H
#endif
/// Cygwin has no fenv.h
#define BOOST_NO_FENV_H
// boilerplate code:
#include <boost/config/posix_features.hpp>
// Cygwin lies about XSI conformance, there is no nl_types.h.
//
// Cygwin lies about XSI conformance, there is no nl_types.h:
//
#ifdef BOOST_HAS_NL_TYPES_H
#undef BOOST_HAS_NL_TYPES_H
# undef BOOST_HAS_NL_TYPES_H
#endif

View file

@ -3,7 +3,6 @@
// (C) Copyright David Abrahams 2002.
// (C) Copyright Toon Knapen 2003.
// (C) Copyright Boris Gubenko 2006 - 2007.
// (C) Copyright Bryce Lelbach 2010
// Use, modification and distribution are 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)
@ -14,13 +13,6 @@
#define BOOST_PLATFORM "HP-UX"
#define BOOST_HPUX 1 // platform ID macro
#define BOOST_NIX 1
//#define BOOST_GENETIC_NIX 1
#define BOOST_TRADEMARK_NIX 1
//#define BOOST_FUNCTIONAL_NIX 1
// In principle, HP-UX has a nice <stdint.h> under the name <inttypes.h>
// However, it has the following problem:
// Use of UINT32_C(0) results in "0u l" for the preprocessed source

View file

@ -1,6 +1,5 @@
// (C) Copyright John Maddock 2001 - 2003.
// (C) Copyright Jens Maurer 2003.
// (C) Copyright Bryce Lelbach 2010
// Use, modification and distribution are 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)
@ -12,11 +11,6 @@
#define BOOST_PLATFORM "SGI Irix"
#define BOOST_NIX 1
//#define BOOST_GENETIC_NIX 1
#define BOOST_TRADEMARK_NIX 1
//#define BOOST_FUNCTIONAL_NIX 1
#define BOOST_NO_SWPRINTF
//
// these are not auto detected by POSIX feature tests:

View file

@ -1,6 +1,5 @@
// (C) Copyright John Maddock 2001 - 2003.
// (C) Copyright Jens Maurer 2001 - 2003.
// (C) Copyright Bryce Lelbach 2010
// Use, modification and distribution are 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)
@ -14,13 +13,6 @@
// make sure we have __GLIBC_PREREQ if available at all
#include <cstdlib>
#define BOOST_NIX 1
//#define BOOST_GENETIC_NIX 1
//#define BOOST_TRADEMARK_NIX 1
#define BOOST_FUNCTIONAL_NIX 1
#define BOOST_LINUX 1
//
// <stdint.h> added to glibc 2.1.1
// We can only test for 2.1 though:

View file

@ -1,7 +1,6 @@
// (C) Copyright John Maddock 2001 - 2003.
// (C) Copyright Darin Adler 2001 - 2002.
// (C) Copyright Bill Kempf 2002.
// (C) Copyright Bryce Lelbach 2010
// Use, modification and distribution are 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)
@ -14,11 +13,6 @@
#if __MACH__ && !defined(_MSL_USING_MSL_C)
#define BOOST_NIX 1
//#define BOOST_GENETIC_NIX 1
#define BOOST_TRADEMARK_NIX 1
//#define BOOST_FUNCTIONAL_NIX 1
// Using the Mac OS X system BSD-style C library.
# ifndef BOOST_HAS_UNISTD_H

View file

@ -1,5 +1,4 @@
// (C) Copyright Jim Douglas 2005.
// (C) Copyright Bryce Lelbach 2010
// Use, modification and distribution are 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)
@ -8,15 +7,8 @@
// QNX specific config options:
#define BOOST_QNX 1
#define BOOST_PLATFORM "QNX"
#define BOOST_NIX 1
//#define BOOST_GENETIC_NIX 1
//#define BOOST_TRADEMARK_NIX 1
#define BOOST_FUNCTIONAL_NIX 1
#define BOOST_HAS_UNISTD_H
#include <boost/config/posix_features.hpp>

View file

@ -1,6 +1,5 @@
// (C) Copyright John Maddock 2001 - 2003.
// (C) Copyright Jens Maurer 2003.
// (C) Copyright Bryce Lelbach 2010
// Use, modification and distribution are 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)
@ -11,11 +10,6 @@
#define BOOST_PLATFORM "Sun Solaris"
#define BOOST_NIX 1
//#define BOOST_GENETIC_NIX 1
#define BOOST_TRADEMARK_NIX 1
//#define BOOST_FUNCTIONAL_NIX 1
#define BOOST_HAS_GETTIMEOFDAY
// boilerplate code:

View file

@ -1,7 +1,6 @@
// (C) Copyright Yuriy Krasnoschek 2009.
// (C) Copyright John Maddock 2001 - 2003.
// (C) Copyright Jens Maurer 2001 - 2003.
// (C) Copyright Bryce Lelbach 2010
// Use, modification and distribution are 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)
@ -10,16 +9,13 @@
// symbian specific config options:
#define BOOST_PLATFORM "Symbian"
#define BOOST_SYMBIAN 1
#if defined(__S60_3X__)
// Open C / C++ plugin was introdused in this SDK, earlier versions don't have
// CRT / STL
# define BOOST_NIX 1
//# define BOOST_GENETIC_NIX 1
//# define BOOST_TRADEMARK_NIX 1
# define BOOST_FUNCTIONAL_NIX 1
// Open C / C++ plugin was introdused in this SDK, earlier versions don't have CRT / STL
# define BOOST_S60_3rd_EDITION_FP2_OR_LATER_SDK
// make sure we have __GLIBC_PREREQ if available at all
# include <cstdlib>

View file

@ -1,5 +1,4 @@
// (C) Copyright Dustin Spicuzza 2009.
// (C) Copyright Bryce Lelbach 2010
// Use, modification and distribution are 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)
@ -24,11 +23,6 @@
#define _POSIX_TIMERS 1
#define _POSIX_THREADS 1
#define BOOST_NIX 1
//#define BOOST_GENETIC_NIX 1
#define BOOST_TRADEMARK_NIX 1
//#define BOOST_FUNCTIONAL_NIX 1
// vxworks doesn't work with asio serial ports
#define BOOST_ASIO_DISABLE_SERIAL_PORT

View file

@ -40,6 +40,10 @@
// Rogue Wave library:
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/roguewave.hpp"
#elif defined(_LIBCPP_VERSION)
// libc++
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcpp.hpp"
#elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
// GNU libstdc++ 3
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libstdcpp3.hpp"

View file

@ -0,0 +1,34 @@
// (C) Copyright Christopher Jefferson 2011.
// Use, modification and distribution are 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 for most recent version.
// config for libc++
// Might need more in here later.
#if !defined(_LIBCPP_VERSION)
# include <ciso646>
# if !defined(_LIBCPP_VERSION)
# error "This is not libc++!"
# endif
#endif
#define BOOST_STDLIB "libc++ version " BOOST_STRINGIZE(_LIBCPP_VERSION)
#define BOOST_HAS_THREADS
#define BOOST_NO_0X_HDR_CONCEPTS
#define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
#define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
#define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
#ifdef _LIBCPP_HAS_NO_VARIADICS
# define BOOST_NO_0X_HDR_TUPLE
#endif
// libc++ uses a non-standard messages_base
#define BOOST_NO_STD_MESSAGES
// --- end ---

View file

@ -9,6 +9,8 @@
// config for libstdc++ v3
// not much to go in here:
#define BOOST_GNU_STDLIB 1
#ifdef __GLIBCXX__
#define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCXX__)
#else

View file

@ -10,6 +10,8 @@
// Rogue Wave std lib:
#define BOOST_RW_STDLIB 1
#if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)
# include <boost/config/no_tr1/utility.hpp>
# if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)
@ -154,7 +156,10 @@
// C++0x headers not yet implemented
//
#if _RWSTD_VER < 0x05000000
# define BOOST_NO_0X_HDR_ARRAY
# define BOOST_NO_0X_HDR_TYPE_TRAITS
#endif
# define BOOST_NO_0X_HDR_CHRONO
# define BOOST_NO_0X_HDR_CODECVT
# define BOOST_NO_0X_HDR_CONCEPTS
@ -172,7 +177,6 @@
# define BOOST_NO_0X_HDR_SYSTEM_ERROR
# 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

View file

@ -600,7 +600,7 @@ namespace boost{
// the global definition into std namespace:
#ifdef BOOST_NO_STD_TYPEINFO
#include <typeinfo>
namespace std{ using ::typeinfo; }
namespace std{ using ::type_info; }
#endif
// ---------------------------------------------------------------------------//
@ -639,10 +639,6 @@ namespace std{ using ::typeinfo; }
# if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \
|| defined(_POSIX_SOURCE)
# define BOOST_PLATFORM "Generic Unix"
# define BOOST_NIX 1
//# define BOOST_GENETIC_NIX 1
//# define BOOST_TRADEMARK_NIX 1
# define BOOST_FUNCTIONAL_NIX 1
# else
# define BOOST_PLATFORM "Unknown"
# endif

View file

@ -27,7 +27,8 @@
// on Windows, except for standard libaries known to have wchar_t overloads for
// file stream I/O, use path::string() to get a narrow character c_str()
#if defined(BOOST_WINDOWS_API) \
&& !(defined(_CPPLIB_VER) && _CPPLIB_VER >= 405) // not (Dinkumware with overloads)
&& (!defined(_CPPLIB_VER) || _CPPLIB_VER < 405 || defined(_STLPORT_VERSION))
// !Dinkumware || early Dinkumware || STLPort masquerading as Dinkumware
# define BOOST_FILESYSTEM_C_STR string().c_str() // use narrow, since wide not available
#else // use the native c_str, which will be narrow on POSIX, wide on Windows
# define BOOST_FILESYSTEM_C_STR c_str()

View file

@ -452,7 +452,6 @@ namespace filesystem3
void m_erase_redundant_separator(string_type::size_type sep_pos);
string_type::size_type m_parent_path_end() const;
void m_portable();
path& m_normalize();

View file

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
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)
==============================================================================*/
#if !defined(FUSION_INCLUDE_MAKE_UNFUSED_GENERIC)
#define FUSION_INCLUDE_MAKE_UNFUSED_GENERIC
#include <boost/fusion/functional/generation/make_unfused_generic.hpp>
#endif

View file

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
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)
==============================================================================*/
#if !defined(FUSION_INCLUDE_MAKE_UNFUSED_LVALUE_ARGS)
#define FUSION_INCLUDE_MAKE_UNFUSED_LVALUE_ARGS
#include <boost/fusion/functional/generation/make_unfused_lvalue_args.hpp>
#endif

View file

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
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)
==============================================================================*/
#if !defined(FUSION_INCLUDE_MAKE_UNFUSED_RVALUE_ARGS)
#define FUSION_INCLUDE_MAKE_UNFUSED_RVALUE_ARGS
#include <boost/fusion/functional/generation/make_unfused_rvalue_args.hpp>
#endif

View file

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
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)
==============================================================================*/
#if !defined(FUSION_INCLUDE_UNFUSED_GENERIC)
#define FUSION_INCLUDE_UNFUSED_GENERIC
#include <boost/fusion/functional/adapter/unfused_generic.hpp>
#endif

View file

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
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)
==============================================================================*/
#if !defined(FUSION_INCLUDE_UNFUSED_LVALUE_ARGS)
#define FUSION_INCLUDE_UNFUSED_LVALUE_ARGS
#include <boost/fusion/functional/adapter/unfused_lvalue_args.hpp>
#endif

View file

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
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)
==============================================================================*/
#if !defined(FUSION_INCLUDE_UNFUSED_RVALUE_ARGS)
#define FUSION_INCLUDE_UNFUSED_RVALUE_ARGS
#include <boost/fusion/functional/adapter/unfused_rvalue_args.hpp>
#endif

View file

@ -1,38 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
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)
==============================================================================*/
#if !defined(FUSION_ENABLE_COMPARISON_09232005_1958)
#define FUSION_ENABLE_COMPARISON_09232005_1958
#include <boost/mpl/or.hpp>
#include <boost/mpl/and.hpp>
#include <boost/mpl/not.hpp>
#include <boost/mpl/equal_to.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp>
#include <boost/fusion/support/detail/is_mpl_sequence.hpp>
namespace boost { namespace fusion { namespace detail
{
template <typename Sequence>
struct is_native_fusion_sequence : is_base_of<sequence_root, Sequence> {};
template <typename Seq1, typename Seq2>
struct enable_equality
: mpl::or_<is_native_fusion_sequence<Seq1>, is_native_fusion_sequence<Seq2> >
{};
template <typename Seq1, typename Seq2>
struct enable_comparison
: mpl::and_<
mpl::or_<is_native_fusion_sequence<Seq1>, is_native_fusion_sequence<Seq2> >
, mpl::equal_to<result_of::size<Seq1>, result_of::size<Seq2> >
>
{};
}}}
#endif

View file

@ -46,14 +46,14 @@ namespace boost { namespace fusion
}
template <typename Seq1, typename Seq2>
inline typename disable_if<detail::is_native_fusion_sequence<Seq2>, bool>::type
inline typename disable_if<traits::is_native_fusion_sequence<Seq2>, bool>::type
operator<=(sequence_base<Seq1> const& a, Seq2 const& b)
{
return less_equal(a.derived(), b);
}
template <typename Seq1, typename Seq2>
inline typename disable_if<detail::is_native_fusion_sequence<Seq1>, bool>::type
inline typename disable_if<traits::is_native_fusion_sequence<Seq1>, bool>::type
operator<=(Seq1 const& a, sequence_base<Seq2> const& b)
{
return less_equal(a, b.derived());

View file

@ -217,6 +217,11 @@ namespace boost {
//?? not the right place ?? Lee
typedef boost::forward_traversal_tag multi_pass_input_iterator_tag;
// Forward declare graph_bundle_t property name (from
// boost/graph/properties.hpp, which includes this file) for
// bundled_result.
enum graph_bundle_t {graph_bundle};
template <typename G>
struct graph_property_type {
typedef typename G::graph_property_type type;
@ -261,6 +266,14 @@ namespace boost {
typedef typename bundler::type type;
};
template<typename Graph>
class bundled_result<Graph, graph_bundle_t> {
typedef typename graph_traits<Graph>::vertex_descriptor Vertex;
typedef graph_bundle_type<Graph> bundler;
public:
typedef typename bundler::type type;
};
} } // namespace graph::detail
namespace graph_detail {

View file

@ -284,18 +284,30 @@ namespace boost {
typedef size_type result_type;
degree_vertex_invariant(const InDegreeMap& in_degree_map, const Graph& g)
: m_in_degree_map(in_degree_map), m_g(g) { }
: m_in_degree_map(in_degree_map),
m_max_vertex_in_degree(0),
m_max_vertex_out_degree(0),
m_g(g) {
BGL_FORALL_VERTICES_T(v, g, Graph) {
m_max_vertex_in_degree =
(std::max)(m_max_vertex_in_degree, get(m_in_degree_map, v));
m_max_vertex_out_degree =
(std::max)(m_max_vertex_out_degree, out_degree(v, g));
}
}
size_type operator()(vertex_t v) const {
return (num_vertices(m_g) + 1) * out_degree(v, m_g)
return (m_max_vertex_in_degree + 1) * out_degree(v, m_g)
+ get(m_in_degree_map, v);
}
// The largest possible vertex invariant number
size_type max BOOST_PREVENT_MACRO_SUBSTITUTION () const {
return num_vertices(m_g) * num_vertices(m_g) + num_vertices(m_g);
return (m_max_vertex_in_degree + 2) * m_max_vertex_out_degree + 1;
}
private:
InDegreeMap m_in_degree_map;
size_type m_max_vertex_in_degree;
size_type m_max_vertex_out_degree;
const Graph& m_g;
};

View file

@ -126,7 +126,8 @@ namespace boost {
BOOST_DEF_PROPERTY(graph, visitor);
// These tags are used for property bundles
BOOST_DEF_PROPERTY(graph, bundle);
// BOOST_DEF_PROPERTY(graph, bundle); -- needed in graph_traits.hpp, so enum is defined there
BOOST_INSTALL_PROPERTY(graph, bundle);
BOOST_DEF_PROPERTY(vertex, bundle);
BOOST_DEF_PROPERTY(edge, bundle);

View file

@ -90,12 +90,6 @@ class reverse_graph {
typename graph::detail::bundled_result<BidirectionalGraph, Descriptor>::type const&
operator[](Descriptor x) const
{ return m_g[x]; }
typename boost::graph_property_type<base_type>::type& operator[](graph_bundle_t)
{ return get_property(*this); }
typename boost::graph_property_type<base_type>::type const& operator[](graph_bundle_t) const
{ return get_property(*this); }
#endif // BOOST_GRAPH_NO_BUNDLED_PROPERTIES
static vertex_descriptor null_vertex()

View file

@ -78,12 +78,12 @@ class subgraph {
typedef graph_traits<Graph> Traits;
typedef std::list<subgraph<Graph>*> ChildrenList;
public:
// Graph requirements
typedef typename Traits::vertex_descriptor vertex_descriptor;
typedef typename Traits::edge_descriptor edge_descriptor;
typedef typename Traits::directed_category directed_category;
typedef typename Traits::edge_parallel_category edge_parallel_category;
typedef typename Traits::traversal_category traversal_category;
// Graph requirements
typedef typename Traits::vertex_descriptor vertex_descriptor;
typedef typename Traits::edge_descriptor edge_descriptor;
typedef typename Traits::directed_category directed_category;
typedef typename Traits::edge_parallel_category edge_parallel_category;
typedef typename Traits::traversal_category traversal_category;
// IncidenceGraph requirements
typedef typename Traits::out_edge_iterator out_edge_iterator;
@ -196,12 +196,22 @@ typedef typename Traits::traversal_category traversal_category;
std::pair<vertex_descriptor, bool>
find_vertex(vertex_descriptor u_global) const {
if (is_root()) return std::make_pair(u_global, true);
typename std::map<vertex_descriptor, vertex_descriptor>::const_iterator
i = m_local_vertex.find(u_global);
typename LocalVertexMap::const_iterator i = m_local_vertex.find(u_global);
bool valid = i != m_local_vertex.end();
return std::make_pair((valid ? (*i).second : null_vertex()), valid);
}
// Is edge e (of the root graph) contained in this subgraph?
// If so, return the matching local edge.
std::pair<edge_descriptor, bool>
find_edge(edge_descriptor e_global) const {
if (is_root()) return std::make_pair(e_global, true);
typename LocalEdgeMap::const_iterator i =
m_local_edge.find(get(get(edge_index, root().m_graph), e_global));
bool valid = i != m_local_edge.end();
return std::make_pair((valid ? (*i).second : edge_descriptor()), valid);
}
// Return the parent graph.
subgraph& parent() { return *m_parent; }
const subgraph& parent() const { return *m_parent; }
@ -617,38 +627,18 @@ namespace detail {
//-------------------------------------------------------------------------
// implementation of remove_edge(e,g)
template <typename Edge, typename Graph>
void remove_edge_recur_down(Edge e_global, subgraph<Graph>& g);
template <typename Edge, typename Children>
template <typename G, typename Edge, typename Children>
void children_remove_edge(Edge e_global, Children& c)
{
for(typename Children::iterator i = c.begin(); i != c.end(); ++i) {
if((*i)->find_vertex(source(e_global, **i)).second &&
(*i)->find_vertex(target(e_global, **i)).second)
{
remove_edge_recur_down(source(e_global, **i),
target(e_global, **i),
**i);
std::pair<typename subgraph<G>::edge_descriptor, bool> found =
(*i)->find_edge(e_global);
if (!found.second) {
continue;
}
}
}
template <typename Edge, typename Graph>
void remove_edge_recur_down(Edge e_global, subgraph<Graph>& g)
{
remove_edge(g.global_to_local(e_global), g.m_graph);
children_remove_edge(e_global, g.m_children);
}
template <typename Edge, typename Graph>
void remove_edge_recur_up(Edge e_global, subgraph<Graph>& g)
{
if (g.is_root()) {
remove_edge(e_global, g.m_graph);
children_remove_edge(e_global, g.m_children);
} else {
remove_edge_recur_up(e_global, *g.m_parent);
children_remove_edge<G>(e_global, (*i)->m_children);
remove_edge(found.first, (*i)->m_graph);
}
}
@ -672,11 +662,14 @@ template <typename G>
void
remove_edge(typename subgraph<G>::edge_descriptor e, subgraph<G>& g)
{
if(g.is_root()) {
detail::remove_edge_recur_up(e, g);
} else {
detail::remove_edge_recur_up(g.local_to_global(e), g);
}
typename subgraph<G>::edge_descriptor e_global = g.local_to_global(e);
#ifndef NDEBUG
std::pair<typename subgraph<G>::edge_descriptor, bool> fe = g.find_edge(e_global);
assert(fe.second && fe.first == e);
#endif //NDEBUG
subgraph<G> &root = g.root(); // chase to root
detail::children_remove_edge<G>(e_global, root.m_children);
remove_edge(e_global, root.m_graph); // kick edge from root
}
// This is slow, but there may not be a good way to do it safely otherwise
@ -691,7 +684,7 @@ remove_edge_if(Predicate p, subgraph<G>& g) {
if (p(*ep.first)) {
any_removed = true;
remove_edge(*ep.first, g);
continue; /* Since iterators may be invalidated */
break; /* Since iterators may be invalidated */
}
}
if (!any_removed) break;

View file

@ -99,7 +99,7 @@ transitive_reduction(const Graph& g, GraphTR& tr,
{
//and run through all vertices in topological order
typename std::vector<Vertex>::reverse_iterator
rit = topo_order.rbegin();
rit = topo_order.rbegin(),
rend = topo_order.rend();
for(; rit != rend; ++rit ) {
//looking if they are successors of *it

View file

@ -11,6 +11,7 @@ Copyright (c) 2010-2010: Joachim Faulhaber
#include <boost/icl/concept/comparable.hpp>
#include <boost/icl/concept/joinable.hpp>
#include <boost/icl/concept/container.hpp>
#include <boost/icl/concept/interval_associator_base.hpp>
#include <boost/icl/concept/interval_set.hpp>
#include <boost/icl/concept/interval_map.hpp>
#include <boost/icl/concept/interval_associator.hpp>

View file

@ -119,6 +119,85 @@ singleton(const typename interval_traits<Type>::domain_type& value)
return dynamic_interval_traits<Type>::construct(value, value, interval_bounds::closed());
}
namespace detail
{
//==============================================================================
//= Construct<Interval> unit_trail == generalized singleton
// The smallest interval on an incrementable (and decrementable) type that can
// be constructed using ++ and -- and such that it contains a given value.
// If 'Type' is discrete, 'unit_trail' and 'singleton' are identical. So we
// can view 'unit_trail' as a generalized singleton for static intervals of
// continuous types.
//==============================================================================
template<class Type>
typename enable_if
<
mpl::and_< is_static_right_open<Type>
, boost::detail::is_incrementable<typename interval_traits<Type>::domain_type> >
, Type
>::type
unit_trail(const typename interval_traits<Type>::domain_type& value)
{
return interval_traits<Type>::construct(value, icl::succ(value));
}
template<class Type>
typename enable_if
<
mpl::and_< is_static_left_open<Type>
, boost::detail::is_incrementable<typename interval_traits<Type>::domain_type> >
, Type
>::type
unit_trail(const typename interval_traits<Type>::domain_type& value)
{
typedef typename interval_traits<Type>::domain_type domain_type;
BOOST_ASSERT((numeric_minimum<domain_type, is_numeric<domain_type>::value >::is_less_than(value) ));
return interval_traits<Type>::construct(icl::pred(value), value);
}
template<class Type>
typename enable_if
<
mpl::and_< is_static_open<Type>
, is_discrete<typename interval_traits<Type>::domain_type> >
, Type
>::type
unit_trail(const typename interval_traits<Type>::domain_type& value)
{
typedef typename interval_traits<Type>::domain_type domain_type;
BOOST_ASSERT((numeric_minimum<domain_type, is_numeric<domain_type>::value >::is_less_than(value)));
return interval_traits<Type>::construct(icl::pred(value), icl::succ(value));
}
template<class Type>
typename enable_if
<
mpl::and_< is_static_closed<Type>
, is_discrete<typename interval_traits<Type>::domain_type> >
, Type
>::type
unit_trail(const typename interval_traits<Type>::domain_type& value)
{
return interval_traits<Type>::construct(value, value);
}
//NOTE: statically bounded closed or open intervals of continuous domain types
// are NOT supported by ICL. They can not be used with interval containers
// consistently.
template<class Type>
typename enable_if<has_dynamic_bounds<Type>, Type>::type
unit_trail(const typename interval_traits<Type>::domain_type& value)
{
return dynamic_interval_traits<Type>::construct(value, value, interval_bounds::closed());
}
} //namespace detail
//==============================================================================
//= Construct<Interval> multon
//==============================================================================
@ -1341,7 +1420,6 @@ operator << (std::basic_ostream<CharType, CharTraits> &stream, Type const& objec
<< right_bracket<Type>(object) ;
}
}} // namespace icl boost
#endif

View file

@ -202,7 +202,6 @@ distance(const Type& object)
return dist;
}
//==============================================================================
//= Range<IntervalSet|IntervalMap>
//==============================================================================
@ -220,23 +219,25 @@ hull(const Type& object)
template<class Type>
typename enable_if<is_interval_container<Type>,
typename Type::interval_type>::type
typename domain_type_of<Type>::type>::type
lower(const Type& object)
{
typedef typename domain_type_of<Type>::type DomainT;
return
icl::is_empty(object)
? identity_element<typename Type::interval_type>::value()
? unit_element<DomainT>::value()
: icl::lower( key_value<Type>(object.begin()) );
}
template<class Type>
typename enable_if<is_interval_container<Type>,
typename Type::interval_type>::type
typename domain_type_of<Type>::type>::type
upper(const Type& object)
{
typedef typename domain_type_of<Type>::type DomainT;
return
icl::is_empty(object)
? identity_element<typename Type::interval_type>::value()
? identity_element<DomainT>::value()
: icl::upper( key_value<Type>(object.rbegin()) );
}
@ -244,26 +245,28 @@ upper(const Type& object)
template<class Type>
typename enable_if
< mpl::and_< is_interval_container<Type>
, is_discrete<typename Type::domain_type> >
, typename Type::interval_type>::type
, is_discrete<typename domain_type_of<Type>::type> >
, typename domain_type_of<Type>::type>::type
first(const Type& object)
{
typedef typename domain_type_of<Type>::type DomainT;
return
icl::is_empty(object)
? identity_element<typename Type::interval_type>::value()
? unit_element<DomainT>::value()
: icl::first( key_value<Type>(object.begin()) );
}
template<class Type>
typename enable_if
< mpl::and_< is_interval_container<Type>
, is_discrete<typename Type::domain_type> >
, typename Type::interval_type>::type
, is_discrete<typename domain_type_of<Type>::type> >
, typename domain_type_of<Type>::type>::type
last(const Type& object)
{
typedef typename domain_type_of<Type>::type DomainT;
return
icl::is_empty(object)
? identity_element<typename Type::interval_type>::value()
? identity_element<DomainT>::value()
: icl::last( key_value<Type>(object.rbegin()) );
}
@ -646,7 +649,7 @@ operator & (Type object, const Type& operand)
//------------------------------------------------------------------------------
template<class Type, class CoType>
typename enable_if<mpl::and_< is_interval_container<Type>
, is_same<CoType, domain_type_of<Type> > >,
, boost::is_same<CoType, typename domain_type_of<Type>::type> >,
bool>::type
intersects(const Type& left, const CoType& right)
{
@ -655,13 +658,14 @@ intersects(const Type& left, const CoType& right)
template<class Type, class CoType>
typename enable_if<mpl::and_< is_interval_container<Type>
, is_same<CoType, interval_type_of<Type> > >,
, boost::is_same<CoType, typename interval_type_of<Type>::type> >,
bool>::type
intersects(const Type& left, const CoType& right)
{
return left.find(right) != left.end();
}
template<class LeftT, class RightT>
typename enable_if< mpl::and_< is_intra_combinable<LeftT, RightT>
, mpl::or_<is_total<LeftT>, is_total<RightT> > >
@ -720,15 +724,6 @@ intersects(const LeftT& left, const RightT& right)
return false;
}
template<class Type, class AssociateT>
typename enable_if<mpl::and_< is_interval_map<Type>
, is_inter_derivative<Type, AssociateT> >,
bool>::type
intersects(const Type& left, const AssociateT& right)
{
return icl::intersects(left, right);
}
/** \b Returns true, if \c left and \c right have no common elements.
Intervals are interpreted as sequence of elements.
\b Complexity: loglinear, if \c left and \c right are interval containers. */
@ -750,6 +745,7 @@ disjoint(const Type& left, const AssociateT& right)
return !intersects(left,right);
}
//==============================================================================
//= Symmetric difference<IntervalSet|IntervalSet>
//==============================================================================
@ -895,51 +891,6 @@ elements_rend(const Type& object)
return typename Type::element_const_reverse_iterator(object.rend());
}
//==============================================================================
//= Morphisms
//==============================================================================
template<class Type>
typename enable_if<is_interval_container<Type>, Type>::type&
join(Type& object)
{
typedef typename Type::interval_type interval_type;
typedef typename Type::iterator iterator;
iterator it_ = object.begin();
if(it_ == object.end())
return object;
iterator next_ = it_; next_++;
while(next_ != object.end())
{
if( segmental::is_joinable<Type>(it_, next_) )
{
iterator fst_mem = it_; // hold the first member
// Go on while touching members are found
it_++; next_++;
while( next_ != object.end()
&& segmental::is_joinable<Type>(it_, next_) )
{ it_++; next_++; }
// finally we arrive at the end of a sequence of joinable intervals
// and it points to the last member of that sequence
const_cast<interval_type&>(key_value<Type>(it_))
= hull(key_value<Type>(it_), key_value<Type>(fst_mem));
object.erase(fst_mem, it_);
it_++; next_=it_;
if(next_!=object.end())
next_++;
}
else { it_++; next_++; }
}
return object;
}
}} // namespace boost icl
#endif

View file

@ -0,0 +1,149 @@
/*-----------------------------------------------------------------------------+
Copyright (c) 2011-2011: Joachim Faulhaber
+------------------------------------------------------------------------------+
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENCE.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
+-----------------------------------------------------------------------------*/
#ifndef BOOST_ICL_CONCEPT_INTERVAL_ASSOCIATOR_BASE_HPP_JOFA_110301
#define BOOST_ICL_CONCEPT_INTERVAL_ASSOCIATOR_BASE_HPP_JOFA_110301
#include <boost/icl/type_traits/domain_type_of.hpp>
#include <boost/icl/type_traits/interval_type_of.hpp>
#include <boost/icl/type_traits/is_combinable.hpp>
#include <boost/icl/concept/set_value.hpp>
#include <boost/icl/concept/map_value.hpp>
#include <boost/icl/concept/interval.hpp>
namespace boost{ namespace icl
{
//==============================================================================
//= Selection<IntervalSet|IntervalMap>
//==============================================================================
template<class Type>
typename enable_if<mpl::and_< is_interval_container<Type>
, is_discrete<typename domain_type_of<Type>::type>
>
, typename Type::const_iterator>::type
find(const Type& object, const typename domain_type_of<Type>::type& key_val)
{
typedef typename Type::const_iterator const_iterator;
typedef typename Type::interval_type interval_type;
return object.find(icl::detail::unit_trail<interval_type>(key_val));
}
template<class Type>
typename enable_if<mpl::and_< is_interval_container<Type>
, is_continuous<typename domain_type_of<Type>::type>
, has_dynamic_bounds<typename interval_type_of<Type>::type>
>
, typename Type::const_iterator>::type
find(const Type& object, const typename domain_type_of<Type>::type& key_val)
{
typedef typename Type::const_iterator const_iterator;
typedef typename Type::interval_type interval_type;
return object.find(icl::singleton<interval_type>(key_val));
}
template<class Type>
typename enable_if<mpl::and_< is_interval_container<Type>
, is_continuous<typename domain_type_of<Type>::type>
, is_static_right_open<typename interval_type_of<Type>::type>
, boost::detail::is_incrementable<typename domain_type_of<Type>::type>
>
, typename Type::const_iterator>::type
find(const Type& object, const typename domain_type_of<Type>::type& key_val)
{
typedef typename Type::const_iterator const_iterator;
typedef typename Type::interval_type interval_type;
const_iterator first_collision = object.lower_bound(icl::detail::unit_trail<interval_type>(key_val));
// A part of the unit_trail(key_value)-interval may be found in the container, that
// does not contain key_value. Therefore we have to check for its existence:
return ( first_collision == object.end()
|| icl::contains(key_value<Type>(first_collision), key_val) )
? first_collision
: object.end();
}
template<class Type>
typename enable_if<mpl::and_< is_interval_container<Type>
, is_continuous<typename domain_type_of<Type>::type>
, is_static_left_open<typename interval_type_of<Type>::type>
, boost::detail::is_incrementable<typename domain_type_of<Type>::type>
>
, typename Type::const_iterator>::type
find(const Type& object, const typename domain_type_of<Type>::type& key_val)
{
typedef typename Type::const_iterator const_iterator;
typedef typename Type::interval_type interval_type;
const_iterator last_collision = object.upper_bound(icl::detail::unit_trail<interval_type>(key_val));
if(last_collision != object.begin())
--last_collision;
// A part of the unit_trail(key_value)-interval may be found in the container, that
// does not contain key_value. Therefore we have to check for its existence:
return ( last_collision == object.end()
|| icl::contains(key_value<Type>(last_collision), key_val) )
? last_collision
: object.end();
}
// NOTE: find(object, key) won't compile if key is of continuous type that does
// not implement in(de)crementation (e.g. std::string).
template<class Type>
typename enable_if< is_interval_container<Type>
, typename Type::const_iterator>::type
find(const Type& object, const typename interval_type_of<Type>::type& inter_val)
{
return object.find(inter_val);
}
//==============================================================================
//= Morphisms
//==============================================================================
template<class Type>
typename enable_if<is_interval_container<Type>, Type>::type&
join(Type& object)
{
typedef typename Type::interval_type interval_type;
typedef typename Type::iterator iterator;
iterator it_ = object.begin();
if(it_ == object.end())
return object;
iterator next_ = it_; next_++;
while(next_ != object.end())
{
if( segmental::is_joinable<Type>(it_, next_) )
{
iterator fst_mem = it_; // hold the first member
// Go on while touching members are found
it_++; next_++;
while( next_ != object.end()
&& segmental::is_joinable<Type>(it_, next_) )
{ it_++; next_++; }
// finally we arrive at the end of a sequence of joinable intervals
// and it points to the last member of that sequence
const_cast<interval_type&>(key_value<Type>(it_))
= hull(key_value<Type>(it_), key_value<Type>(fst_mem));
object.erase(fst_mem, it_);
it_++; next_=it_;
if(next_!=object.end())
next_++;
}
else { it_++; next_++; }
}
return object;
}
}} // namespace boost icl
#endif

View file

@ -22,11 +22,6 @@ Copyright (c) 2010-2010: Joachim Faulhaber
namespace boost{ namespace icl
{
template<class Type>
typename enable_if<is_interval_container<Type>, Type>::type&
join(Type&);
template<class Type>
inline typename enable_if<is_interval_map<Type>, typename Type::segment_type>::type
make_segment(const typename Type::element_type& element)
@ -36,6 +31,7 @@ make_segment(const typename Type::element_type& element)
return segment_type(icl::singleton<interval_type>(element.key), element.data);
}
//==============================================================================
//= Containedness<IntervalMap>
//==============================================================================
@ -47,7 +43,7 @@ typename enable_if<is_interval_map<Type>, bool>::type
contains(const Type& super, const typename Type::element_type& key_value_pair)
{
typedef typename Type::const_iterator const_iterator;
const_iterator it_ = super.find(key_value_pair.key);
const_iterator it_ = icl::find(super, key_value_pair.key);
return it_ != super.end() && it_->second == key_value_pair.data;
}
@ -433,7 +429,8 @@ add_intersection(Type& section, const Type& object, const KeySetT& key_set)
template<class Type, class OperandT>
typename enable_if<mpl::and_< is_interval_map<Type>
, is_total<Type>
, is_same<OperandT, segment_type_of<Type> > >,
, boost::is_same< OperandT
, typename segment_type_of<Type>::type> >,
bool>::type
intersects(const Type&, const OperandT&)
{
@ -443,18 +440,18 @@ intersects(const Type&, const OperandT&)
template<class Type, class OperandT>
typename enable_if<mpl::and_< is_interval_map<Type>
, mpl::not_<is_total<Type> >
, is_same<OperandT, segment_type_of<Type> > >,
, boost::is_same<OperandT, typename segment_type_of<Type>::type> >,
bool>::type
intersects(const Type& object, const OperandT& operand)
{
Type intersection;
icl::add_intersection(intersection, left, operand);
icl::add_intersection(intersection, object, operand);
return !icl::is_empty(intersection);
}
template<class Type, class OperandT>
typename enable_if<mpl::and_< is_interval_map<Type>
, is_same<OperandT, element_type_of<Type> > >,
, boost::is_same<OperandT, typename element_type_of<Type>::type> >,
bool>::type
intersects(const Type& object, const OperandT& operand)
{

View file

@ -9,6 +9,7 @@ Copyright (c) 2010-2010: Joachim Faulhaber
#define BOOST_ICL_CONCEPT_INTERVAL_SET_HPP_JOFA_100920
#include <boost/icl/type_traits/is_combinable.hpp>
#include <boost/icl/type_traits/interval_type_of.hpp>
#include <boost/icl/detail/set_algo.hpp>
#include <boost/icl/detail/interval_set_algo.hpp>
#include <boost/icl/concept/interval.hpp>
@ -26,7 +27,7 @@ template<class Type>
typename enable_if<is_interval_set<Type>, bool>::type
contains(const Type& super, const typename Type::element_type& element)
{
return !(super.find(element) == super.end());
return !(icl::find(super, element) == super.end());
}
template<class Type>
@ -173,7 +174,7 @@ add_intersection(Type& section, const Type& object,
const typename Type::element_type& operand)
{
typedef typename Type::const_iterator const_iterator;
const_iterator found = object.find(operand);
const_iterator found = icl::find(object, operand);
if(found != object.end())
icl::add(section, operand);
}

View file

@ -253,20 +253,22 @@ public:
//==========================================================================
/** Find the interval value pair, that contains \c key */
const_iterator find(const domain_type& key)const
const_iterator find(const domain_type& key_value)const
{
return _map.find(interval_type(key));
return icl::find(*this, key_value);
}
const_iterator find(const interval_type& key)const
/** Find the first interval value pair, that collides with interval
\c key_interval */
const_iterator find(const interval_type& key_interval)const
{
return _map.find(key);
return _map.find(key_interval);
}
/** Total select function. */
codomain_type operator()(const domain_type& key)const
codomain_type operator()(const domain_type& key_value)const
{
const_iterator it_ = _map.find(interval_type(key));
const_iterator it_ = icl::find(*this, key_value);
return it_==end() ? identity_element<codomain_type>::value()
: it_->second;
}

View file

@ -201,15 +201,17 @@ public:
//= Selection
//==========================================================================
/** Find the interval value pair, that contains element \c key */
const_iterator find(const element_type& key)const
/** Find the interval, that contains element \c key_value */
const_iterator find(const element_type& key_value)const
{
return this->_set.find(icl::singleton<segment_type>(key));
return icl::find(*this, key_value);
//CL return this->_set.find(icl::singleton<segment_type>(key));
}
const_iterator find(const segment_type& segment)const
/** Find the first interval, that collides with interval \c key_interval */
const_iterator find(const interval_type& key_interval)const
{
return this->_set.find(segment);
return this->_set.find(key_interval);
}
//==========================================================================

View file

@ -59,7 +59,7 @@ namespace boost{namespace icl
struct has_inverse<boost::rational<Integral> >
{
typedef has_inverse type;
BOOST_STATIC_CONSTANT(bool, value = (is_signed<Integral>::value));
BOOST_STATIC_CONSTANT(bool, value = (boost::is_signed<Integral>::value));
};
}} // namespace icl boost

View file

@ -18,7 +18,7 @@ namespace boost{ namespace icl
{
typedef has_inverse<Type> type;
BOOST_STATIC_CONSTANT(bool,
value = (type_traits::ice_or<is_signed<Type>::value,
value = (type_traits::ice_or<boost::is_signed<Type>::value,
is_floating_point<Type>::value>::value));
};

View file

@ -25,7 +25,7 @@ struct is_overloadable
{
typedef is_overloadable<Type> type;
BOOST_STATIC_CONSTANT(bool, value =
(is_same<Type, typename Type::overloadable_type>::value)
(boost::is_same<Type, typename Type::overloadable_type>::value)
);
};
@ -36,8 +36,8 @@ struct is_codomain_equal
{
typedef is_codomain_equal<LeftT, RightT> type;
BOOST_STATIC_CONSTANT(bool, value =
(is_same<typename LeftT::codomain_type,
typename RightT::codomain_type>::value)
(boost::is_same<typename LeftT::codomain_type,
typename RightT::codomain_type>::value)
);
};
@ -47,8 +47,8 @@ struct is_key_compare_equal
{
typedef is_key_compare_equal<LeftT, RightT> type;
BOOST_STATIC_CONSTANT(bool, value =
(is_same<typename LeftT::key_compare,
typename RightT::key_compare>::value)
(boost::is_same<typename LeftT::key_compare,
typename RightT::key_compare>::value)
);
};

View file

@ -42,8 +42,8 @@ namespace boost{ namespace icl
BOOST_STATIC_CONSTANT(bool,
value = (mpl::and_< is_container<Type>
, detail::has_key_type<Type>
, is_same< typename key_type_of<Type>::type
, typename value_type_of<Type>::type >
, boost::is_same< typename key_type_of<Type>::type
, typename value_type_of<Type>::type >
, mpl::not_<detail::has_segment_type<Type> >
>::value )
);

View file

@ -64,7 +64,7 @@ namespace boost{ namespace icl
typedef is_strict_key_container_of<KeyT, ObjectT> type;
BOOST_STATIC_CONSTANT(bool, value =
(mpl::and_< is_map<ObjectT>
, is_same<KeyT, typename key_container_type_of<ObjectT>::type> >::value)
, boost::is_same<KeyT, typename key_container_type_of<ObjectT>::type> >::value)
);
};
@ -75,7 +75,7 @@ namespace boost{ namespace icl
BOOST_STATIC_CONSTANT(bool, value =
(mpl::or_< is_strict_key_container_of<KeyT, ObjectT>
, mpl::and_< mpl::or_<is_set<ObjectT>, is_map<ObjectT> >
, is_same<ObjectT, KeyT> > >::value)
, boost::is_same<ObjectT, KeyT> > >::value)
);
};

View file

@ -14,10 +14,17 @@ Copyright (c) 2010-2010: Joachim Faulhaber
namespace boost{ namespace icl
{
template <class Type> struct is_fixed_numeric
{
typedef is_fixed_numeric type;
BOOST_STATIC_CONSTANT(bool, value = (0 < std::numeric_limits<Type>::digits));
};
template <class Type> struct is_numeric
{
typedef is_numeric type;
BOOST_STATIC_CONSTANT(bool, value = (0 < std::numeric_limits<Type>::digits));
BOOST_STATIC_CONSTANT(bool, value =
(mpl::or_<is_fixed_numeric<Type>, is_integral<Type> >::value) );
};
template <class Type>

View file

@ -1,222 +0,0 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2009. 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/libs/interprocess for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_INTERPROCESS_XSI_SHARED_MEMORY_HPP
#define BOOST_INTERPROCESS_XSI_SHARED_MEMORY_HPP
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#include <boost/detail/workaround.hpp>
#if defined(BOOST_INTERPROCESS_WINDOWS)
#error "This header can't be used in Windows operating systems"
#endif
#include <boost/interprocess/creation_tags.hpp>
#include <boost/interprocess/exceptions.hpp>
#include <boost/interprocess/detail/utilities.hpp>
#include <boost/interprocess/detail/os_file_functions.hpp>
#include <boost/interprocess/interprocess_fwd.hpp>
#include <boost/interprocess/exceptions.hpp>
#include <sys/shm.h>
#include <cstddef>
#include <boost/cstdint.hpp>
#include <string>
//!\file
//!Describes a class representing a native xsi shared memory.
namespace boost {
namespace interprocess {
//!A class that wraps XSI (System V) shared memory.
//!Unlike shared_memory_object, xsi_shared_memory needs a valid
//!path and a 8 bit key to identify a shared memory create
//!when all processes destroy all their xsi_shared_memory
//!objects and mapped regions for the same shared memory
//!or the processes end/crash.
//!
//!Warning: XSI shared memory and interprocess portable
//!shared memory (boost::interprocess::shared_memory_object)
//!can't communicate between them.
class xsi_shared_memory
{
/// @cond
//Non-copyable and non-assignable
xsi_shared_memory(xsi_shared_memory &);
xsi_shared_memory &operator=(xsi_shared_memory &);
/// @endcond
public:
BOOST_INTERPROCESS_ENABLE_MOVE_EMULATION(xsi_shared_memory)
//!Default constructor.
//!Represents an empty xsi_shared_memory.
xsi_shared_memory();
//!Creates a new XSI shared memory with a key obtained from a call to ftok (with path
//!"path" and id "id"), of size "size" and permissions "perm".
//!If the shared memory previously exists, throws an error.
xsi_shared_memory(create_only_t, const char *path, boost::uint8_t id, std::size_t size, int perm = 0666)
{ this->priv_open_or_create(detail::DoCreate, path, id, perm, size); }
//!Tries to create a new XSI shared memory with a key obtained from a call to ftok (with path
//!"path" and id "id"), of size "size" and permissions "perm".
//!If the shared memory previously exists, it tries to open it.
//!Otherwise throws an error.
xsi_shared_memory(open_or_create_t, const char *path, boost::uint8_t id, std::size_t size, int perm = 0666)
{ this->priv_open_or_create(detail::DoOpenOrCreate, path, id, perm, size); }
//!Tries to open a XSI shared memory with a key obtained from a call to ftok (with path
//!"path" and id "id") and permissions "perm".
//!If the shared memory does not previously exist, it throws an error.
xsi_shared_memory(open_only_t, const char *path, boost::uint8_t id, int perm = 0666)
{ this->priv_open_or_create(detail::DoOpen, path, id, perm, 0); }
//!Moves the ownership of "moved"'s shared memory object to *this.
//!After the call, "moved" does not represent any shared memory object.
//!Does not throw
xsi_shared_memory(BOOST_INTERPROCESS_RV_REF(xsi_shared_memory) moved)
{ this->swap(moved); }
//!Moves the ownership of "moved"'s shared memory to *this.
//!After the call, "moved" does not represent any shared memory.
//!Does not throw
xsi_shared_memory &operator=(BOOST_INTERPROCESS_RV_REF(xsi_shared_memory) moved)
{
xsi_shared_memory tmp(boost::interprocess::move(moved));
this->swap(tmp);
return *this;
}
//!Swaps two xsi_shared_memorys. Does not throw
void swap(xsi_shared_memory &other);
//!Destroys *this. The shared memory won't be destroyed, just
//!this connection to it. Use remove() to destroy the shared memory.
~xsi_shared_memory();
//!Returns the path used to
//!obtain the key.
const char *get_path() const;
//!Returns the shared memory ID that
//!identifies the shared memory
int get_shmid() const;
//!Returns access
//!permissions
int get_permissions() const;
//!Returns the mapping handle.
//!Never throws
mapping_handle_t get_mapping_handle() const;
//!Erases the XSI shared memory object identified by shmid
//!from the system.
//!Returns false on error. Never throws
static bool remove(int shmid);
/// @cond
private:
//!Closes a previously opened file mapping. Never throws.
bool priv_open_or_create( detail::create_enum_t type
, const char *filename
, boost::uint8_t id
, int perm
, std::size_t size);
int m_shmid;
/// @endcond
};
/// @cond
inline xsi_shared_memory::xsi_shared_memory()
: m_shmid(-1)
{}
inline xsi_shared_memory::~xsi_shared_memory()
{}
inline int xsi_shared_memory::get_shmid() const
{ return m_shmid; }
inline void xsi_shared_memory::swap(xsi_shared_memory &other)
{
std::swap(m_shmid, other.m_shmid);
}
inline mapping_handle_t xsi_shared_memory::get_mapping_handle() const
{ mapping_handle_t mhnd = { m_shmid, true}; return mhnd; }
inline bool xsi_shared_memory::priv_open_or_create
(detail::create_enum_t type, const char *filename, boost::uint8_t id, int perm, std::size_t size)
{
key_t key;
if(filename){
key = ::ftok(filename, id);
if(((key_t)-1) == key){
error_info err = system_error_code();
throw interprocess_exception(err);
}
}
else{
key = IPC_PRIVATE;
}
perm &= 0x01FF;
int shmflg = perm;
switch(type){
case detail::DoOpen:
shmflg |= 0;
break;
case detail::DoCreate:
shmflg |= IPC_CREAT | IPC_EXCL;
break;
case detail::DoOpenOrCreate:
shmflg |= IPC_CREAT;
break;
default:
{
error_info err = other_error;
throw interprocess_exception(err);
}
}
int ret = ::shmget(key, size, shmflg);
int shmid = ret;
if((type == detail::DoOpen) && (-1 != ret)){
//Now get the size
::shmid_ds xsi_ds;
ret = ::shmctl(ret, IPC_STAT, &xsi_ds);
size = xsi_ds.shm_segsz;
}
if(-1 == ret){
error_info err = system_error_code();
throw interprocess_exception(err);
}
m_shmid = shmid;
return true;
}
inline bool xsi_shared_memory::remove(int shmid)
{ return -1 != ::shmctl(shmid, IPC_RMID, 0); }
///@endcond
} //namespace interprocess {
} //namespace boost {
#include <boost/interprocess/detail/config_end.hpp>
#endif //BOOST_INTERPROCESS_XSI_SHARED_MEMORY_HPP

View file

@ -22,6 +22,10 @@
#include <climits> // for CHAR_MIN
#include <boost/detail/workaround.hpp>
#ifdef BOOST_MSVC
#pragma warning(push)
#pragma warning(disable:4127 4244) // Conditional expression is constant
#endif
namespace boost
{
@ -519,5 +523,8 @@ lcm
} // namespace math
} // namespace boost
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#endif // BOOST_MATH_COMMON_FACTOR_RT_HPP

View file

@ -79,7 +79,7 @@ namespace boost
T y = x - 1;
// approximation by taylor series in y at 0 up to order 2
T result = sqrt(2 * y) * (1 + y /12 + 3 * y * y / 160);
T result = sqrt(2 * y) * (1 - y /12 + 3 * y * y / 160);
return result;
}
}

File diff suppressed because it is too large Load diff

View file

@ -14,7 +14,13 @@ namespace boost { namespace polygon{
inline void polygon_set_data<coordinate_type>::clean() const {
if(dirty_) {
polygon_45_set_data<coordinate_type> tmp;
if(downcast(tmp) ) {
//very important:
//the 45 degree algorithm does not satisfy
//the precondition of arbitrary polygon formation
//that vertices be "linearly consistent"
//therefore it doesn't work to fall back on 45-degree
//booleans for arbitrary angle polygons
if(0) { //downcast(tmp) ) {
tmp.clean();
data_.clear();
is_45_ = true;

View file

@ -179,6 +179,9 @@ namespace boost { namespace property_tree { namespace json_parser
{
using namespace boost::spirit::classic;
// There's a boost::assertion too, so another explicit using
// here:
using boost::spirit::classic::assertion;
// Assertions
assertion<std::string> expect_object("expected object");

View file

@ -11,6 +11,7 @@
#include <iostream>
#include <boost/preprocessor/stringize.hpp>
#include <boost/ref.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/proto/proto_fwd.hpp>
#include <boost/proto/traits.hpp>
@ -108,32 +109,16 @@ namespace boost { namespace proto
}
}
namespace functional
namespace detail
{
/// \brief Pretty-print a Proto expression tree.
///
/// A PolymorphicFunctionObject which accepts a Proto expression
/// tree and pretty-prints it to an \c ostream for debugging
/// purposes.
struct display_expr
struct display_expr_impl
{
BOOST_PROTO_CALLABLE()
typedef void result_type;
/// \param sout The \c ostream to which the expression tree
/// will be written.
/// \param depth The starting indentation depth for this node.
/// Children nodes will be displayed at a starting
/// depth of <tt>depth+4</tt>.
explicit display_expr(std::ostream &sout = std::cout, int depth = 0)
explicit display_expr_impl(std::ostream &sout, int depth = 0)
: depth_(depth)
, first_(true)
, sout_(sout)
{}
/// \brief Pretty-print the current node in a Proto expression
/// tree.
template<typename Expr>
void operator()(Expr const &expr) const
{
@ -141,8 +126,8 @@ namespace boost { namespace proto
}
private:
display_expr(display_expr const &);
display_expr &operator =(display_expr const &);
display_expr_impl(display_expr_impl const &);
display_expr_impl &operator =(display_expr_impl const &);
template<typename Expr>
void impl(Expr const &expr, mpl::long_<0>) const
@ -163,7 +148,7 @@ namespace boost { namespace proto
this->sout_.width(this->depth_);
this->sout_ << (this->first_? "" : ", ");
this->sout_ << tag() << "(\n";
display_expr display(this->sout_, this->depth_ + 4);
display_expr_impl display(this->sout_, this->depth_ + 4);
fusion::for_each(expr, display);
this->sout_.width(this->depth_);
this->sout_ << "" << ")\n";
@ -176,6 +161,43 @@ namespace boost { namespace proto
};
}
namespace functional
{
/// \brief Pretty-print a Proto expression tree.
///
/// A PolymorphicFunctionObject which accepts a Proto expression
/// tree and pretty-prints it to an \c ostream for debugging
/// purposes.
struct display_expr
{
BOOST_PROTO_CALLABLE()
typedef void result_type;
/// \param sout The \c ostream to which the expression tree
/// will be written.
/// \param depth The starting indentation depth for this node.
/// Children nodes will be displayed at a starting
/// depth of <tt>depth+4</tt>.
explicit display_expr(std::ostream &sout = std::cout, int depth = 0)
: depth_(depth)
, sout_(sout)
{}
/// \brief Pretty-print the current node in a Proto expression
/// tree.
template<typename Expr>
void operator()(Expr const &expr) const
{
detail::display_expr_impl(this->sout_, this->depth_)(expr);
}
private:
int depth_;
reference_wrapper<std::ostream> sout_;
};
}
/// \brief Pretty-print a Proto expression tree.
///
/// \note Equivalent to <tt>functional::display_expr(0, sout)(expr)</tt>

View file

@ -178,7 +178,7 @@
expr_type;
typedef typename unref_expr::proto_generator proto_generator;
typedef typename BOOST_PROTO_RESULT_OF<proto_generator(expr_type)>::type result_type;
typedef typename BOOST_PROTO_RESULT_OF<proto_generator(expr_type)>::type const result_type;
result_type const operator ()(
typename pass_through_impl::expr_param e

View file

@ -507,12 +507,12 @@ namespace boost
nolock_force_unique_connection_list();
return connection_body_type(new connection_body<group_key_type, slot_type, Mutex>(slot));
}
void do_disconnect(const group_type &group, mpl::bool_<true> is_group)
void do_disconnect(const group_type &group, mpl::bool_<true> /* is_group */)
{
disconnect(group);
}
template<typename T>
void do_disconnect(const T &slot, mpl::bool_<false> is_group)
void do_disconnect(const T &slot, mpl::bool_<false> /* is_group */)
{
shared_ptr<invocation_state> local_state =
get_readable_state();

View file

@ -63,6 +63,11 @@
# else
# define BOOST_TR1_STD_HEADER(name) <../stlport/name>
# endif
# elif defined(__PATHSCALE__) && (defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER))
# define BOOST_TR1_STD_HEADER(name) <../include/name>
# elif defined(__SUNPRO_CC) && (defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER))
# define BOOST_TR1_STD_HEADER(name) <../stdcxx4/name>
# elif defined(__HP_aCC)
// HP aCC include path:

View file

@ -128,7 +128,12 @@ template <class T> struct hash;
}
namespace std{ namespace tr1{
using ::boost::hash;
//using ::boost::hash;
template <class T>
struct hash : public boost::hash<T>
{
};
}}

View file

@ -160,6 +160,11 @@ namespace boost
~unordered_map() {}
#if !defined(BOOST_NO_RVALUE_REFERENCES)
unordered_map(unordered_map const& other)
: table_(other.table_)
{
}
unordered_map(unordered_map&& other)
: table_(other.table_, boost::unordered_detail::move_tag())
{
@ -170,6 +175,12 @@ namespace boost
{
}
unordered_map& operator=(unordered_map const& x)
{
table_ = x.table_;
return *this;
}
unordered_map& operator=(unordered_map&& x)
{
table_.move(x.table_);
@ -705,6 +716,11 @@ namespace boost
~unordered_multimap() {}
#if !defined(BOOST_NO_RVALUE_REFERENCES)
unordered_multimap(unordered_multimap const& other)
: table_(other.table_)
{
}
unordered_multimap(unordered_multimap&& other)
: table_(other.table_, boost::unordered_detail::move_tag())
{
@ -715,6 +731,12 @@ namespace boost
{
}
unordered_multimap& operator=(unordered_multimap const& x)
{
table_ = x.table_;
return *this;
}
unordered_multimap& operator=(unordered_multimap&& x)
{
table_.move(x.table_);

View file

@ -154,6 +154,11 @@ namespace boost
~unordered_set() {}
#if !defined(BOOST_NO_RVALUE_REFERENCES)
unordered_set(unordered_set const& other)
: table_(other.table_)
{
}
unordered_set(unordered_set&& other)
: table_(other.table_, boost::unordered_detail::move_tag())
{
@ -164,6 +169,12 @@ namespace boost
{
}
unordered_set& operator=(unordered_set const& x)
{
table_ = x.table_;
return *this;
}
unordered_set& operator=(unordered_set&& x)
{
table_.move(x.table_);
@ -651,6 +662,11 @@ namespace boost
~unordered_multiset() {}
#if !defined(BOOST_NO_RVALUE_REFERENCES)
unordered_multiset(unordered_multiset const& other)
: table_(other.table_)
{
}
unordered_multiset(unordered_multiset&& other)
: table_(other.table_, boost::unordered_detail::move_tag())
{
@ -661,6 +677,12 @@ namespace boost
{
}
unordered_multiset& operator=(unordered_multiset const& x)
{
table_ = x.table_;
return *this;
}
unordered_multiset& operator=(unordered_multiset&& x)
{
table_.move(x.table_);

View file

@ -19,7 +19,7 @@
// BOOST_VERSION / 100 % 1000 is the minor version
// BOOST_VERSION / 100000 is the major version
#define BOOST_VERSION 104600
#define BOOST_VERSION 104601
//
// BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
@ -27,7 +27,7 @@
// number, y is the minor version number, and z is the patch level if not 0.
// This is used by <config/auto_link.hpp> to select which library version to link to.
#define BOOST_LIB_VERSION "1_46"
#define BOOST_LIB_VERSION "1_46_1"
#endif