Updating to boost 1.50
This commit is contained in:
parent
ad859ee002
commit
0f7f32d96f
5
.gitignore
vendored
5
.gitignore
vendored
@ -38,6 +38,11 @@ nosetests.xml
|
||||
# custom
|
||||
indexer_tests
|
||||
|
||||
# When we use the bcp tool to copy over the parts of boost we care about, it
|
||||
# also copies some cruft files we don't need; this ignores them
|
||||
cpp/BoostParts/libs/*/build
|
||||
cpp/BoostParts/libs/*/test
|
||||
|
||||
# These folders in cpp/llvm contain lots of upstream cruft we don't care
|
||||
# about and would rather not have in our tree...
|
||||
cpp/llvm/docs/*
|
||||
|
@ -43,23 +43,29 @@ if( to_remove )
|
||||
list( REMOVE_ITEM SOURCES ${to_remove} )
|
||||
endif()
|
||||
|
||||
set( WINSOURCES
|
||||
set( COMMON_SOURCES
|
||||
libs/thread/src/future.cpp
|
||||
)
|
||||
|
||||
set( WIN_SOURCES
|
||||
libs/thread/src/win32/thread.cpp
|
||||
libs/thread/src/win32/timeconv.inl
|
||||
libs/thread/src/win32/tss_dll.cpp
|
||||
libs/thread/src/win32/tss_pe.cpp
|
||||
)
|
||||
|
||||
set( UNIXSOURCES
|
||||
set( UNIX_SOURCES
|
||||
libs/thread/src/pthread/once.cpp
|
||||
libs/thread/src/pthread/thread.cpp
|
||||
libs/thread/src/pthread/timeconv.inl
|
||||
)
|
||||
|
||||
list( APPEND SOURCES ${COMMON_SOURCES} )
|
||||
|
||||
if ( WIN32 )
|
||||
list( APPEND SOURCES ${WINSOURCES} )
|
||||
list( APPEND SOURCES ${WIN_SOURCES} )
|
||||
else()
|
||||
list( APPEND SOURCES ${UNIXSOURCES} )
|
||||
list( APPEND SOURCES ${UNIX_SOURCES} )
|
||||
endif()
|
||||
|
||||
#############################################################################
|
||||
|
@ -228,13 +228,13 @@ namespace boost {
|
||||
//! Find head algorithm
|
||||
/*!
|
||||
Get the head of the input. Head is a prefix of the string of the
|
||||
given size. If the input is shorter then required, whole input if considered
|
||||
given size. If the input is shorter then required, whole input is considered
|
||||
to be the head.
|
||||
|
||||
\param Input An input string
|
||||
\param N Length of the head
|
||||
For N>=0, at most N characters are extracted.
|
||||
For N<0, size(Input)-|N| characters are extracted.
|
||||
For N<0, at most size(Input)-|N| characters are extracted.
|
||||
\return
|
||||
An \c iterator_range delimiting the match.
|
||||
Returned iterator is either \c Range1T::iterator or
|
||||
@ -258,13 +258,13 @@ namespace boost {
|
||||
//! Find tail algorithm
|
||||
/*!
|
||||
Get the tail of the input. Tail is a suffix of the string of the
|
||||
given size. If the input is shorter then required, whole input if considered
|
||||
given size. If the input is shorter then required, whole input is considered
|
||||
to be the tail.
|
||||
|
||||
\param Input An input string
|
||||
\param N Length of the tail.
|
||||
For N>=0, at most N characters are extracted.
|
||||
For N<0, size(Input)-|N| characters are extracted.
|
||||
For N<0, at most size(Input)-|N| characters are extracted.
|
||||
\return
|
||||
An \c iterator_range delimiting the match.
|
||||
Returned iterator is either \c RangeT::iterator or
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include <boost/iterator/iterator_adaptor.hpp>
|
||||
#include <boost/iterator/filter_iterator.hpp>
|
||||
#include <boost/iterator/iterator_traits.hpp>
|
||||
|
||||
//#include <boost/detail/workaround.hpp>
|
||||
//#if ! BOOST_WORKAROUND(BOOST_MSVC, <=1300)
|
||||
@ -140,13 +141,19 @@ public:
|
||||
template<class Base>
|
||||
class remove_whitespace :
|
||||
public filter_iterator<
|
||||
remove_whitespace_predicate<BOOST_DEDUCED_TYPENAME Base::value_type>,
|
||||
remove_whitespace_predicate<
|
||||
BOOST_DEDUCED_TYPENAME boost::iterator_value<Base>::type
|
||||
//BOOST_DEDUCED_TYPENAME Base::value_type
|
||||
>,
|
||||
Base
|
||||
>
|
||||
{
|
||||
friend class boost::iterator_core_access;
|
||||
typedef filter_iterator<
|
||||
remove_whitespace_predicate<BOOST_DEDUCED_TYPENAME Base::value_type>,
|
||||
remove_whitespace_predicate<
|
||||
BOOST_DEDUCED_TYPENAME boost::iterator_value<Base>::type
|
||||
//BOOST_DEDUCED_TYPENAME Base::value_type
|
||||
>,
|
||||
Base
|
||||
> super_t;
|
||||
public:
|
||||
|
@ -13,6 +13,7 @@
|
||||
* accompanying file LICENSE_1_0.txt or copy at
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
* 14 Apr 2012 - (mtc) Added support for boost::hash
|
||||
* 28 Dec 2010 - (mtc) Added cbegin and cend (and crbegin and crend) for C++Ox compatibility.
|
||||
* 10 Mar 2010 - (mtc) fill method added, matching resolution of the standard library working group.
|
||||
* See <http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#776> or Trac issue #3168
|
||||
@ -46,6 +47,7 @@
|
||||
// Handles broken standard libraries better than <iterator>
|
||||
#include <boost/detail/iterator.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/functional/hash_fwd.hpp>
|
||||
#include <algorithm>
|
||||
|
||||
// FIXES for broken compilers
|
||||
@ -118,13 +120,13 @@ namespace boost {
|
||||
// operator[]
|
||||
reference operator[](size_type i)
|
||||
{
|
||||
BOOST_ASSERT( i < N && "out of range" );
|
||||
BOOST_ASSERT_MSG( i < N, "out of range" );
|
||||
return elems[i];
|
||||
}
|
||||
|
||||
const_reference operator[](size_type i) const
|
||||
{
|
||||
BOOST_ASSERT( i < N && "out of range" );
|
||||
BOOST_ASSERT_MSG( i < N, "out of range" );
|
||||
return elems[i];
|
||||
}
|
||||
|
||||
@ -427,6 +429,13 @@ namespace boost {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
template<class T, std::size_t N>
|
||||
std::size_t hash_value(const array<T,N>& arr)
|
||||
{
|
||||
return boost::hash_range(arr.begin(), arr.end());
|
||||
}
|
||||
|
||||
} /* namespace boost */
|
||||
|
||||
|
||||
|
331
cpp/BoostParts/boost/cerrno.hpp
Normal file
331
cpp/BoostParts/boost/cerrno.hpp
Normal file
@ -0,0 +1,331 @@
|
||||
// Boost cerrno.hpp header -------------------------------------------------//
|
||||
|
||||
// Copyright Beman Dawes 2005.
|
||||
// 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 library home page at http://www.boost.org/libs/system
|
||||
|
||||
#ifndef BOOST_CERRNO_HPP
|
||||
#define BOOST_CERRNO_HPP
|
||||
|
||||
#include <cerrno>
|
||||
|
||||
// supply errno values likely to be missing, particularly on Windows
|
||||
|
||||
#ifndef EAFNOSUPPORT
|
||||
#define EAFNOSUPPORT 9901
|
||||
#endif
|
||||
|
||||
#ifndef EADDRINUSE
|
||||
#define EADDRINUSE 9902
|
||||
#endif
|
||||
|
||||
#ifndef EADDRNOTAVAIL
|
||||
#define EADDRNOTAVAIL 9903
|
||||
#endif
|
||||
|
||||
#ifndef EISCONN
|
||||
#define EISCONN 9904
|
||||
#endif
|
||||
|
||||
#ifndef EBADMSG
|
||||
#define EBADMSG 9905
|
||||
#endif
|
||||
|
||||
#ifndef ECONNABORTED
|
||||
#define ECONNABORTED 9906
|
||||
#endif
|
||||
|
||||
#ifndef EALREADY
|
||||
#define EALREADY 9907
|
||||
#endif
|
||||
|
||||
#ifndef ECONNREFUSED
|
||||
#define ECONNREFUSED 9908
|
||||
#endif
|
||||
|
||||
#ifndef ECONNRESET
|
||||
#define ECONNRESET 9909
|
||||
#endif
|
||||
|
||||
#ifndef EDESTADDRREQ
|
||||
#define EDESTADDRREQ 9910
|
||||
#endif
|
||||
|
||||
#ifndef EHOSTUNREACH
|
||||
#define EHOSTUNREACH 9911
|
||||
#endif
|
||||
|
||||
#ifndef EIDRM
|
||||
#define EIDRM 9912
|
||||
#endif
|
||||
|
||||
#ifndef EMSGSIZE
|
||||
#define EMSGSIZE 9913
|
||||
#endif
|
||||
|
||||
#ifndef ENETDOWN
|
||||
#define ENETDOWN 9914
|
||||
#endif
|
||||
|
||||
#ifndef ENETRESET
|
||||
#define ENETRESET 9915
|
||||
#endif
|
||||
|
||||
#ifndef ENETUNREACH
|
||||
#define ENETUNREACH 9916
|
||||
#endif
|
||||
|
||||
#ifndef ENOBUFS
|
||||
#define ENOBUFS 9917
|
||||
#endif
|
||||
|
||||
#ifndef ENOLINK
|
||||
#define ENOLINK 9918
|
||||
#endif
|
||||
|
||||
#ifndef ENODATA
|
||||
#define ENODATA 9919
|
||||
#endif
|
||||
|
||||
#ifndef ENOMSG
|
||||
#define ENOMSG 9920
|
||||
#endif
|
||||
|
||||
#ifndef ENOPROTOOPT
|
||||
#define ENOPROTOOPT 9921
|
||||
#endif
|
||||
|
||||
#ifndef ENOSR
|
||||
#define ENOSR 9922
|
||||
#endif
|
||||
|
||||
#ifndef ENOTSOCK
|
||||
#define ENOTSOCK 9923
|
||||
#endif
|
||||
|
||||
#ifndef ENOSTR
|
||||
#define ENOSTR 9924
|
||||
#endif
|
||||
|
||||
#ifndef ENOTCONN
|
||||
#define ENOTCONN 9925
|
||||
#endif
|
||||
|
||||
#ifndef ENOTSUP
|
||||
#define ENOTSUP 9926
|
||||
#endif
|
||||
|
||||
#ifndef ECANCELED
|
||||
#define ECANCELED 9927
|
||||
#endif
|
||||
|
||||
#ifndef EINPROGRESS
|
||||
#define EINPROGRESS 9928
|
||||
#endif
|
||||
|
||||
#ifndef EOPNOTSUPP
|
||||
#define EOPNOTSUPP 9929
|
||||
#endif
|
||||
|
||||
#ifndef EWOULDBLOCK
|
||||
#define EWOULDBLOCK 9930
|
||||
#endif
|
||||
|
||||
#ifndef EOWNERDEAD
|
||||
#define EOWNERDEAD 9931
|
||||
#endif
|
||||
|
||||
#ifndef EPROTO
|
||||
#define EPROTO 9932
|
||||
#endif
|
||||
|
||||
#ifndef EPROTONOSUPPORT
|
||||
#define EPROTONOSUPPORT 9933
|
||||
#endif
|
||||
|
||||
#ifndef ENOTRECOVERABLE
|
||||
#define ENOTRECOVERABLE 9934
|
||||
#endif
|
||||
|
||||
#ifndef ETIME
|
||||
#define ETIME 9935
|
||||
#endif
|
||||
|
||||
#ifndef ETXTBSY
|
||||
#define ETXTBSY 9936
|
||||
#endif
|
||||
|
||||
#ifndef ETIMEDOUT
|
||||
#define ETIMEDOUT 9938
|
||||
#endif
|
||||
|
||||
#ifndef ELOOP
|
||||
#define ELOOP 9939
|
||||
#endif
|
||||
|
||||
#ifndef EOVERFLOW
|
||||
#define EOVERFLOW 9940
|
||||
#endif
|
||||
|
||||
#ifndef EPROTOTYPE
|
||||
#define EPROTOTYPE 9941
|
||||
#endif
|
||||
|
||||
#ifndef ENOSYS
|
||||
#define ENOSYS 9942
|
||||
#endif
|
||||
|
||||
#ifndef EINVAL
|
||||
#define EINVAL 9943
|
||||
#endif
|
||||
|
||||
#ifndef ERANGE
|
||||
#define ERANGE 9944
|
||||
#endif
|
||||
|
||||
#ifndef EILSEQ
|
||||
#define EILSEQ 9945
|
||||
#endif
|
||||
|
||||
// Windows Mobile doesn't appear to define these:
|
||||
|
||||
#ifndef E2BIG
|
||||
#define E2BIG 9946
|
||||
#endif
|
||||
|
||||
#ifndef EDOM
|
||||
#define EDOM 9947
|
||||
#endif
|
||||
|
||||
#ifndef EFAULT
|
||||
#define EFAULT 9948
|
||||
#endif
|
||||
|
||||
#ifndef EBADF
|
||||
#define EBADF 9949
|
||||
#endif
|
||||
|
||||
#ifndef EPIPE
|
||||
#define EPIPE 9950
|
||||
#endif
|
||||
|
||||
#ifndef EXDEV
|
||||
#define EXDEV 9951
|
||||
#endif
|
||||
|
||||
#ifndef EBUSY
|
||||
#define EBUSY 9952
|
||||
#endif
|
||||
|
||||
#ifndef ENOTEMPTY
|
||||
#define ENOTEMPTY 9953
|
||||
#endif
|
||||
|
||||
#ifndef ENOEXEC
|
||||
#define ENOEXEC 9954
|
||||
#endif
|
||||
|
||||
#ifndef EEXIST
|
||||
#define EEXIST 9955
|
||||
#endif
|
||||
|
||||
#ifndef EFBIG
|
||||
#define EFBIG 9956
|
||||
#endif
|
||||
|
||||
#ifndef ENAMETOOLONG
|
||||
#define ENAMETOOLONG 9957
|
||||
#endif
|
||||
|
||||
#ifndef ENOTTY
|
||||
#define ENOTTY 9958
|
||||
#endif
|
||||
|
||||
#ifndef EINTR
|
||||
#define EINTR 9959
|
||||
#endif
|
||||
|
||||
#ifndef ESPIPE
|
||||
#define ESPIPE 9960
|
||||
#endif
|
||||
|
||||
#ifndef EIO
|
||||
#define EIO 9961
|
||||
#endif
|
||||
|
||||
#ifndef EISDIR
|
||||
#define EISDIR 9962
|
||||
#endif
|
||||
|
||||
#ifndef ECHILD
|
||||
#define ECHILD 9963
|
||||
#endif
|
||||
|
||||
#ifndef ENOLCK
|
||||
#define ENOLCK 9964
|
||||
#endif
|
||||
|
||||
#ifndef ENOSPC
|
||||
#define ENOSPC 9965
|
||||
#endif
|
||||
|
||||
#ifndef ENXIO
|
||||
#define ENXIO 9966
|
||||
#endif
|
||||
|
||||
#ifndef ENODEV
|
||||
#define ENODEV 9967
|
||||
#endif
|
||||
|
||||
#ifndef ENOENT
|
||||
#define ENOENT 9968
|
||||
#endif
|
||||
|
||||
#ifndef ESRCH
|
||||
#define ESRCH 9969
|
||||
#endif
|
||||
|
||||
#ifndef ENOTDIR
|
||||
#define ENOTDIR 9970
|
||||
#endif
|
||||
|
||||
#ifndef ENOMEM
|
||||
#define ENOMEM 9971
|
||||
#endif
|
||||
|
||||
#ifndef EPERM
|
||||
#define EPERM 9972
|
||||
#endif
|
||||
|
||||
#ifndef EACCES
|
||||
#define EACCES 9973
|
||||
#endif
|
||||
|
||||
#ifndef EROFS
|
||||
#define EROFS 9974
|
||||
#endif
|
||||
|
||||
#ifndef EDEADLK
|
||||
#define EDEADLK 9975
|
||||
#endif
|
||||
|
||||
#ifndef EAGAIN
|
||||
#define EAGAIN 9976
|
||||
#endif
|
||||
|
||||
#ifndef ENFILE
|
||||
#define ENFILE 9977
|
||||
#endif
|
||||
|
||||
#ifndef EMFILE
|
||||
#define EMFILE 9978
|
||||
#endif
|
||||
|
||||
#ifndef EMLINK
|
||||
#define EMLINK 9979
|
||||
#endif
|
||||
|
||||
#endif // include guard
|
36
cpp/BoostParts/boost/chrono/ceil.hpp
Normal file
36
cpp/BoostParts/boost/chrono/ceil.hpp
Normal file
@ -0,0 +1,36 @@
|
||||
// boost/chrono/round.hpp ------------------------------------------------------------//
|
||||
|
||||
// (C) Copyright Howard Hinnant
|
||||
// Copyright 2011 Vicente J. Botet Escriba
|
||||
|
||||
// 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/chrono for documentation.
|
||||
|
||||
#ifndef BOOST_CHRONO_CEIL_HPP
|
||||
#define BOOST_CHRONO_CEIL_HPP
|
||||
|
||||
#include <boost/chrono/duration.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace chrono
|
||||
{
|
||||
|
||||
/**
|
||||
* rounds up
|
||||
*/
|
||||
template <class To, class Rep, class Period>
|
||||
To ceil(const duration<Rep, Period>& d)
|
||||
{
|
||||
To t = duration_cast<To>(d);
|
||||
if (t < d)
|
||||
++t;
|
||||
return t;
|
||||
}
|
||||
|
||||
} // namespace chrono
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
15
cpp/BoostParts/boost/chrono/chrono.hpp
Normal file
15
cpp/BoostParts/boost/chrono/chrono.hpp
Normal file
@ -0,0 +1,15 @@
|
||||
// chrono.hpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright 2009-2011 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#ifndef BOOST_CHRONO_CHRONO_HPP
|
||||
#define BOOST_CHRONO_CHRONO_HPP
|
||||
|
||||
#include <boost/chrono/duration.hpp>
|
||||
#include <boost/chrono/time_point.hpp>
|
||||
#include <boost/chrono/system_clocks.hpp>
|
||||
|
||||
#endif // BOOST_CHRONO_CHRONO_HPP
|
25
cpp/BoostParts/boost/chrono/clock_string.hpp
Normal file
25
cpp/BoostParts/boost/chrono/clock_string.hpp
Normal file
@ -0,0 +1,25 @@
|
||||
//
|
||||
// (C) Copyright 2010-2011 Vicente J. Botet Escriba
|
||||
// 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).
|
||||
//
|
||||
|
||||
#ifndef BOOST_CHRONO_CLOCK_STRING_HPP
|
||||
#define BOOST_CHRONO_CLOCK_STRING_HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace chrono
|
||||
{
|
||||
|
||||
template<class Clock, class CharT>
|
||||
struct clock_string;
|
||||
|
||||
} // chrono
|
||||
|
||||
} // boost
|
||||
|
||||
#endif // BOOST_CHRONO_CLOCK_STRING_HPP
|
161
cpp/BoostParts/boost/chrono/config.hpp
Normal file
161
cpp/BoostParts/boost/chrono/config.hpp
Normal file
@ -0,0 +1,161 @@
|
||||
// boost/chrono/config.hpp -------------------------------------------------//
|
||||
|
||||
// Copyright Beman Dawes 2003, 2006, 2008
|
||||
// Copyright 2009-2011 Vicente J. Botet Escriba
|
||||
|
||||
// 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/chrono for documentation.
|
||||
|
||||
#ifndef BOOST_CHRONO_CONFIG_HPP
|
||||
#define BOOST_CHRONO_CONFIG_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined(BOOST_CHRONO_SOURCE) && !defined(BOOST_USE_WINDOWS_H)
|
||||
#define BOOST_USE_WINDOWS_H
|
||||
#endif
|
||||
|
||||
// BOOST_CHRONO_POSIX_API, BOOST_CHRONO_MAC_API, or BOOST_CHRONO_WINDOWS_API
|
||||
// can be defined by the user to specify which API should be used
|
||||
|
||||
#if defined(BOOST_CHRONO_WINDOWS_API)
|
||||
# warning Boost.Chrono will use the Windows API
|
||||
#elif defined(BOOST_CHRONO_MAC_API)
|
||||
# warning Boost.Chrono will use the Mac API
|
||||
#elif defined(BOOST_CHRONO_POSIX_API)
|
||||
# warning Boost.Chrono will use the POSIX API
|
||||
#endif
|
||||
|
||||
# if defined( BOOST_CHRONO_WINDOWS_API ) && defined( BOOST_CHRONO_POSIX_API )
|
||||
# error both BOOST_CHRONO_WINDOWS_API and BOOST_CHRONO_POSIX_API are defined
|
||||
# elif defined( BOOST_CHRONO_WINDOWS_API ) && defined( BOOST_CHRONO_MAC_API )
|
||||
# error both BOOST_CHRONO_WINDOWS_API and BOOST_CHRONO_MAC_API are defined
|
||||
# elif defined( BOOST_CHRONO_MAC_API ) && defined( BOOST_CHRONO_POSIX_API )
|
||||
# error both BOOST_CHRONO_MAC_API and BOOST_CHRONO_POSIX_API are defined
|
||||
# elif !defined( BOOST_CHRONO_WINDOWS_API ) && !defined( BOOST_CHRONO_MAC_API ) && !defined( BOOST_CHRONO_POSIX_API )
|
||||
# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32))
|
||||
# define BOOST_CHRONO_WINDOWS_API
|
||||
# elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
|
||||
# define BOOST_CHRONO_MAC_API
|
||||
# else
|
||||
# define BOOST_CHRONO_POSIX_API
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# if defined( BOOST_CHRONO_WINDOWS_API )
|
||||
# ifndef UNDER_CE
|
||||
# define BOOST_CHRONO_HAS_PROCESS_CLOCKS
|
||||
# endif
|
||||
# define BOOST_CHRONO_HAS_CLOCK_STEADY
|
||||
# define BOOST_CHRONO_HAS_THREAD_CLOCK
|
||||
# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
|
||||
# endif
|
||||
|
||||
# if defined( BOOST_CHRONO_MAC_API )
|
||||
# define BOOST_CHRONO_HAS_PROCESS_CLOCKS
|
||||
# define BOOST_CHRONO_HAS_CLOCK_STEADY
|
||||
# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
|
||||
# endif
|
||||
|
||||
# if defined( BOOST_CHRONO_POSIX_API )
|
||||
# define BOOST_CHRONO_HAS_PROCESS_CLOCKS
|
||||
# include <time.h> //to check for CLOCK_REALTIME and CLOCK_MONOTONIC and _POSIX_THREAD_CPUTIME
|
||||
# if defined(CLOCK_REALTIME)
|
||||
# if defined(CLOCK_MONOTONIC)
|
||||
# define BOOST_CHRONO_HAS_CLOCK_STEADY
|
||||
# endif
|
||||
# else
|
||||
# error <time.h> does not supply CLOCK_REALTIME
|
||||
# endif
|
||||
# if defined(_POSIX_THREAD_CPUTIME) && !defined(BOOST_DISABLE_THREADS)
|
||||
# define BOOST_CHRONO_HAS_THREAD_CLOCK
|
||||
# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
|
||||
# endif
|
||||
# if defined(CLOCK_THREAD_CPUTIME_ID) && !defined(BOOST_DISABLE_THREADS)
|
||||
# define BOOST_CHRONO_HAS_THREAD_CLOCK
|
||||
# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
|
||||
# endif
|
||||
# if defined(sun) || defined(__sun)
|
||||
# undef BOOST_CHRONO_HAS_THREAD_CLOCK
|
||||
# undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#if defined(BOOST_CHRONO_THREAD_DISABLED) && defined(BOOST_CHRONO_HAS_THREAD_CLOCK)
|
||||
#undef BOOST_CHRONO_HAS_THREAD_CLOCK
|
||||
#undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY
|
||||
#endif
|
||||
|
||||
|
||||
// unicode support ------------------------------//
|
||||
|
||||
#if defined(BOOST_NO_UNICODE_LITERALS) || defined(BOOST_NO_CHAR16_T) || defined(BOOST_NO_CHAR32_T)
|
||||
//~ #define BOOST_CHRONO_HAS_UNICODE_SUPPORT
|
||||
#else
|
||||
#define BOOST_CHRONO_HAS_UNICODE_SUPPORT 1
|
||||
#endif
|
||||
|
||||
#if ! defined BOOST_NOEXCEPT
|
||||
#if defined(BOOST_NO_NOEXCEPT)
|
||||
#define BOOST_NOEXCEPT
|
||||
#else
|
||||
#define BOOST_NOEXCEPT noexcept
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_CHRONO_HEADER_ONLY
|
||||
#define BOOST_CHRONO_INLINE inline
|
||||
#define BOOST_CHRONO_STATIC inline
|
||||
#define BOOST_CHRONO_DECL
|
||||
|
||||
#else
|
||||
#define BOOST_CHRONO_INLINE
|
||||
#define BOOST_CHRONO_STATIC static
|
||||
|
||||
// enable dynamic linking on Windows ---------------------------------------//
|
||||
|
||||
// we need to import/export our code only if the user has specifically
|
||||
// asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost
|
||||
// libraries to be dynamically linked, or BOOST_CHRONO_DYN_LINK
|
||||
// if they want just this one to be dynamically liked:
|
||||
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CHRONO_DYN_LINK)
|
||||
// export if this is our own source, otherwise import:
|
||||
#ifdef BOOST_CHRONO_SOURCE
|
||||
# define BOOST_CHRONO_DECL BOOST_SYMBOL_EXPORT
|
||||
#else
|
||||
# define BOOST_CHRONO_DECL BOOST_SYMBOL_IMPORT
|
||||
#endif // BOOST_CHRONO_SOURCE
|
||||
#endif // DYN_LINK
|
||||
//
|
||||
// if BOOST_CHRONO_DECL isn't defined yet define it now:
|
||||
#ifndef BOOST_CHRONO_DECL
|
||||
#define BOOST_CHRONO_DECL
|
||||
#endif
|
||||
|
||||
|
||||
//#define BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
|
||||
// enable automatic library variant selection ------------------------------//
|
||||
|
||||
#if !defined(BOOST_CHRONO_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_CHRONO_NO_LIB)
|
||||
//
|
||||
// Set the name of our library; this will get undef'ed by auto_link.hpp
|
||||
// once it's done with it:
|
||||
//
|
||||
#define BOOST_LIB_NAME boost_chrono
|
||||
//
|
||||
// If we're importing code from a dll, then tell auto_link.hpp about it:
|
||||
//
|
||||
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CHRONO_DYN_LINK)
|
||||
# define BOOST_DYN_LINK
|
||||
#endif
|
||||
//
|
||||
// And include the header that does the work:
|
||||
//
|
||||
#include <boost/config/auto_link.hpp>
|
||||
#endif // auto-linking disabled
|
||||
#endif // BOOST_CHRONO_HEADER_ONLY
|
||||
#endif // BOOST_CHRONO_CONFIG_HPP
|
||||
|
44
cpp/BoostParts/boost/chrono/detail/inlined/chrono.hpp
Normal file
44
cpp/BoostParts/boost/chrono/detail/inlined/chrono.hpp
Normal file
@ -0,0 +1,44 @@
|
||||
// chrono.cpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright Beman Dawes 2008
|
||||
// Copyright Vicente J. Botet Escriba 2009
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#ifndef BOOST_CHRONO_DETAIL_INLINED_CHRONO_HPP
|
||||
#define BOOST_CHRONO_DETAIL_INLINED_CHRONO_HPP
|
||||
|
||||
#include <boost/version.hpp>
|
||||
#include <boost/chrono/chrono.hpp>
|
||||
#include <boost/system/system_error.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/chrono/detail/system.hpp>
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// //
|
||||
// Platform-specific Implementations //
|
||||
// //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// Windows //
|
||||
//----------------------------------------------------------------------------//
|
||||
#if defined(BOOST_CHRONO_WINDOWS_API)
|
||||
#include <boost/chrono/detail/inlined/win/chrono.hpp>
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// Mac //
|
||||
//----------------------------------------------------------------------------//
|
||||
#elif defined(BOOST_CHRONO_MAC_API)
|
||||
#include <boost/chrono/detail/inlined/mac/chrono.hpp>
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// POSIX //
|
||||
//----------------------------------------------------------------------------//
|
||||
#elif defined(BOOST_CHRONO_POSIX_API)
|
||||
#include <boost/chrono/detail/inlined/posix/chrono.hpp>
|
||||
|
||||
#endif // POSIX
|
||||
|
||||
#endif
|
241
cpp/BoostParts/boost/chrono/detail/inlined/mac/chrono.hpp
Normal file
241
cpp/BoostParts/boost/chrono/detail/inlined/mac/chrono.hpp
Normal file
@ -0,0 +1,241 @@
|
||||
// mac/chrono.cpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright Beman Dawes 2008
|
||||
// Copyright 2009-2010 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// Mac //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <sys/time.h> //for gettimeofday and timeval
|
||||
#include <mach/mach_time.h> // mach_absolute_time, mach_timebase_info_data_t
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace chrono
|
||||
{
|
||||
|
||||
// system_clock
|
||||
|
||||
// gettimeofday is the most precise "system time" available on this platform.
|
||||
// It returns the number of microseconds since New Years 1970 in a struct called timeval
|
||||
// which has a field for seconds and a field for microseconds.
|
||||
// Fill in the timeval and then convert that to the time_point
|
||||
system_clock::time_point
|
||||
system_clock::now() BOOST_NOEXCEPT
|
||||
{
|
||||
timeval tv;
|
||||
gettimeofday(&tv, 0);
|
||||
return time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec));
|
||||
}
|
||||
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
system_clock::time_point
|
||||
system_clock::now(system::error_code & ec)
|
||||
{
|
||||
timeval tv;
|
||||
gettimeofday(&tv, 0);
|
||||
if (!BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
ec.clear();
|
||||
}
|
||||
return time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec));
|
||||
}
|
||||
#endif
|
||||
// Take advantage of the fact that on this platform time_t is nothing but
|
||||
// an integral count of seconds since New Years 1970 (same epoch as timeval).
|
||||
// Just get the duration out of the time_point and truncate it to seconds.
|
||||
time_t
|
||||
system_clock::to_time_t(const time_point& t) BOOST_NOEXCEPT
|
||||
{
|
||||
return time_t(duration_cast<seconds>(t.time_since_epoch()).count());
|
||||
}
|
||||
|
||||
// Just turn the time_t into a count of seconds and construct a time_point with it.
|
||||
system_clock::time_point
|
||||
system_clock::from_time_t(time_t t) BOOST_NOEXCEPT
|
||||
{
|
||||
return system_clock::time_point(seconds(t));
|
||||
}
|
||||
|
||||
namespace chrono_detail
|
||||
{
|
||||
|
||||
// steady_clock
|
||||
|
||||
// Note, in this implementation steady_clock and high_resolution_clock
|
||||
// are the same clock. They are both based on mach_absolute_time().
|
||||
// mach_absolute_time() * MachInfo.numer / MachInfo.denom is the number of
|
||||
// nanoseconds since the computer booted up. MachInfo.numer and MachInfo.denom
|
||||
// are run time constants supplied by the OS. This clock has no relationship
|
||||
// to the Gregorian calendar. It's main use is as a high resolution timer.
|
||||
|
||||
// MachInfo.numer / MachInfo.denom is often 1 on the latest equipment. Specialize
|
||||
// for that case as an optimization.
|
||||
BOOST_CHRONO_STATIC
|
||||
steady_clock::rep
|
||||
steady_simplified()
|
||||
{
|
||||
return mach_absolute_time();
|
||||
}
|
||||
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
BOOST_CHRONO_STATIC
|
||||
steady_clock::rep
|
||||
steady_simplified_ec(system::error_code & ec)
|
||||
{
|
||||
if (!BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
ec.clear();
|
||||
}
|
||||
return mach_absolute_time();
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOST_CHRONO_STATIC
|
||||
double
|
||||
compute_steady_factor(kern_return_t& err)
|
||||
{
|
||||
mach_timebase_info_data_t MachInfo;
|
||||
err = mach_timebase_info(&MachInfo);
|
||||
if ( err != 0 ) {
|
||||
return 0;
|
||||
}
|
||||
return static_cast<double>(MachInfo.numer) / MachInfo.denom;
|
||||
}
|
||||
|
||||
BOOST_CHRONO_STATIC
|
||||
steady_clock::rep
|
||||
steady_full()
|
||||
{
|
||||
static kern_return_t err;
|
||||
static const double factor = chrono_detail::compute_steady_factor(err);
|
||||
if (err != 0)
|
||||
{
|
||||
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
|
||||
}
|
||||
return static_cast<steady_clock::rep>(mach_absolute_time() * factor);
|
||||
}
|
||||
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
BOOST_CHRONO_STATIC
|
||||
steady_clock::rep
|
||||
steady_full_ec(system::error_code & ec)
|
||||
{
|
||||
static kern_return_t err;
|
||||
static const double factor = chrono_detail::compute_steady_factor(err);
|
||||
if (err != 0)
|
||||
{
|
||||
if (BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
boost::throw_exception(
|
||||
system::system_error(
|
||||
err,
|
||||
BOOST_CHRONO_SYSTEM_CATEGORY,
|
||||
"chrono::steady_clock" ));
|
||||
}
|
||||
else
|
||||
{
|
||||
ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
|
||||
return steady_clock::rep();
|
||||
}
|
||||
}
|
||||
if (!BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
ec.clear();
|
||||
}
|
||||
return static_cast<steady_clock::rep>(mach_absolute_time() * factor);
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef steady_clock::rep (*FP)();
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
typedef steady_clock::rep (*FP_ec)(system::error_code &);
|
||||
#endif
|
||||
|
||||
BOOST_CHRONO_STATIC
|
||||
FP
|
||||
init_steady_clock(kern_return_t & err)
|
||||
{
|
||||
mach_timebase_info_data_t MachInfo;
|
||||
err = mach_timebase_info(&MachInfo);
|
||||
if ( err != 0 )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (MachInfo.numer == MachInfo.denom)
|
||||
{
|
||||
return &chrono_detail::steady_simplified;
|
||||
}
|
||||
return &chrono_detail::steady_full;
|
||||
}
|
||||
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
BOOST_CHRONO_STATIC
|
||||
FP_ec
|
||||
init_steady_clock_ec(kern_return_t & err)
|
||||
{
|
||||
mach_timebase_info_data_t MachInfo;
|
||||
err = mach_timebase_info(&MachInfo);
|
||||
if ( err != 0 )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (MachInfo.numer == MachInfo.denom)
|
||||
{
|
||||
return &chrono_detail::steady_simplified_ec;
|
||||
}
|
||||
return &chrono_detail::steady_full_ec;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
steady_clock::time_point
|
||||
steady_clock::now() BOOST_NOEXCEPT
|
||||
{
|
||||
static kern_return_t err;
|
||||
static chrono_detail::FP fp = chrono_detail::init_steady_clock(err);
|
||||
if ( err != 0 )
|
||||
{
|
||||
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
|
||||
}
|
||||
return time_point(duration(fp()));
|
||||
}
|
||||
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
steady_clock::time_point
|
||||
steady_clock::now(system::error_code & ec)
|
||||
{
|
||||
static kern_return_t err;
|
||||
static chrono_detail::FP_ec fp = chrono_detail::init_steady_clock_ec(err);
|
||||
if ( err != 0 )
|
||||
{
|
||||
if (BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
boost::throw_exception(
|
||||
system::system_error(
|
||||
err,
|
||||
BOOST_CHRONO_SYSTEM_CATEGORY,
|
||||
"chrono::steady_clock" ));
|
||||
}
|
||||
else
|
||||
{
|
||||
ec.assign( err, BOOST_CHRONO_SYSTEM_CATEGORY );
|
||||
return time_point();
|
||||
}
|
||||
}
|
||||
if (!BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
ec.clear();
|
||||
}
|
||||
return time_point(duration(fp(ec)));
|
||||
}
|
||||
#endif
|
||||
} // namespace chrono
|
||||
} // namespace boost
|
120
cpp/BoostParts/boost/chrono/detail/inlined/posix/chrono.hpp
Normal file
120
cpp/BoostParts/boost/chrono/detail/inlined/posix/chrono.hpp
Normal file
@ -0,0 +1,120 @@
|
||||
// posix/chrono.cpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright Beman Dawes 2008
|
||||
// Copyright Vicente J. Botet Escriba 2009
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// POSIX //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <time.h> // for clock_gettime
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace chrono
|
||||
{
|
||||
|
||||
system_clock::time_point system_clock::now() BOOST_NOEXCEPT
|
||||
{
|
||||
timespec ts;
|
||||
if ( ::clock_gettime( CLOCK_REALTIME, &ts ) )
|
||||
{
|
||||
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
|
||||
}
|
||||
|
||||
return time_point(duration(
|
||||
static_cast<system_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
|
||||
}
|
||||
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
system_clock::time_point system_clock::now(system::error_code & ec)
|
||||
{
|
||||
timespec ts;
|
||||
if ( ::clock_gettime( CLOCK_REALTIME, &ts ) )
|
||||
{
|
||||
if (BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
boost::throw_exception(
|
||||
system::system_error(
|
||||
errno,
|
||||
BOOST_CHRONO_SYSTEM_CATEGORY,
|
||||
"chrono::system_clock" ));
|
||||
}
|
||||
else
|
||||
{
|
||||
ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
|
||||
return time_point();
|
||||
}
|
||||
}
|
||||
|
||||
if (!BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
ec.clear();
|
||||
}
|
||||
return time_point(duration(
|
||||
static_cast<system_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
|
||||
}
|
||||
#endif
|
||||
|
||||
std::time_t system_clock::to_time_t(const system_clock::time_point& t) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::time_t>( t.time_since_epoch().count() / 1000000000 );
|
||||
}
|
||||
|
||||
system_clock::time_point system_clock::from_time_t(std::time_t t) BOOST_NOEXCEPT
|
||||
{
|
||||
return time_point(duration(static_cast<system_clock::rep>(t) * 1000000000));
|
||||
}
|
||||
|
||||
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
|
||||
|
||||
steady_clock::time_point steady_clock::now() BOOST_NOEXCEPT
|
||||
{
|
||||
timespec ts;
|
||||
if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
|
||||
{
|
||||
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
|
||||
}
|
||||
|
||||
return time_point(duration(
|
||||
static_cast<steady_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
|
||||
}
|
||||
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
steady_clock::time_point steady_clock::now(system::error_code & ec)
|
||||
{
|
||||
timespec ts;
|
||||
if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
|
||||
{
|
||||
if (BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
boost::throw_exception(
|
||||
system::system_error(
|
||||
errno,
|
||||
BOOST_CHRONO_SYSTEM_CATEGORY,
|
||||
"chrono::steady_clock" ));
|
||||
}
|
||||
else
|
||||
{
|
||||
ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
|
||||
return time_point();
|
||||
}
|
||||
}
|
||||
|
||||
if (!BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
ec.clear();
|
||||
}
|
||||
return time_point(duration(
|
||||
static_cast<steady_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
} // namespace chrono
|
||||
} // namespace boost
|
||||
|
||||
|
159
cpp/BoostParts/boost/chrono/detail/inlined/win/chrono.hpp
Normal file
159
cpp/BoostParts/boost/chrono/detail/inlined/win/chrono.hpp
Normal file
@ -0,0 +1,159 @@
|
||||
// win/chrono.cpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright Beman Dawes 2008
|
||||
// Copyright 2009-2010 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// Windows //
|
||||
//----------------------------------------------------------------------------//
|
||||
#ifndef BOOST_CHRONO_DETAIL_INLINED_WIN_CHRONO_HPP
|
||||
#define BOOST_CHRONO_DETAIL_INLINED_WIN_CHRONO_HPP
|
||||
|
||||
#include <boost/detail/win/time.hpp>
|
||||
#include <boost/detail/win/timers.hpp>
|
||||
#include <boost/detail/win/GetLastError.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace chrono
|
||||
{
|
||||
namespace chrono_detail
|
||||
{
|
||||
|
||||
BOOST_CHRONO_INLINE double get_nanosecs_per_tic() BOOST_NOEXCEPT
|
||||
{
|
||||
boost::detail::win32::LARGE_INTEGER_ freq;
|
||||
if ( !boost::detail::win32::QueryPerformanceFrequency( &freq ) )
|
||||
return 0.0L;
|
||||
return double(1000000000.0L / freq.QuadPart);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
steady_clock::time_point steady_clock::now() BOOST_NOEXCEPT
|
||||
{
|
||||
static double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic();
|
||||
|
||||
boost::detail::win32::LARGE_INTEGER_ pcount;
|
||||
if ( (nanosecs_per_tic <= 0.0L) ||
|
||||
(!boost::detail::win32::QueryPerformanceCounter( &pcount )) )
|
||||
{
|
||||
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
|
||||
}
|
||||
|
||||
return steady_clock::time_point(steady_clock::duration(
|
||||
static_cast<steady_clock::rep>((nanosecs_per_tic) * pcount.QuadPart)));
|
||||
}
|
||||
|
||||
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
steady_clock::time_point steady_clock::now( system::error_code & ec )
|
||||
{
|
||||
static double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic();
|
||||
|
||||
boost::detail::win32::LARGE_INTEGER_ pcount;
|
||||
if ( (nanosecs_per_tic <= 0.0L)
|
||||
|| (!boost::detail::win32::QueryPerformanceCounter( &pcount )) )
|
||||
{
|
||||
boost::detail::win32::DWORD_ cause =
|
||||
((nanosecs_per_tic <= 0.0L)
|
||||
? ERROR_NOT_SUPPORTED
|
||||
: boost::detail::win32::GetLastError());
|
||||
if (BOOST_CHRONO_IS_THROWS(ec)) {
|
||||
boost::throw_exception(
|
||||
system::system_error(
|
||||
cause,
|
||||
BOOST_CHRONO_SYSTEM_CATEGORY,
|
||||
"chrono::steady_clock" ));
|
||||
}
|
||||
else
|
||||
{
|
||||
ec.assign( cause, BOOST_CHRONO_SYSTEM_CATEGORY );
|
||||
return steady_clock::time_point(duration(0));
|
||||
}
|
||||
}
|
||||
|
||||
if (!BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
ec.clear();
|
||||
}
|
||||
return time_point(duration(
|
||||
static_cast<steady_clock::rep>(nanosecs_per_tic * pcount.QuadPart)));
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOST_CHRONO_INLINE
|
||||
system_clock::time_point system_clock::now() BOOST_NOEXCEPT
|
||||
{
|
||||
boost::detail::win32::FILETIME_ ft;
|
||||
#if defined(UNDER_CE)
|
||||
// Windows CE does not define GetSystemTimeAsFileTime so we do it in two steps.
|
||||
boost::detail::win32::SYSTEMTIME_ st;
|
||||
boost::detail::win32::GetSystemTime( &st );
|
||||
boost::detail::win32::SystemTimeToFileTime( &st, &ft );
|
||||
#else
|
||||
boost::detail::win32::GetSystemTimeAsFileTime( &ft ); // never fails
|
||||
#endif
|
||||
return system_clock::time_point(system_clock::duration(
|
||||
(static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime));
|
||||
}
|
||||
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
BOOST_CHRONO_INLINE
|
||||
system_clock::time_point system_clock::now( system::error_code & ec )
|
||||
{
|
||||
boost::detail::win32::FILETIME_ ft;
|
||||
#if defined(UNDER_CE)
|
||||
// Windows CE does not define GetSystemTimeAsFileTime so we do it in two steps.
|
||||
boost::detail::win32::SYSTEMTIME_ st;
|
||||
boost::detail::win32::GetSystemTime( &st );
|
||||
boost::detail::win32::SystemTimeToFileTime( &st, &ft );
|
||||
#else
|
||||
boost::detail::win32::GetSystemTimeAsFileTime( &ft ); // never fails
|
||||
#endif
|
||||
if (!BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
ec.clear();
|
||||
}
|
||||
return time_point(duration(
|
||||
(static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime));
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOST_CHRONO_INLINE
|
||||
std::time_t system_clock::to_time_t(const system_clock::time_point& t) BOOST_NOEXCEPT
|
||||
{
|
||||
__int64 temp = t.time_since_epoch().count();
|
||||
|
||||
# if (!defined( BOOST_MSVC )) || (BOOST_MSVC > 1300) // > VC++ 7.0
|
||||
temp -= 116444736000000000LL; // delta from epoch in microseconds
|
||||
# else
|
||||
temp -= 116444736000000000;
|
||||
# endif
|
||||
|
||||
temp /= 10000000;
|
||||
return static_cast<std::time_t>( temp );
|
||||
}
|
||||
|
||||
BOOST_CHRONO_INLINE
|
||||
system_clock::time_point system_clock::from_time_t(std::time_t t) BOOST_NOEXCEPT
|
||||
{
|
||||
__int64 temp = t;
|
||||
temp *= 10000000;
|
||||
|
||||
# if (!defined( BOOST_MSVC )) || (BOOST_MSVC > 1300) // > VC++ 7.0
|
||||
temp += 116444736000000000LL;
|
||||
# else
|
||||
temp += 116444736000000000;
|
||||
# endif
|
||||
|
||||
return time_point(duration(temp));
|
||||
}
|
||||
|
||||
} // namespace chrono
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
@ -0,0 +1,31 @@
|
||||
// is_evenly_divisible_by.hpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright 2009-2010 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#ifndef BOOST_CHRONO_DETAIL_IS_EVENLY_DIVISIBLE_BY_HPP
|
||||
#define BOOST_CHRONO_DETAIL_IS_EVENLY_DIVISIBLE_BY_HPP
|
||||
|
||||
#include <boost/chrono/config.hpp>
|
||||
|
||||
#include <boost/mpl/logical.hpp>
|
||||
#include <boost/ratio/detail/overflow_helpers.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace chrono {
|
||||
namespace chrono_detail {
|
||||
|
||||
// template <class R1, class R2>
|
||||
// struct is_evenly_divisible_by : public boost::mpl::bool_ < ratio_divide<R1, R2>::type::den == 1 >
|
||||
// {};
|
||||
template <class R1, class R2>
|
||||
struct is_evenly_divisible_by : public boost::ratio_detail::is_evenly_divisible_by<R1, R2>
|
||||
{};
|
||||
|
||||
} // namespace chrono_detail
|
||||
} // namespace detail
|
||||
} // namespace chrono
|
||||
|
||||
#endif // BOOST_CHRONO_DETAIL_IS_EVENLY_DIVISIBLE_BY_HPP
|
30
cpp/BoostParts/boost/chrono/detail/static_assert.hpp
Normal file
30
cpp/BoostParts/boost/chrono/detail/static_assert.hpp
Normal file
@ -0,0 +1,30 @@
|
||||
// static_assert.hpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright 2009-2010 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
|
||||
#ifndef BOOST_CHRONO_DETAIL_STATIC_ASSERT_HPP
|
||||
#define BOOST_CHRONO_DETAIL_STATIC_ASSERT_HPP
|
||||
|
||||
#include <boost/chrono/config.hpp>
|
||||
|
||||
#ifndef BOOST_NO_STATIC_ASSERT
|
||||
#define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) static_assert(CND,MSG)
|
||||
#elif defined(BOOST_CHRONO_USES_STATIC_ASSERT)
|
||||
#include <boost/static_assert.hpp>
|
||||
#define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND)
|
||||
#elif defined(BOOST_CHRONO_USES_MPL_ASSERT)
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) \
|
||||
BOOST_MPL_ASSERT_MSG(boost::mpl::bool_< (CND) >::type::value, MSG, TYPES)
|
||||
#else
|
||||
//~ #elif defined(BOOST_CHRONO_USES_ARRAY_ASSERT)
|
||||
#define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) static char BOOST_JOIN(boost_chrono_test_,__LINE__)[(CND)?1:-1]
|
||||
//~ #define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_CHRONO_DETAIL_STATIC_ASSERT_HPP
|
26
cpp/BoostParts/boost/chrono/detail/system.hpp
Normal file
26
cpp/BoostParts/boost/chrono/detail/system.hpp
Normal file
@ -0,0 +1,26 @@
|
||||
// Copyright 2009-2010 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#ifndef BOOST_CHRONO_DETAIL_SYSTEM_HPP
|
||||
#define BOOST_CHRONO_DETAIL_SYSTEM_HPP
|
||||
|
||||
#include <boost/version.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
|
||||
#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
|
||||
#define BOOST_CHRONO_SYSTEM_CATEGORY boost::system::system_category
|
||||
#else
|
||||
#define BOOST_CHRONO_SYSTEM_CATEGORY boost::system::system_category()
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_SYSTEM_NO_DEPRECATED
|
||||
#define BOOST_CHRONO_THROWS boost::throws()
|
||||
#define BOOST_CHRONO_IS_THROWS(EC) (&EC==&boost::throws())
|
||||
#else
|
||||
#define BOOST_CHRONO_THROWS boost::system::throws
|
||||
#define BOOST_CHRONO_IS_THROWS(EC) (&EC==&boost::system::throws)
|
||||
#endif
|
||||
|
||||
#endif
|
786
cpp/BoostParts/boost/chrono/duration.hpp
Normal file
786
cpp/BoostParts/boost/chrono/duration.hpp
Normal file
@ -0,0 +1,786 @@
|
||||
// duration.hpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright 2008 Howard Hinnant
|
||||
// Copyright 2008 Beman Dawes
|
||||
// Copyright 2009-2011 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
/*
|
||||
|
||||
This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
|
||||
Many thanks to Howard for making his code available under the Boost license.
|
||||
The original code was modified to conform to Boost conventions and to section
|
||||
20.9 Time utilities [time] of the C++ committee's working paper N2798.
|
||||
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
|
||||
|
||||
time2_demo contained this comment:
|
||||
|
||||
Much thanks to Andrei Alexandrescu,
|
||||
Walter Brown,
|
||||
Peter Dimov,
|
||||
Jeff Garland,
|
||||
Terry Golubiewski,
|
||||
Daniel Krugler,
|
||||
Anthony Williams.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BOOST_CHRONO_DURATION_HPP
|
||||
#define BOOST_CHRONO_DURATION_HPP
|
||||
|
||||
#include <boost/chrono/config.hpp>
|
||||
#include <boost/chrono/detail/static_assert.hpp>
|
||||
|
||||
#include <climits>
|
||||
#include <limits>
|
||||
|
||||
|
||||
#include <boost/mpl/logical.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/type_traits/common_type.hpp>
|
||||
#include <boost/type_traits/is_arithmetic.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/type_traits/is_floating_point.hpp>
|
||||
#include <boost/type_traits/is_unsigned.hpp>
|
||||
#include <boost/chrono/detail/is_evenly_divisible_by.hpp>
|
||||
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/integer_traits.hpp>
|
||||
|
||||
#if !defined(BOOST_NO_STATIC_ASSERT) || !defined(BOOST_CHRONO_USES_MPL_ASSERT)
|
||||
#define BOOST_CHRONO_A_DURATION_REPRESENTATION_CAN_NOT_BE_A_DURATION "A duration representation can not be a duration"
|
||||
#define BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_DURATION_MUST_BE_A_STD_RATIO "Second template parameter of duration must be a boost::ratio"
|
||||
#define BOOST_CHRONO_DURATION_PERIOD_MUST_BE_POSITIVE "duration period must be positive"
|
||||
#define BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_TIME_POINT_MUST_BE_A_BOOST_CHRONO_DURATION "Second template parameter of time_point must be a boost::chrono::duration"
|
||||
#endif
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// //
|
||||
// 20.9 Time utilities [time] //
|
||||
// synopsis //
|
||||
// //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
namespace boost {
|
||||
namespace chrono {
|
||||
|
||||
template <class Rep, class Period = ratio<1> >
|
||||
class duration;
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template <class T>
|
||||
struct is_duration
|
||||
: boost::false_type {};
|
||||
|
||||
template <class Rep, class Period>
|
||||
struct is_duration<duration<Rep, Period> >
|
||||
: boost::true_type {};
|
||||
|
||||
template <class Duration, class Rep, bool = is_duration<Rep>::value>
|
||||
struct duration_divide_result
|
||||
{
|
||||
};
|
||||
|
||||
template <class Duration, class Rep2,
|
||||
bool = (
|
||||
((boost::is_convertible<typename Duration::rep,
|
||||
typename common_type<typename Duration::rep, Rep2>::type>::value))
|
||||
&& ((boost::is_convertible<Rep2,
|
||||
typename common_type<typename Duration::rep, Rep2>::type>::value))
|
||||
)
|
||||
>
|
||||
struct duration_divide_imp
|
||||
{
|
||||
};
|
||||
|
||||
template <class Rep1, class Period, class Rep2>
|
||||
struct duration_divide_imp<duration<Rep1, Period>, Rep2, true>
|
||||
{
|
||||
typedef duration<typename common_type<Rep1, Rep2>::type, Period> type;
|
||||
};
|
||||
|
||||
template <class Rep1, class Period, class Rep2>
|
||||
struct duration_divide_result<duration<Rep1, Period>, Rep2, false>
|
||||
: duration_divide_imp<duration<Rep1, Period>, Rep2>
|
||||
{
|
||||
};
|
||||
|
||||
///
|
||||
template <class Rep, class Duration, bool = is_duration<Rep>::value>
|
||||
struct duration_divide_result2
|
||||
{
|
||||
};
|
||||
|
||||
template <class Rep, class Duration,
|
||||
bool = (
|
||||
((boost::is_convertible<typename Duration::rep,
|
||||
typename common_type<typename Duration::rep, Rep>::type>::value))
|
||||
&& ((boost::is_convertible<Rep,
|
||||
typename common_type<typename Duration::rep, Rep>::type>::value))
|
||||
)
|
||||
>
|
||||
struct duration_divide_imp2
|
||||
{
|
||||
};
|
||||
|
||||
template <class Rep1, class Rep2, class Period >
|
||||
struct duration_divide_imp2<Rep1, duration<Rep2, Period>, true>
|
||||
{
|
||||
//typedef typename common_type<Rep1, Rep2>::type type;
|
||||
typedef double type;
|
||||
};
|
||||
|
||||
template <class Rep1, class Rep2, class Period >
|
||||
struct duration_divide_result2<Rep1, duration<Rep2, Period>, false>
|
||||
: duration_divide_imp2<Rep1, duration<Rep2, Period> >
|
||||
{
|
||||
};
|
||||
|
||||
///
|
||||
template <class Duration, class Rep, bool = is_duration<Rep>::value>
|
||||
struct duration_modulo_result
|
||||
{
|
||||
};
|
||||
|
||||
template <class Duration, class Rep2,
|
||||
bool = (
|
||||
//boost::is_convertible<typename Duration::rep,
|
||||
//typename common_type<typename Duration::rep, Rep2>::type>::value
|
||||
//&&
|
||||
boost::is_convertible<Rep2,
|
||||
typename common_type<typename Duration::rep, Rep2>::type>::value
|
||||
)
|
||||
>
|
||||
struct duration_modulo_imp
|
||||
{
|
||||
};
|
||||
|
||||
template <class Rep1, class Period, class Rep2>
|
||||
struct duration_modulo_imp<duration<Rep1, Period>, Rep2, true>
|
||||
{
|
||||
typedef duration<typename common_type<Rep1, Rep2>::type, Period> type;
|
||||
};
|
||||
|
||||
template <class Rep1, class Period, class Rep2>
|
||||
struct duration_modulo_result<duration<Rep1, Period>, Rep2, false>
|
||||
: duration_modulo_imp<duration<Rep1, Period>, Rep2>
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
} // namespace chrono
|
||||
|
||||
|
||||
// common_type trait specializations
|
||||
|
||||
template <class Rep1, class Period1, class Rep2, class Period2>
|
||||
struct common_type<chrono::duration<Rep1, Period1>,
|
||||
chrono::duration<Rep2, Period2> >;
|
||||
|
||||
|
||||
namespace chrono {
|
||||
|
||||
// customization traits
|
||||
template <class Rep> struct treat_as_floating_point;
|
||||
template <class Rep> struct duration_values;
|
||||
|
||||
// convenience typedefs
|
||||
typedef duration<boost::int_least64_t, nano> nanoseconds; // at least 64 bits needed
|
||||
typedef duration<boost::int_least64_t, micro> microseconds; // at least 55 bits needed
|
||||
typedef duration<boost::int_least64_t, milli> milliseconds; // at least 45 bits needed
|
||||
typedef duration<boost::int_least64_t> seconds; // at least 35 bits needed
|
||||
typedef duration<boost::int_least32_t, ratio< 60> > minutes; // at least 29 bits needed
|
||||
typedef duration<boost::int_least32_t, ratio<3600> > hours; // at least 23 bits needed
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// duration helpers //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// duration_cast
|
||||
|
||||
// duration_cast is the heart of this whole prototype. It can convert any
|
||||
// duration to any other. It is also (implicitly) used in converting
|
||||
// time_points. The conversion is always exact if possible. And it is
|
||||
// always as efficient as hand written code. If different representations
|
||||
// are involved, care is taken to never require implicit conversions.
|
||||
// Instead static_cast is used explicitly for every required conversion.
|
||||
// If there are a mixture of integral and floating point representations,
|
||||
// the use of common_type ensures that the most logical "intermediate"
|
||||
// representation is used.
|
||||
template <class FromDuration, class ToDuration,
|
||||
class Period,
|
||||
bool PeriodNumEq1,
|
||||
bool PeriodDenEq1>
|
||||
struct duration_cast_aux;
|
||||
|
||||
// When the two periods are the same, all that is left to do is static_cast from
|
||||
// the source representation to the target representation (which may be a no-op).
|
||||
// This conversion is always exact as long as the static_cast from the source
|
||||
// representation to the destination representation is exact.
|
||||
template <class FromDuration, class ToDuration, class Period>
|
||||
struct duration_cast_aux<FromDuration, ToDuration, Period, true, true>
|
||||
{
|
||||
BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const
|
||||
{
|
||||
return ToDuration(static_cast<typename ToDuration::rep>(fd.count()));
|
||||
}
|
||||
};
|
||||
|
||||
// When the numerator of FromPeriod / ToPeriod is 1, then all we need to do is
|
||||
// divide by the denominator of FromPeriod / ToPeriod. The common_type of
|
||||
// the two representations is used for the intermediate computation before
|
||||
// static_cast'ing to the destination.
|
||||
// This conversion is generally not exact because of the division (but could be
|
||||
// if you get lucky on the run time value of fd.count()).
|
||||
template <class FromDuration, class ToDuration, class Period>
|
||||
struct duration_cast_aux<FromDuration, ToDuration, Period, true, false>
|
||||
{
|
||||
BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const
|
||||
{
|
||||
typedef typename common_type<
|
||||
typename ToDuration::rep,
|
||||
typename FromDuration::rep,
|
||||
boost::intmax_t>::type C;
|
||||
return ToDuration(static_cast<typename ToDuration::rep>(
|
||||
static_cast<C>(fd.count()) / static_cast<C>(Period::den)));
|
||||
}
|
||||
};
|
||||
|
||||
// When the denominator of FromPeriod / ToPeriod is 1, then all we need to do is
|
||||
// multiply by the numerator of FromPeriod / ToPeriod. The common_type of
|
||||
// the two representations is used for the intermediate computation before
|
||||
// static_cast'ing to the destination.
|
||||
// This conversion is always exact as long as the static_cast's involved are exact.
|
||||
template <class FromDuration, class ToDuration, class Period>
|
||||
struct duration_cast_aux<FromDuration, ToDuration, Period, false, true>
|
||||
{
|
||||
BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const
|
||||
{
|
||||
typedef typename common_type<
|
||||
typename ToDuration::rep,
|
||||
typename FromDuration::rep,
|
||||
boost::intmax_t>::type C;
|
||||
return ToDuration(static_cast<typename ToDuration::rep>(
|
||||
static_cast<C>(fd.count()) * static_cast<C>(Period::num)));
|
||||
}
|
||||
};
|
||||
|
||||
// When neither the numerator or denominator of FromPeriod / ToPeriod is 1, then we need to
|
||||
// multiply by the numerator and divide by the denominator of FromPeriod / ToPeriod. The
|
||||
// common_type of the two representations is used for the intermediate computation before
|
||||
// static_cast'ing to the destination.
|
||||
// This conversion is generally not exact because of the division (but could be
|
||||
// if you get lucky on the run time value of fd.count()).
|
||||
template <class FromDuration, class ToDuration, class Period>
|
||||
struct duration_cast_aux<FromDuration, ToDuration, Period, false, false>
|
||||
{
|
||||
BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const
|
||||
{
|
||||
typedef typename common_type<
|
||||
typename ToDuration::rep,
|
||||
typename FromDuration::rep,
|
||||
boost::intmax_t>::type C;
|
||||
return ToDuration(static_cast<typename ToDuration::rep>(
|
||||
static_cast<C>(fd.count()) * static_cast<C>(Period::num)
|
||||
/ static_cast<C>(Period::den)));
|
||||
}
|
||||
};
|
||||
|
||||
template <class FromDuration, class ToDuration>
|
||||
struct duration_cast {
|
||||
typedef typename ratio_divide<typename FromDuration::period,
|
||||
typename ToDuration::period>::type Period;
|
||||
typedef duration_cast_aux<
|
||||
FromDuration,
|
||||
ToDuration,
|
||||
Period,
|
||||
Period::num == 1,
|
||||
Period::den == 1
|
||||
> Aux;
|
||||
BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const
|
||||
{
|
||||
return Aux()(fd);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// //
|
||||
// 20.9.2 Time-related traits [time.traits] //
|
||||
// //
|
||||
//----------------------------------------------------------------------------//
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.2.1 treat_as_floating_point [time.traits.is_fp] //
|
||||
// Probably should have been treat_as_floating_point. Editor notifed. //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
// Support bidirectional (non-exact) conversions for floating point rep types
|
||||
// (or user defined rep types which specialize treat_as_floating_point).
|
||||
template <class Rep>
|
||||
struct treat_as_floating_point : boost::is_floating_point<Rep> {};
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.2.2 duration_values [time.traits.duration_values] //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
namespace detail {
|
||||
template <class T, bool = is_arithmetic<T>::value>
|
||||
struct chrono_numeric_limits {
|
||||
static T lowest() throw() {return (std::numeric_limits<T>::min) ();}
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct chrono_numeric_limits<T,true> {
|
||||
static T lowest() throw() {return (std::numeric_limits<T>::min) ();}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct chrono_numeric_limits<float,true> {
|
||||
static float lowest() throw()
|
||||
{
|
||||
return -(std::numeric_limits<float>::max) ();
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct chrono_numeric_limits<double,true> {
|
||||
static double lowest() throw()
|
||||
{
|
||||
return -(std::numeric_limits<double>::max) ();
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct chrono_numeric_limits<long double,true> {
|
||||
static long double lowest() throw()
|
||||
{
|
||||
return -(std::numeric_limits<long double>::max)();
|
||||
}
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct numeric_limits : chrono_numeric_limits<typename remove_cv<T>::type>
|
||||
{};
|
||||
|
||||
}
|
||||
template <class Rep>
|
||||
struct duration_values
|
||||
{
|
||||
static BOOST_CONSTEXPR Rep zero() {return Rep(0);}
|
||||
static BOOST_CONSTEXPR Rep max BOOST_PREVENT_MACRO_SUBSTITUTION ()
|
||||
{
|
||||
return (std::numeric_limits<Rep>::max)();
|
||||
}
|
||||
|
||||
static BOOST_CONSTEXPR Rep min BOOST_PREVENT_MACRO_SUBSTITUTION ()
|
||||
{
|
||||
return detail::numeric_limits<Rep>::lowest();
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace chrono
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.2.3 Specializations of common_type [time.traits.specializations] //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
template <class Rep1, class Period1, class Rep2, class Period2>
|
||||
struct common_type<chrono::duration<Rep1, Period1>,
|
||||
chrono::duration<Rep2, Period2> >
|
||||
{
|
||||
typedef chrono::duration<typename common_type<Rep1, Rep2>::type,
|
||||
typename boost::ratio_gcd<Period1, Period2>::type> type;
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// //
|
||||
// 20.9.3 Class template duration [time.duration] //
|
||||
// //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
|
||||
namespace chrono {
|
||||
|
||||
template <class Rep, class Period>
|
||||
class duration
|
||||
{
|
||||
//BOOST_CHRONO_STATIC_ASSERT(boost::is_integral<Rep>::value, BOOST_CHRONO_A_DURATION_REPRESENTATION_MUST_BE_INTEGRAL, ());
|
||||
BOOST_CHRONO_STATIC_ASSERT(!boost::chrono::detail::is_duration<Rep>::value,
|
||||
BOOST_CHRONO_A_DURATION_REPRESENTATION_CAN_NOT_BE_A_DURATION, ());
|
||||
BOOST_CHRONO_STATIC_ASSERT(boost::ratio_detail::is_ratio<typename Period::type>::value,
|
||||
BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_DURATION_MUST_BE_A_STD_RATIO, ());
|
||||
BOOST_CHRONO_STATIC_ASSERT(Period::num>0,
|
||||
BOOST_CHRONO_DURATION_PERIOD_MUST_BE_POSITIVE, ());
|
||||
public:
|
||||
typedef Rep rep;
|
||||
typedef Period period;
|
||||
private:
|
||||
rep rep_;
|
||||
public:
|
||||
|
||||
BOOST_CONSTEXPR
|
||||
duration() : rep_(duration_values<rep>::zero()) { }
|
||||
template <class Rep2>
|
||||
BOOST_CONSTEXPR
|
||||
explicit duration(const Rep2& r
|
||||
, typename boost::enable_if <
|
||||
mpl::and_ <
|
||||
boost::is_convertible<Rep2, rep>,
|
||||
mpl::or_ <
|
||||
treat_as_floating_point<rep>,
|
||||
mpl::and_ <
|
||||
mpl::not_ < treat_as_floating_point<rep> >,
|
||||
mpl::not_ < treat_as_floating_point<Rep2> >
|
||||
>
|
||||
>
|
||||
>
|
||||
>::type* = 0
|
||||
) : rep_(r) { }
|
||||
~duration() {} //= default;
|
||||
BOOST_CONSTEXPR
|
||||
duration(const duration& rhs) : rep_(rhs.rep_) {} // = default;
|
||||
duration& operator=(const duration& rhs) // = default;
|
||||
{
|
||||
if (&rhs != this) rep_= rhs.rep_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// conversions
|
||||
template <class Rep2, class Period2>
|
||||
BOOST_CONSTEXPR
|
||||
duration(const duration<Rep2, Period2>& d
|
||||
, typename boost::enable_if <
|
||||
mpl::or_ <
|
||||
treat_as_floating_point<rep>,
|
||||
mpl::and_ <
|
||||
chrono_detail::is_evenly_divisible_by<Period2, period>,
|
||||
mpl::not_ < treat_as_floating_point<Rep2> >
|
||||
>
|
||||
>
|
||||
>::type* = 0
|
||||
)
|
||||
: rep_(chrono::detail::duration_cast<duration<Rep2, Period2>, duration>()(d).count()) {}
|
||||
|
||||
// observer
|
||||
|
||||
BOOST_CONSTEXPR
|
||||
rep count() const {return rep_;}
|
||||
|
||||
// arithmetic
|
||||
|
||||
BOOST_CONSTEXPR
|
||||
duration operator+() const {return *this;}
|
||||
BOOST_CONSTEXPR
|
||||
duration operator-() const {return duration(-rep_);}
|
||||
duration& operator++() {++rep_; return *this;}
|
||||
duration operator++(int) {return duration(rep_++);}
|
||||
duration& operator--() {--rep_; return *this;}
|
||||
duration operator--(int) {return duration(rep_--);}
|
||||
|
||||
duration& operator+=(const duration& d)
|
||||
{
|
||||
rep_ += d.count(); return *this;
|
||||
}
|
||||
duration& operator-=(const duration& d)
|
||||
{
|
||||
rep_ -= d.count(); return *this;
|
||||
}
|
||||
|
||||
duration& operator*=(const rep& rhs) {rep_ *= rhs; return *this;}
|
||||
duration& operator/=(const rep& rhs) {rep_ /= rhs; return *this;}
|
||||
duration& operator%=(const rep& rhs) {rep_ %= rhs; return *this;}
|
||||
duration& operator%=(const duration& rhs)
|
||||
{
|
||||
rep_ %= rhs.count(); return *this;
|
||||
}
|
||||
// 20.9.3.4 duration special values [time.duration.special]
|
||||
|
||||
static BOOST_CONSTEXPR duration zero()
|
||||
{
|
||||
return duration(duration_values<rep>::zero());
|
||||
}
|
||||
static BOOST_CONSTEXPR duration min BOOST_PREVENT_MACRO_SUBSTITUTION ()
|
||||
{
|
||||
return duration((duration_values<rep>::min)());
|
||||
}
|
||||
static BOOST_CONSTEXPR duration max BOOST_PREVENT_MACRO_SUBSTITUTION ()
|
||||
{
|
||||
return duration((duration_values<rep>::max)());
|
||||
}
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.3.5 duration non-member arithmetic [time.duration.nonmember] //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
// Duration +
|
||||
|
||||
template <class Rep1, class Period1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type
|
||||
operator+(const duration<Rep1, Period1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs)
|
||||
{
|
||||
typedef typename common_type<duration<Rep1, Period1>,
|
||||
duration<Rep2, Period2> >::type CD;
|
||||
return CD(CD(lhs).count()+CD(rhs).count());
|
||||
}
|
||||
|
||||
// Duration -
|
||||
|
||||
template <class Rep1, class Period1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type
|
||||
operator-(const duration<Rep1, Period1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs)
|
||||
{
|
||||
typedef typename common_type<duration<Rep1, Period1>,
|
||||
duration<Rep2, Period2> >::type CD;
|
||||
return CD(CD(lhs).count()-CD(rhs).count());
|
||||
}
|
||||
|
||||
// Duration *
|
||||
|
||||
template <class Rep1, class Period, class Rep2>
|
||||
inline BOOST_CONSTEXPR
|
||||
typename boost::enable_if <
|
||||
mpl::and_ <
|
||||
boost::is_convertible<Rep1, typename common_type<Rep1, Rep2>::type>,
|
||||
boost::is_convertible<Rep2, typename common_type<Rep1, Rep2>::type>
|
||||
>,
|
||||
duration<typename common_type<Rep1, Rep2>::type, Period>
|
||||
>::type
|
||||
operator*(const duration<Rep1, Period>& d, const Rep2& s)
|
||||
{
|
||||
typedef typename common_type<Rep1, Rep2>::type CR;
|
||||
typedef duration<CR, Period> CD;
|
||||
return CD(CD(d).count()*static_cast<CR>(s));
|
||||
}
|
||||
|
||||
template <class Rep1, class Period, class Rep2>
|
||||
inline BOOST_CONSTEXPR
|
||||
typename boost::enable_if <
|
||||
mpl::and_ <
|
||||
boost::is_convertible<Rep1, typename common_type<Rep1, Rep2>::type>,
|
||||
boost::is_convertible<Rep2, typename common_type<Rep1, Rep2>::type>
|
||||
>,
|
||||
duration<typename common_type<Rep1, Rep2>::type, Period>
|
||||
>::type
|
||||
operator*(const Rep1& s, const duration<Rep2, Period>& d)
|
||||
{
|
||||
return d * s;
|
||||
}
|
||||
|
||||
// Duration /
|
||||
|
||||
template <class Rep1, class Period, class Rep2>
|
||||
inline BOOST_CONSTEXPR
|
||||
typename boost::disable_if <boost::chrono::detail::is_duration<Rep2>,
|
||||
typename boost::chrono::detail::duration_divide_result<
|
||||
duration<Rep1, Period>, Rep2>::type
|
||||
>::type
|
||||
operator/(const duration<Rep1, Period>& d, const Rep2& s)
|
||||
{
|
||||
typedef typename common_type<Rep1, Rep2>::type CR;
|
||||
typedef duration<CR, Period> CD;
|
||||
|
||||
return CD(CD(d).count()/static_cast<CR>(s));
|
||||
}
|
||||
|
||||
template <class Rep1, class Period1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
typename common_type<Rep1, Rep2>::type
|
||||
operator/(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs)
|
||||
{
|
||||
typedef typename common_type<duration<Rep1, Period1>,
|
||||
duration<Rep2, Period2> >::type CD;
|
||||
return CD(lhs).count() / CD(rhs).count();
|
||||
}
|
||||
|
||||
#ifdef BOOST_CHRONO_EXTENSIONS
|
||||
template <class Rep1, class Rep2, class Period>
|
||||
inline BOOST_CONSTEXPR
|
||||
typename boost::disable_if <boost::chrono::detail::is_duration<Rep1>,
|
||||
typename boost::chrono::detail::duration_divide_result2<
|
||||
Rep1, duration<Rep2, Period> >::type
|
||||
>::type
|
||||
operator/(const Rep1& s, const duration<Rep2, Period>& d)
|
||||
{
|
||||
typedef typename common_type<Rep1, Rep2>::type CR;
|
||||
typedef duration<CR, Period> CD;
|
||||
|
||||
return static_cast<CR>(s)/CD(d).count();
|
||||
}
|
||||
#endif
|
||||
// Duration %
|
||||
|
||||
template <class Rep1, class Period, class Rep2>
|
||||
inline BOOST_CONSTEXPR
|
||||
typename boost::disable_if <boost::chrono::detail::is_duration<Rep2>,
|
||||
typename boost::chrono::detail::duration_modulo_result<
|
||||
duration<Rep1, Period>, Rep2>::type
|
||||
>::type
|
||||
operator%(const duration<Rep1, Period>& d, const Rep2& s)
|
||||
{
|
||||
typedef typename common_type<Rep1, Rep2>::type CR;
|
||||
typedef duration<CR, Period> CD;
|
||||
|
||||
return CD(CD(d).count()%static_cast<CR>(s));
|
||||
}
|
||||
|
||||
template <class Rep1, class Period1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type
|
||||
operator%(const duration<Rep1, Period1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs) {
|
||||
typedef typename common_type<duration<Rep1, Period1>,
|
||||
duration<Rep2, Period2> >::type CD;
|
||||
|
||||
return CD(CD(lhs).count()%CD(rhs).count());
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.3.6 duration comparisons [time.duration.comparisons] //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template <class LhsDuration, class RhsDuration>
|
||||
struct duration_eq
|
||||
{
|
||||
bool operator()(const LhsDuration& lhs, const RhsDuration& rhs)
|
||||
{
|
||||
typedef typename common_type<LhsDuration, RhsDuration>::type CD;
|
||||
return CD(lhs).count() == CD(rhs).count();
|
||||
}
|
||||
};
|
||||
|
||||
template <class LhsDuration>
|
||||
struct duration_eq<LhsDuration, LhsDuration>
|
||||
{
|
||||
bool operator()(const LhsDuration& lhs, const LhsDuration& rhs)
|
||||
{
|
||||
return lhs.count() == rhs.count();
|
||||
}
|
||||
};
|
||||
|
||||
template <class LhsDuration, class RhsDuration>
|
||||
struct duration_lt
|
||||
{
|
||||
bool operator()(const LhsDuration& lhs, const RhsDuration& rhs)
|
||||
{
|
||||
typedef typename common_type<LhsDuration, RhsDuration>::type CD;
|
||||
return CD(lhs).count() < CD(rhs).count();
|
||||
}
|
||||
};
|
||||
|
||||
template <class LhsDuration>
|
||||
struct duration_lt<LhsDuration, LhsDuration>
|
||||
{
|
||||
bool operator()(const LhsDuration& lhs, const LhsDuration& rhs)
|
||||
{
|
||||
return lhs.count() < rhs.count();
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
// Duration ==
|
||||
|
||||
template <class Rep1, class Period1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool
|
||||
operator==(const duration<Rep1, Period1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs)
|
||||
{
|
||||
return boost::chrono::detail::duration_eq<
|
||||
duration<Rep1, Period1>, duration<Rep2, Period2> >()(lhs, rhs);
|
||||
}
|
||||
|
||||
// Duration !=
|
||||
|
||||
template <class Rep1, class Period1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool
|
||||
operator!=(const duration<Rep1, Period1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs)
|
||||
{
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
// Duration <
|
||||
|
||||
template <class Rep1, class Period1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool
|
||||
operator< (const duration<Rep1, Period1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs)
|
||||
{
|
||||
return boost::chrono::detail::duration_lt<
|
||||
duration<Rep1, Period1>, duration<Rep2, Period2> >()(lhs, rhs);
|
||||
}
|
||||
|
||||
// Duration >
|
||||
|
||||
template <class Rep1, class Period1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool
|
||||
operator> (const duration<Rep1, Period1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs)
|
||||
{
|
||||
return rhs < lhs;
|
||||
}
|
||||
|
||||
// Duration <=
|
||||
|
||||
template <class Rep1, class Period1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool
|
||||
operator<=(const duration<Rep1, Period1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs)
|
||||
{
|
||||
return !(rhs < lhs);
|
||||
}
|
||||
|
||||
// Duration >=
|
||||
|
||||
template <class Rep1, class Period1, class Rep2, class Period2>
|
||||
inline
|
||||
bool
|
||||
operator>=(const duration<Rep1, Period1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs)
|
||||
{
|
||||
return !(lhs < rhs);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.3.7 duration_cast [time.duration.cast] //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
// Compile-time select the most efficient algorithm for the conversion...
|
||||
template <class ToDuration, class Rep, class Period>
|
||||
inline BOOST_CONSTEXPR
|
||||
typename boost::enable_if <
|
||||
boost::chrono::detail::is_duration<ToDuration>, ToDuration>::type
|
||||
duration_cast(const duration<Rep, Period>& fd)
|
||||
{
|
||||
return boost::chrono::detail::duration_cast<
|
||||
duration<Rep, Period>, ToDuration>()(fd);
|
||||
}
|
||||
|
||||
} // namespace chrono
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_CHRONO_DURATION_HPP
|
229
cpp/BoostParts/boost/chrono/system_clocks.hpp
Normal file
229
cpp/BoostParts/boost/chrono/system_clocks.hpp
Normal file
@ -0,0 +1,229 @@
|
||||
// boost/chrono/system_clocks.hpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright 2008 Howard Hinnant
|
||||
// Copyright 2008 Beman Dawes
|
||||
// Copyright 2009-2011 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
/*
|
||||
|
||||
This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
|
||||
Many thanks to Howard for making his code available under the Boost license.
|
||||
The original code was modified to conform to Boost conventions and to section
|
||||
20.9 Time utilities [time] of the C++ committee's working paper N2798.
|
||||
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
|
||||
|
||||
time2_demo contained this comment:
|
||||
|
||||
Much thanks to Andrei Alexandrescu,
|
||||
Walter Brown,
|
||||
Peter Dimov,
|
||||
Jeff Garland,
|
||||
Terry Golubiewski,
|
||||
Daniel Krugler,
|
||||
Anthony Williams.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
TODO:
|
||||
|
||||
* Fully implement error handling, with test cases.
|
||||
* Use boost::throw_exception. (Currently not used because of an issue with Intel 11.0.)
|
||||
* Consider issues raised by Michael Marcin:
|
||||
|
||||
> In the past I've seen QueryPerformanceCounter give incorrect results,
|
||||
> especially with SpeedStep processors on laptops. This was many years ago and
|
||||
> might have been fixed by service packs and drivers.
|
||||
>
|
||||
> Typically you check the results of QPC against GetTickCount to see if the
|
||||
> results are reasonable.
|
||||
> http://support.microsoft.com/kb/274323
|
||||
>
|
||||
> I've also heard of problems with QueryPerformanceCounter in multi-processor
|
||||
> systems.
|
||||
>
|
||||
> I know some people SetThreadAffinityMask to 1 for the current thread call
|
||||
> their QueryPerformance* functions then restore SetThreadAffinityMask. This
|
||||
> seems horrible to me because it forces your program to jump to another
|
||||
> physical processor if it isn't already on cpu0 but they claim it worked well
|
||||
> in practice because they called the timing functions infrequently.
|
||||
>
|
||||
> In the past I have chosen to use timeGetTime with timeBeginPeriod(1) for
|
||||
> high resolution timers to avoid these issues.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef BOOST_CHRONO_SYSTEM_CLOCKS_HPP
|
||||
#define BOOST_CHRONO_SYSTEM_CLOCKS_HPP
|
||||
|
||||
#include <boost/chrono/config.hpp>
|
||||
#include <boost/chrono/duration.hpp>
|
||||
#include <boost/chrono/time_point.hpp>
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
#include <boost/chrono/detail/system.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
#endif
|
||||
#include <boost/chrono/clock_string.hpp>
|
||||
|
||||
#include <ctime>
|
||||
|
||||
#ifdef BOOST_CHRONO_WINDOWS_API
|
||||
// The system_clock tick is 100 nanoseconds
|
||||
# define BOOST_SYSTEM_CLOCK_DURATION boost::chrono::duration<boost::int_least64_t, ratio<BOOST_RATIO_INTMAX_C(1), BOOST_RATIO_INTMAX_C(10000000)> >
|
||||
#else
|
||||
# define BOOST_SYSTEM_CLOCK_DURATION boost::chrono::nanoseconds
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_CHRONO_HEADER_ONLY
|
||||
#include <boost/config/abi_prefix.hpp> // must be the last #include
|
||||
#endif
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// //
|
||||
// 20.9 Time utilities [time] //
|
||||
// synopsis //
|
||||
// //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
namespace boost {
|
||||
namespace chrono {
|
||||
|
||||
// Clocks
|
||||
class BOOST_CHRONO_DECL system_clock;
|
||||
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
|
||||
class BOOST_CHRONO_DECL steady_clock;
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
|
||||
typedef steady_clock high_resolution_clock; // as permitted by [time.clock.hires]
|
||||
#else
|
||||
typedef system_clock high_resolution_clock; // as permitted by [time.clock.hires]
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// //
|
||||
// 20.9.5 Clocks [time.clock] //
|
||||
// //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
// If you're porting, clocks are the system-specific (non-portable) part.
|
||||
// You'll need to know how to get the current time and implement that under now().
|
||||
// You'll need to know what units (tick period) and representation makes the most
|
||||
// sense for your clock and set those accordingly.
|
||||
// If you know how to map this clock to time_t (perhaps your clock is std::time, which
|
||||
// makes that trivial), then you can fill out system_clock's to_time_t() and from_time_t().
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.5.1 Class system_clock [time.clock.system] //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
class BOOST_CHRONO_DECL system_clock
|
||||
{
|
||||
public:
|
||||
typedef BOOST_SYSTEM_CLOCK_DURATION duration;
|
||||
typedef duration::rep rep;
|
||||
typedef duration::period period;
|
||||
typedef chrono::time_point<system_clock> time_point;
|
||||
BOOST_STATIC_CONSTEXPR bool is_steady = false;
|
||||
|
||||
static BOOST_CHRONO_INLINE time_point now() BOOST_NOEXCEPT;
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
static BOOST_CHRONO_INLINE time_point now(system::error_code & ec);
|
||||
#endif
|
||||
|
||||
static BOOST_CHRONO_INLINE std::time_t to_time_t(const time_point& t) BOOST_NOEXCEPT;
|
||||
static BOOST_CHRONO_INLINE time_point from_time_t(std::time_t t) BOOST_NOEXCEPT;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.5.2 Class steady_clock [time.clock.steady] //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
// As permitted by [time.clock.steady]
|
||||
// The class steady_clock is conditionally supported.
|
||||
|
||||
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
|
||||
class BOOST_CHRONO_DECL steady_clock
|
||||
{
|
||||
public:
|
||||
typedef nanoseconds duration;
|
||||
typedef duration::rep rep;
|
||||
typedef duration::period period;
|
||||
typedef chrono::time_point<steady_clock> time_point;
|
||||
BOOST_STATIC_CONSTEXPR bool is_steady = true;
|
||||
|
||||
static BOOST_CHRONO_INLINE time_point now() BOOST_NOEXCEPT;
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
static BOOST_CHRONO_INLINE time_point now(system::error_code & ec);
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.5.3 Class high_resolution_clock [time.clock.hires] //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
// As permitted, steady_clock or system_clock is a typedef for high_resolution_clock.
|
||||
// See synopsis.
|
||||
|
||||
|
||||
template<class CharT>
|
||||
struct clock_string<system_clock, CharT>
|
||||
{
|
||||
static std::basic_string<CharT> name()
|
||||
{
|
||||
static const CharT u[] =
|
||||
{ 's', 'y', 's', 't', 'e', 'm', '_', 'c', 'l', 'o', 'c', 'k' };
|
||||
static const std::basic_string<CharT> str(u, u + sizeof(u)
|
||||
/ sizeof(u[0]));
|
||||
return str;
|
||||
}
|
||||
static std::basic_string<CharT> since()
|
||||
{
|
||||
static const CharT
|
||||
u[] =
|
||||
{ ' ', 's', 'i', 'n', 'c', 'e', ' ', 'J', 'a', 'n', ' ', '1', ',', ' ', '1', '9', '7', '0' };
|
||||
static const std::basic_string<CharT> str(u, u + sizeof(u)
|
||||
/ sizeof(u[0]));
|
||||
return str;
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
|
||||
|
||||
template<class CharT>
|
||||
struct clock_string<steady_clock, CharT>
|
||||
{
|
||||
static std::basic_string<CharT> name()
|
||||
{
|
||||
static const CharT
|
||||
u[] =
|
||||
{ 's', 't', 'e', 'a', 'd', 'y', '_', 'c', 'l', 'o', 'c', 'k' };
|
||||
static const std::basic_string<CharT> str(u, u + sizeof(u)
|
||||
/ sizeof(u[0]));
|
||||
return str;
|
||||
}
|
||||
static std::basic_string<CharT> since()
|
||||
{
|
||||
const CharT u[] =
|
||||
{ ' ', 's', 'i', 'n', 'c', 'e', ' ', 'b', 'o', 'o', 't' };
|
||||
const std::basic_string<CharT> str(u, u + sizeof(u) / sizeof(u[0]));
|
||||
return str;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace chrono
|
||||
} // namespace boost
|
||||
|
||||
#ifndef BOOST_CHRONO_HEADER_ONLY
|
||||
#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
|
||||
#else
|
||||
#include <boost/chrono/detail/inlined/chrono.hpp>
|
||||
#endif
|
||||
|
||||
#endif // BOOST_CHRONO_SYSTEM_CLOCKS_HPP
|
371
cpp/BoostParts/boost/chrono/time_point.hpp
Normal file
371
cpp/BoostParts/boost/chrono/time_point.hpp
Normal file
@ -0,0 +1,371 @@
|
||||
// duration.hpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright 2008 Howard Hinnant
|
||||
// Copyright 2008 Beman Dawes
|
||||
// Copyright 2009-2011 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
/*
|
||||
|
||||
This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
|
||||
Many thanks to Howard for making his code available under the Boost license.
|
||||
The original code was modified to conform to Boost conventions and to section
|
||||
20.9 Time utilities [time] of the C++ committee's working paper N2798.
|
||||
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
|
||||
|
||||
time2_demo contained this comment:
|
||||
|
||||
Much thanks to Andrei Alexandrescu,
|
||||
Walter Brown,
|
||||
Peter Dimov,
|
||||
Jeff Garland,
|
||||
Terry Golubiewski,
|
||||
Daniel Krugler,
|
||||
Anthony Williams.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BOOST_CHRONO_TIME_POINT_HPP
|
||||
#define BOOST_CHRONO_TIME_POINT_HPP
|
||||
|
||||
#include <boost/chrono/duration.hpp>
|
||||
#include <iostream>
|
||||
#include <boost/chrono/detail/system.hpp>
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// //
|
||||
// 20.9 Time utilities [time] //
|
||||
// synopsis //
|
||||
// //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
namespace boost {
|
||||
namespace chrono {
|
||||
|
||||
template <class Clock, class Duration = typename Clock::duration>
|
||||
class time_point;
|
||||
|
||||
|
||||
} // namespace chrono
|
||||
|
||||
|
||||
// common_type trait specializations
|
||||
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
struct common_type<chrono::time_point<Clock, Duration1>,
|
||||
chrono::time_point<Clock, Duration2> >;
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.2.3 Specializations of common_type [time.traits.specializations] //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
struct common_type<chrono::time_point<Clock, Duration1>,
|
||||
chrono::time_point<Clock, Duration2> >
|
||||
{
|
||||
typedef chrono::time_point<Clock,
|
||||
typename common_type<Duration1, Duration2>::type> type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
namespace chrono {
|
||||
|
||||
// time_point arithmetic
|
||||
template <class Clock, class Duration1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
time_point<Clock,
|
||||
typename common_type<Duration1, duration<Rep2, Period2> >::type>
|
||||
operator+(
|
||||
const time_point<Clock, Duration1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs);
|
||||
template <class Rep1, class Period1, class Clock, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
time_point<Clock,
|
||||
typename common_type<duration<Rep1, Period1>, Duration2>::type>
|
||||
operator+(
|
||||
const duration<Rep1, Period1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs);
|
||||
template <class Clock, class Duration1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
time_point<Clock,
|
||||
typename common_type<Duration1, duration<Rep2, Period2> >::type>
|
||||
operator-(
|
||||
const time_point<Clock, Duration1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs);
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
typename common_type<Duration1, Duration2>::type
|
||||
operator-(
|
||||
const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock,
|
||||
Duration2>& rhs);
|
||||
|
||||
// time_point comparisons
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool operator==(
|
||||
const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs);
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool operator!=(
|
||||
const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs);
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool operator< (
|
||||
const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs);
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool operator<=(
|
||||
const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs);
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool operator> (
|
||||
const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs);
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool operator>=(
|
||||
const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs);
|
||||
|
||||
// time_point_cast
|
||||
template <class ToDuration, class Clock, class Duration>
|
||||
inline BOOST_CONSTEXPR
|
||||
time_point<Clock, ToDuration> time_point_cast(const time_point<Clock, Duration>& t);
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// //
|
||||
// 20.9.4 Class template time_point [time.point] //
|
||||
// //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
template <class Clock, class Duration>
|
||||
class time_point
|
||||
{
|
||||
BOOST_CHRONO_STATIC_ASSERT(boost::chrono::detail::is_duration<Duration>::value,
|
||||
BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_TIME_POINT_MUST_BE_A_BOOST_CHRONO_DURATION, (Duration));
|
||||
public:
|
||||
typedef Clock clock;
|
||||
typedef Duration duration;
|
||||
typedef typename duration::rep rep;
|
||||
typedef typename duration::period period;
|
||||
typedef Duration difference_type;
|
||||
|
||||
private:
|
||||
duration d_;
|
||||
|
||||
public:
|
||||
BOOST_CONSTEXPR
|
||||
time_point() : d_(duration::zero())
|
||||
{}
|
||||
BOOST_CONSTEXPR explicit time_point(const duration& d)
|
||||
: d_(d)
|
||||
{}
|
||||
|
||||
// conversions
|
||||
template <class Duration2>
|
||||
BOOST_CONSTEXPR
|
||||
time_point(const time_point<clock, Duration2>& t
|
||||
, typename boost::enable_if
|
||||
<
|
||||
boost::is_convertible<Duration2, duration>
|
||||
>::type* = 0
|
||||
)
|
||||
: d_(t.time_since_epoch())
|
||||
{
|
||||
}
|
||||
// observer
|
||||
|
||||
BOOST_CONSTEXPR
|
||||
duration time_since_epoch() const
|
||||
{
|
||||
return d_;
|
||||
}
|
||||
|
||||
// arithmetic
|
||||
|
||||
#ifdef BOOST_CHRONO_EXTENSIONS
|
||||
BOOST_CONSTEXPR
|
||||
time_point operator+() const {return *this;}
|
||||
BOOST_CONSTEXPR
|
||||
time_point operator-() const {return time_point(-d_);}
|
||||
time_point& operator++() {++d_; return *this;}
|
||||
time_point operator++(int) {return time_point(d_++);}
|
||||
time_point& operator--() {--d_; return *this;}
|
||||
time_point operator--(int) {return time_point(d_--);}
|
||||
|
||||
time_point& operator+=(const rep& r) {d_ += duration(r); return *this;}
|
||||
time_point& operator-=(const rep& r) {d_ -= duration(r); return *this;}
|
||||
|
||||
#endif
|
||||
|
||||
time_point& operator+=(const duration& d) {d_ += d; return *this;}
|
||||
time_point& operator-=(const duration& d) {d_ -= d; return *this;}
|
||||
|
||||
// special values
|
||||
|
||||
static BOOST_CONSTEXPR time_point
|
||||
min BOOST_PREVENT_MACRO_SUBSTITUTION ()
|
||||
{
|
||||
return time_point((duration::min)());
|
||||
}
|
||||
static BOOST_CONSTEXPR time_point
|
||||
max BOOST_PREVENT_MACRO_SUBSTITUTION ()
|
||||
{
|
||||
return time_point((duration::max)());
|
||||
}
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.4.5 time_point non-member arithmetic [time.point.nonmember] //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
// time_point operator+(time_point x, duration y);
|
||||
|
||||
template <class Clock, class Duration1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
time_point<Clock,
|
||||
typename common_type<Duration1, duration<Rep2, Period2> >::type>
|
||||
operator+(const time_point<Clock, Duration1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs)
|
||||
{
|
||||
typedef typename common_type<Duration1, duration<Rep2, Period2> >::type CDuration;
|
||||
typedef time_point<
|
||||
Clock,
|
||||
CDuration
|
||||
> TimeResult;
|
||||
return TimeResult(lhs.time_since_epoch() + CDuration(rhs));
|
||||
}
|
||||
|
||||
// time_point operator+(duration x, time_point y);
|
||||
|
||||
template <class Rep1, class Period1, class Clock, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
time_point<Clock,
|
||||
typename common_type<duration<Rep1, Period1>, Duration2>::type>
|
||||
operator+(const duration<Rep1, Period1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs)
|
||||
{
|
||||
return rhs + lhs;
|
||||
}
|
||||
|
||||
// time_point operator-(time_point x, duration y);
|
||||
|
||||
template <class Clock, class Duration1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
time_point<Clock,
|
||||
typename common_type<Duration1, duration<Rep2, Period2> >::type>
|
||||
operator-(const time_point<Clock, Duration1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs)
|
||||
{
|
||||
return lhs + (-rhs);
|
||||
}
|
||||
|
||||
// duration operator-(time_point x, time_point y);
|
||||
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
typename common_type<Duration1, Duration2>::type
|
||||
operator-(const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs)
|
||||
{
|
||||
return lhs.time_since_epoch() - rhs.time_since_epoch();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.4.6 time_point comparisons [time.point.comparisons] //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
// time_point ==
|
||||
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool
|
||||
operator==(const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs)
|
||||
{
|
||||
return lhs.time_since_epoch() == rhs.time_since_epoch();
|
||||
}
|
||||
|
||||
// time_point !=
|
||||
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool
|
||||
operator!=(const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs)
|
||||
{
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
// time_point <
|
||||
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool
|
||||
operator<(const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs)
|
||||
{
|
||||
return lhs.time_since_epoch() < rhs.time_since_epoch();
|
||||
}
|
||||
|
||||
// time_point >
|
||||
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool
|
||||
operator>(const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs)
|
||||
{
|
||||
return rhs < lhs;
|
||||
}
|
||||
|
||||
// time_point <=
|
||||
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool
|
||||
operator<=(const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs)
|
||||
{
|
||||
return !(rhs < lhs);
|
||||
}
|
||||
|
||||
// time_point >=
|
||||
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool
|
||||
operator>=(const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs)
|
||||
{
|
||||
return !(lhs < rhs);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.4.7 time_point_cast [time.point.cast] //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
template <class ToDuration, class Clock, class Duration>
|
||||
inline BOOST_CONSTEXPR
|
||||
time_point<Clock, ToDuration>
|
||||
time_point_cast(const time_point<Clock, Duration>& t)
|
||||
{
|
||||
return time_point<Clock, ToDuration>(
|
||||
duration_cast<ToDuration>(t.time_since_epoch()));
|
||||
}
|
||||
|
||||
} // namespace chrono
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_CHRONO_TIME_POINT_HPP
|
@ -1052,11 +1052,11 @@ namespace boost
|
||||
c.swap(c);
|
||||
}
|
||||
|
||||
void const_constraints(const C& c) {
|
||||
ci = c.begin();
|
||||
ci = c.end();
|
||||
n = c.size();
|
||||
b = c.empty();
|
||||
void const_constraints(const C& cc) {
|
||||
ci = cc.begin();
|
||||
ci = cc.end();
|
||||
n = cc.size();
|
||||
b = cc.empty();
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -176,8 +176,9 @@
|
||||
#define BOOST_NO_DEFAULTED_FUNCTIONS
|
||||
#define BOOST_NO_DELETED_FUNCTIONS
|
||||
#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_INITIALIZER_LISTS
|
||||
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_LAMBDAS
|
||||
#define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_NULLPTR
|
||||
#define BOOST_NO_RAW_LITERALS
|
||||
#define BOOST_NO_RVALUE_REFERENCES
|
||||
|
@ -8,15 +8,18 @@
|
||||
|
||||
// Clang compiler setup.
|
||||
|
||||
#if __has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS)
|
||||
#else
|
||||
#if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS)
|
||||
# define BOOST_NO_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_rtti)
|
||||
#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_RTTI)
|
||||
# define BOOST_NO_RTTI
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_TYPEID)
|
||||
# define BOOST_NO_TYPEID
|
||||
#endif
|
||||
|
||||
#if defined(__int64)
|
||||
# define BOOST_HAS_MS_INT64
|
||||
#endif
|
||||
@ -24,6 +27,7 @@
|
||||
#define BOOST_HAS_NRVO
|
||||
|
||||
// Clang supports "long long" in all compilation modes.
|
||||
#define BOOST_HAS_LONG_LONG
|
||||
|
||||
#if !__has_feature(cxx_auto_type)
|
||||
# define BOOST_NO_AUTO_DECLARATIONS
|
||||
@ -43,7 +47,9 @@
|
||||
# define BOOST_NO_DECLTYPE
|
||||
#endif
|
||||
|
||||
#define BOOST_NO_DECLTYPE_N3276
|
||||
#if !__has_feature(cxx_decltype_incomplete_return_types)
|
||||
# define BOOST_NO_DECLTYPE_N3276
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_defaulted_functions)
|
||||
# define BOOST_NO_DEFAULTED_FUNCTIONS
|
||||
@ -62,13 +68,17 @@
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_generalized_initializers)
|
||||
# define BOOST_NO_INITIALIZER_LISTS
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_lambdas)
|
||||
# define BOOST_NO_LAMBDAS
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_local_type_template_args)
|
||||
# define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_noexcept)
|
||||
# define BOOST_NO_NOEXCEPT
|
||||
#endif
|
||||
|
@ -98,8 +98,8 @@
|
||||
#define BOOST_NO_DELETED_FUNCTIONS
|
||||
#define BOOST_NO_EXTERN_TEMPLATE
|
||||
#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_INITIALIZER_LISTS
|
||||
#define BOOST_NO_LAMBDAS
|
||||
#define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_NOEXCEPT
|
||||
#define BOOST_NO_NULLPTR
|
||||
#define BOOST_NO_RAW_LITERALS
|
||||
@ -120,7 +120,7 @@
|
||||
|
||||
#define BOOST_HAS_MACRO_USE_FACET
|
||||
|
||||
#define BOOST_NO_INITIALIZER_LISTS
|
||||
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
|
||||
// On non-Win32 platforms let the platform config figure this out:
|
||||
#ifdef _WIN32
|
||||
|
@ -64,7 +64,7 @@
|
||||
#endif
|
||||
#if (__EDG_VERSION__ <= 310)
|
||||
// No support for initializer lists
|
||||
# define BOOST_NO_INITIALIZER_LISTS
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#endif
|
||||
#if (__EDG_VERSION__ < 400)
|
||||
# define BOOST_NO_VARIADIC_MACROS
|
||||
@ -82,6 +82,7 @@
|
||||
#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
|
||||
#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_LAMBDAS
|
||||
#define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_NOEXCEPT
|
||||
#define BOOST_NO_NULLPTR
|
||||
#define BOOST_NO_RAW_LITERALS
|
||||
|
@ -42,6 +42,7 @@
|
||||
#define BOOST_NO_NULLPTR
|
||||
#define BOOST_NO_NOEXCEPT
|
||||
#define BOOST_NO_LAMBDAS
|
||||
#define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
|
||||
#define BOOST_NO_DELETED_FUNCTIONS
|
||||
|
@ -71,8 +71,9 @@
|
||||
#define BOOST_NO_DELETED_FUNCTIONS
|
||||
#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
|
||||
#define BOOST_NO_EXTERN_TEMPLATE
|
||||
#define BOOST_NO_INITIALIZER_LISTS
|
||||
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_LAMBDAS
|
||||
#define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_NOEXCEPT
|
||||
#define BOOST_NO_NULLPTR
|
||||
#define BOOST_NO_RAW_LITERALS
|
||||
|
@ -146,9 +146,6 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// C++0x features not implemented in any GCC version
|
||||
//
|
||||
#define BOOST_NO_TEMPLATE_ALIASES
|
||||
|
||||
// C++0x features in 4.3.n and later
|
||||
//
|
||||
@ -182,7 +179,7 @@
|
||||
# define BOOST_NO_AUTO_MULTIDECLARATIONS
|
||||
# define BOOST_NO_CHAR16_T
|
||||
# define BOOST_NO_CHAR32_T
|
||||
# define BOOST_NO_INITIALIZER_LISTS
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_DEFAULTED_FUNCTIONS
|
||||
# define BOOST_NO_DELETED_FUNCTIONS
|
||||
#endif
|
||||
@ -196,6 +193,7 @@
|
||||
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
|
||||
# define BOOST_NO_LAMBDAS
|
||||
# define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
# define BOOST_NO_RAW_LITERALS
|
||||
# define BOOST_NO_UNICODE_LITERALS
|
||||
#endif
|
||||
@ -217,6 +215,9 @@
|
||||
#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
|
||||
#endif
|
||||
|
||||
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
# define BOOST_NO_TEMPLATE_ALIASES
|
||||
#endif
|
||||
// C++0x features not supported at all yet
|
||||
//
|
||||
#define BOOST_NO_DECLTYPE_N3276
|
||||
|
@ -43,12 +43,13 @@
|
||||
# define BOOST_NO_CHAR32_T
|
||||
# define BOOST_NO_DEFAULTED_FUNCTIONS
|
||||
# define BOOST_NO_DELETED_FUNCTIONS
|
||||
# define BOOST_NO_INITIALIZER_LISTS
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_SCOPED_ENUMS
|
||||
# define BOOST_NO_SFINAE_EXPR
|
||||
# define BOOST_NO_SCOPED_ENUMS
|
||||
# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
|
||||
# define BOOST_NO_LAMBDAS
|
||||
# define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
# define BOOST_NO_RAW_LITERALS
|
||||
# define BOOST_NO_UNICODE_LITERALS
|
||||
# define BOOST_NO_NOEXCEPT
|
||||
|
@ -104,8 +104,9 @@
|
||||
#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
|
||||
#define BOOST_NO_EXTERN_TEMPLATE
|
||||
#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_INITIALIZER_LISTS
|
||||
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_LAMBDAS
|
||||
#define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_NOEXCEPT
|
||||
#define BOOST_NO_NULLPTR
|
||||
#define BOOST_NO_RAW_LITERALS
|
||||
|
@ -205,6 +205,7 @@ template<> struct assert_intrinsic_wchar_t<unsigned short> {};
|
||||
// http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/
|
||||
//
|
||||
//# undef BOOST_NO_LAMBDAS
|
||||
//# undef BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
//# undef BOOST_NO_DECLTYPE
|
||||
//# undef BOOST_NO_AUTO_DECLARATIONS
|
||||
//# undef BOOST_NO_AUTO_MULTIDECLARATIONS
|
||||
@ -216,6 +217,7 @@ template<> struct assert_intrinsic_wchar_t<unsigned short> {};
|
||||
# undef BOOST_NO_DELETED_FUNCTIONS
|
||||
# undef BOOST_NO_DEFAULTED_FUNCTIONS
|
||||
# undef BOOST_NO_LAMBDAS
|
||||
# undef BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
# undef BOOST_NO_DECLTYPE
|
||||
# undef BOOST_NO_AUTO_DECLARATIONS
|
||||
# undef BOOST_NO_AUTO_MULTIDECLARATIONS
|
||||
@ -240,7 +242,7 @@ template<> struct assert_intrinsic_wchar_t<unsigned short> {};
|
||||
//
|
||||
// Although the Intel compiler is capable of supporting these, it appears not to in MSVC compatibility mode:
|
||||
//
|
||||
# define BOOST_NO_INITIALIZER_LISTS
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_VARIADIC_TEMPLATES
|
||||
# define BOOST_NO_DELETED_FUNCTIONS
|
||||
# define BOOST_NO_DEFAULTED_FUNCTIONS
|
||||
|
@ -104,8 +104,9 @@
|
||||
#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
|
||||
#define BOOST_NO_EXTERN_TEMPLATE
|
||||
#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_INITIALIZER_LISTS
|
||||
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_LAMBDAS
|
||||
#define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_NOEXCEPT
|
||||
#define BOOST_NO_NULLPTR
|
||||
#define BOOST_NO_RAW_LITERALS
|
||||
|
@ -52,8 +52,9 @@
|
||||
#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
|
||||
#define BOOST_NO_EXTERN_TEMPLATE
|
||||
#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_INITIALIZER_LISTS
|
||||
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_LAMBDAS
|
||||
#define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_NOEXCEPT
|
||||
#define BOOST_NO_NULLPTR
|
||||
#define BOOST_NO_RAW_LITERALS
|
||||
|
@ -45,7 +45,7 @@
|
||||
# define BOOST_NO_NUMERIC_LIMITS_LOWEST
|
||||
# define BOOST_NO_NOEXCEPT
|
||||
# define BOOST_NO_LAMBDAS
|
||||
# define BOOST_NO_INITIALIZER_LISTS
|
||||
# define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
|
||||
# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
|
||||
@ -60,21 +60,21 @@
|
||||
# define BOOST_NO_AUTO_MULTIDECLARATIONS
|
||||
# define BOOST_NO_AUTO_DECLARATIONS
|
||||
# define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_0X_HDR_TYPEINDEX
|
||||
# define BOOST_NO_0X_HDR_TUPLE
|
||||
# define BOOST_NO_0X_HDR_THREAD
|
||||
# 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_INITIALIZER_LIST
|
||||
# define BOOST_NO_0X_HDR_FUTURE
|
||||
# define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_0X_HDR_CODECVT
|
||||
# define BOOST_NO_0X_HDR_CHRONO
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_CXX11_HDR_TYPEINDEX
|
||||
# define BOOST_NO_CXX11_HDR_TUPLE
|
||||
# define BOOST_NO_CXX11_HDR_THREAD
|
||||
# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_CXX11_HDR_REGEX
|
||||
# define BOOST_NO_CXX11_HDR_RATIO
|
||||
# define BOOST_NO_CXX11_HDR_RANDOM
|
||||
# define BOOST_NO_CXX11_HDR_MUTEX
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_CXX11_HDR_FUTURE
|
||||
# define BOOST_NO_CXX11_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_CXX11_HDR_CODECVT
|
||||
# define BOOST_NO_CXX11_HDR_CHRONO
|
||||
#endif
|
||||
|
||||
|
@ -16,10 +16,30 @@
|
||||
// if no threading API is detected.
|
||||
//
|
||||
|
||||
#if __PGIC__ >= 10
|
||||
#if __PGIC__ >= 11
|
||||
|
||||
// options requested by configure --enable-test
|
||||
#define BOOST_HAS_PTHREADS
|
||||
#define BOOST_HAS_THREADS
|
||||
#define BOOST_HAS_PTHREAD_YIELD
|
||||
#define BOOST_HAS_NRVO
|
||||
#define BOOST_HAS_LONG_LONG
|
||||
|
||||
// options --enable-test wants undefined
|
||||
#undef BOOST_NO_STDC_NAMESPACE
|
||||
#undef BOOST_NO_EXCEPTION_STD_NAMESPACE
|
||||
#undef BOOST_DEDUCED_TYPENAME
|
||||
|
||||
#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#define BOOST_NO_AUTO_MULTIDECLARATIONS
|
||||
#define BOOST_NO_AUTO_DECLARATIONS
|
||||
#define BOOST_NO_STD_UNORDERED
|
||||
|
||||
#elif __PGIC__ >= 10
|
||||
|
||||
// options requested by configure --enable-test
|
||||
#define BOOST_HAS_THREADS
|
||||
#define BOOST_HAS_NRVO
|
||||
#define BOOST_HAS_LONG_LONG
|
||||
|
||||
@ -56,21 +76,42 @@
|
||||
#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
|
||||
#define BOOST_NO_EXTERN_TEMPLATE
|
||||
#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_INITIALIZER_LISTS
|
||||
#define BOOST_NO_LAMBDAS
|
||||
#define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_NOEXCEPT
|
||||
#define BOOST_NO_NULLPTR
|
||||
#define BOOST_NO_NUMERIC_LIMITS_LOWEST
|
||||
#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
|
||||
#define BOOST_NO_SWPRINTF
|
||||
#define BOOST_NO_TEMPLATE_ALIASES
|
||||
#define BOOST_NO_UNICODE_LITERALS
|
||||
#define BOOST_NO_VARIADIC_TEMPLATES
|
||||
#define BOOST_NO_VARIADIC_MACROS
|
||||
#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
|
||||
|
||||
#define BOOST_NO_CXX11_HDR_UNORDERED_SET
|
||||
#define BOOST_NO_CXX11_HDR_UNORDERED_MAP
|
||||
#define BOOST_NO_CXX11_HDR_TYPEINDEX
|
||||
#define BOOST_NO_CXX11_HDR_TYPE_TRAITS
|
||||
#define BOOST_NO_CXX11_HDR_TUPLE
|
||||
#define BOOST_NO_CXX11_HDR_THREAD
|
||||
#define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
|
||||
#define BOOST_NO_CXX11_HDR_REGEX
|
||||
#define BOOST_NO_CXX11_HDR_RATIO
|
||||
#define BOOST_NO_CXX11_HDR_RANDOM
|
||||
#define BOOST_NO_CXX11_HDR_MUTEX
|
||||
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_CXX11_HDR_FUTURE
|
||||
#define BOOST_NO_CXX11_HDR_FORWARD_LIST
|
||||
#define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
|
||||
#define BOOST_NO_CXX11_HDR_CODECVT
|
||||
#define BOOST_NO_CXX11_HDR_CHRONO
|
||||
#define BOOST_NO_CXX11_HDR_ARRAY
|
||||
|
||||
//
|
||||
// version check:
|
||||
// probably nothing to do here?
|
||||
|
@ -111,8 +111,9 @@
|
||||
#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
|
||||
#define BOOST_NO_EXTERN_TEMPLATE
|
||||
#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_INITIALIZER_LISTS
|
||||
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_LAMBDAS
|
||||
#define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_NOEXCEPT
|
||||
#define BOOST_NO_NULLPTR
|
||||
#define BOOST_NO_RAW_LITERALS
|
||||
|
@ -95,8 +95,9 @@
|
||||
// not enabled separately at this time
|
||||
# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#endif
|
||||
#define BOOST_NO_INITIALIZER_LISTS
|
||||
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_LAMBDAS
|
||||
#define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_NOEXCEPT
|
||||
#define BOOST_NO_NULLPTR
|
||||
#define BOOST_NO_RAW_LITERALS
|
||||
|
@ -9,38 +9,54 @@
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
//
|
||||
// Microsoft Visual C++ compiler setup:
|
||||
//
|
||||
// We need to be careful with the checks in this file, as contrary
|
||||
// to popular belief there are versions with _MSC_VER with the final
|
||||
// digit non-zero (mainly the MIPS cross compiler).
|
||||
//
|
||||
// So we either test _MSC_VER >= XXXX or else _MSC_VER < XXXX.
|
||||
// No other comparisons (==, >, or <=) are safe.
|
||||
//
|
||||
|
||||
#define BOOST_MSVC _MSC_VER
|
||||
|
||||
//
|
||||
// Helper macro BOOST_MSVC_FULL_VER for use in Boost code:
|
||||
//
|
||||
#if _MSC_FULL_VER > 100000000
|
||||
# define BOOST_MSVC_FULL_VER _MSC_FULL_VER
|
||||
#else
|
||||
# define BOOST_MSVC_FULL_VER (_MSC_FULL_VER * 10)
|
||||
#endif
|
||||
|
||||
// turn off the warnings before we #include anything
|
||||
// Attempt to suppress VC6 warnings about the length of decorated names (obsolete):
|
||||
#pragma warning( disable : 4503 ) // warning: decorated name length exceeded
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// we don't support Visual C++ prior to version 6:
|
||||
#if _MSC_VER < 1200
|
||||
# error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
|
||||
#if _MSC_VER < 1300 // 1200 == VC++ 6.0, 1200-1202 == eVC++4
|
||||
# pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info
|
||||
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
|
||||
# define BOOST_NO_VOID_RETURNS
|
||||
# define BOOST_NO_EXCEPTION_STD_NAMESPACE
|
||||
|
||||
# if BOOST_MSVC == 1202
|
||||
# if _MSC_VER == 1202
|
||||
# define BOOST_NO_STD_TYPEINFO
|
||||
# endif
|
||||
|
||||
// disable min/max macro defines on vc6:
|
||||
//
|
||||
#endif
|
||||
|
||||
/// Visual Studio has no fenv.h
|
||||
#define BOOST_NO_FENV_H
|
||||
|
||||
#if (_MSC_VER <= 1300) // 1300 == VC++ 7.0
|
||||
#if (_MSC_VER < 1310) // 130X == VC++ 7.0
|
||||
|
||||
# if !defined(_MSC_EXTENSIONS) && !defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) // VC7 bug with /Za
|
||||
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
|
||||
@ -72,7 +88,7 @@
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
# define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS
|
||||
// TODO: what version is meant here? Have there really been any fixes in cl 12.01 (as e.g. shipped with eVC4)?
|
||||
# if (_MSC_VER > 1200)
|
||||
# if (_MSC_VER >= 1300)
|
||||
# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
|
||||
# endif
|
||||
|
||||
@ -93,17 +109,16 @@
|
||||
# define BOOST_NO_SWPRINTF
|
||||
#endif
|
||||
|
||||
#if _MSC_VER <= 1400 // 1400 == VC++ 8.0
|
||||
#if _MSC_VER < 1500 // 140X == VC++ 8.0
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
#endif
|
||||
|
||||
#if _MSC_VER == 1500 // 1500 == VC++ 9.0
|
||||
#if _MSC_VER < 1600 // 150X == VC++ 9.0
|
||||
// A bug in VC9:
|
||||
# define BOOST_NO_ADL_BARRIER
|
||||
#endif
|
||||
|
||||
|
||||
#if (_MSC_VER <= 1600)
|
||||
// MSVC (including the latest checked version) has not yet completely
|
||||
// implemented value-initialization, as is reported:
|
||||
// "VC++ does not value-initialize members of derived classes without
|
||||
@ -117,11 +132,10 @@
|
||||
// https://connect.microsoft.com/VisualStudio/feedback/details/100744
|
||||
// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
|
||||
// (Niels Dekker, LKEB, May 2010)
|
||||
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
|
||||
#endif
|
||||
# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
|
||||
|
||||
#if _MSC_VER <= 1500 || !defined(BOOST_STRICT_CONFIG) // 1500 == VC++ 9.0
|
||||
# define BOOST_NO_INITIALIZER_LISTS
|
||||
#if _MSC_VER < 1600 || !defined(BOOST_STRICT_CONFIG) // 150X == VC++ 9.0
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#endif
|
||||
|
||||
#ifndef _NATIVE_WCHAR_T_DEFINED
|
||||
@ -177,17 +191,17 @@
|
||||
// C++ features supported by VC++ 10 (aka 2010)
|
||||
//
|
||||
#if _MSC_VER < 1600
|
||||
#define BOOST_NO_AUTO_DECLARATIONS
|
||||
#define BOOST_NO_AUTO_MULTIDECLARATIONS
|
||||
#define BOOST_NO_LAMBDAS
|
||||
#define BOOST_NO_RVALUE_REFERENCES
|
||||
#define BOOST_NO_STATIC_ASSERT
|
||||
#define BOOST_NO_NULLPTR
|
||||
#define BOOST_NO_DECLTYPE
|
||||
# define BOOST_NO_AUTO_DECLARATIONS
|
||||
# define BOOST_NO_AUTO_MULTIDECLARATIONS
|
||||
# define BOOST_NO_LAMBDAS
|
||||
# define BOOST_NO_RVALUE_REFERENCES
|
||||
# define BOOST_NO_STATIC_ASSERT
|
||||
# define BOOST_NO_NULLPTR
|
||||
# define BOOST_NO_DECLTYPE
|
||||
#endif // _MSC_VER < 1600
|
||||
|
||||
#if _MSC_VER >= 1600
|
||||
#define BOOST_HAS_STDINT_H
|
||||
# define BOOST_HAS_STDINT_H
|
||||
#endif
|
||||
|
||||
// C++0x features not supported by any versions
|
||||
@ -199,7 +213,7 @@
|
||||
#define BOOST_NO_DELETED_FUNCTIONS
|
||||
#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
|
||||
#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_INITIALIZER_LISTS
|
||||
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_NOEXCEPT
|
||||
#define BOOST_NO_RAW_LITERALS
|
||||
#define BOOST_NO_SCOPED_ENUMS
|
||||
@ -230,13 +244,20 @@
|
||||
// Note: these are so far off, they are not really supported
|
||||
# elif _MSC_VER < 1300 // eVC++ 4 comes with 1200-1202
|
||||
# define BOOST_COMPILER_VERSION evc4.0
|
||||
# elif _MSC_VER == 1400
|
||||
# elif _MSC_VER < 1400
|
||||
// Note: I'm not aware of any CE compiler with version 13xx
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown EVC++ compiler version - please run the configure tests and report the results"
|
||||
# else
|
||||
# pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results")
|
||||
# endif
|
||||
# elif _MSC_VER < 1500
|
||||
# define BOOST_COMPILER_VERSION evc8
|
||||
# elif _MSC_VER == 1500
|
||||
# elif _MSC_VER < 1600
|
||||
# define BOOST_COMPILER_VERSION evc9
|
||||
# elif _MSC_VER == 1600
|
||||
# elif _MSC_VER < 1700
|
||||
# define BOOST_COMPILER_VERSION evc10
|
||||
# elif _MSC_VER == 1700
|
||||
# elif _MSC_VER < 1800
|
||||
# define BOOST_COMPILER_VERSION evc11
|
||||
# else
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
@ -251,17 +272,17 @@
|
||||
# define BOOST_COMPILER_VERSION 5.0
|
||||
# elif _MSC_VER < 1300
|
||||
# define BOOST_COMPILER_VERSION 6.0
|
||||
# elif _MSC_VER == 1300
|
||||
# elif _MSC_VER < 1310
|
||||
# define BOOST_COMPILER_VERSION 7.0
|
||||
# elif _MSC_VER == 1310
|
||||
# elif _MSC_VER < 1400
|
||||
# define BOOST_COMPILER_VERSION 7.1
|
||||
# elif _MSC_VER == 1400
|
||||
# elif _MSC_VER < 1500
|
||||
# define BOOST_COMPILER_VERSION 8.0
|
||||
# elif _MSC_VER == 1500
|
||||
# elif _MSC_VER < 1600
|
||||
# define BOOST_COMPILER_VERSION 9.0
|
||||
# elif _MSC_VER == 1600
|
||||
# elif _MSC_VER < 1700
|
||||
# define BOOST_COMPILER_VERSION 10.0
|
||||
# elif _MSC_VER == 1700
|
||||
# elif _MSC_VER < 1800
|
||||
# define BOOST_COMPILER_VERSION 11.0
|
||||
# else
|
||||
# define BOOST_COMPILER_VERSION _MSC_VER
|
||||
@ -270,12 +291,6 @@
|
||||
|
||||
#define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// we don't support Visual C++ prior to version 6:
|
||||
#if _MSC_VER < 1200
|
||||
#error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
//
|
||||
// last known and checked version is 1700 (VC11, aka 2011):
|
||||
#if (_MSC_VER > 1700)
|
||||
|
@ -94,34 +94,38 @@
|
||||
// C++0x headers implemented in 520 (as shipped by Microsoft)
|
||||
//
|
||||
#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 520
|
||||
# define BOOST_NO_0X_HDR_ARRAY
|
||||
# define BOOST_NO_0X_HDR_CODECVT
|
||||
# define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_0X_HDR_RANDOM
|
||||
# define BOOST_NO_0X_HDR_REGEX
|
||||
# define BOOST_NO_0X_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_CXX11_HDR_ARRAY
|
||||
# define BOOST_NO_CXX11_HDR_CODECVT
|
||||
# define BOOST_NO_CXX11_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_CXX11_HDR_RANDOM
|
||||
# define BOOST_NO_CXX11_HDR_REGEX
|
||||
# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
# define BOOST_NO_0X_HDR_TUPLE
|
||||
# define BOOST_NO_0X_HDR_TYPEINDEX
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
|
||||
# define BOOST_NO_CXX11_HDR_TUPLE
|
||||
# define BOOST_NO_CXX11_HDR_TYPEINDEX
|
||||
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
|
||||
# define BOOST_NO_NUMERIC_LIMITS_LOWEST
|
||||
# define BOOST_NO_CXX11_SMART_PTR
|
||||
#endif
|
||||
|
||||
#if (!defined(_HAS_TR1_IMPORTS) || (_HAS_TR1_IMPORTS+0 == 0)) && !defined(BOOST_NO_0X_HDR_TUPLE)
|
||||
# define BOOST_NO_0X_HDR_TUPLE
|
||||
#if (!defined(_HAS_TR1_IMPORTS) || (_HAS_TR1_IMPORTS+0 == 0)) && !defined(BOOST_NO_CXX11_HDR_TUPLE)
|
||||
# define BOOST_NO_CXX11_HDR_TUPLE
|
||||
#endif
|
||||
//
|
||||
// C++0x headers not yet (fully) implemented:
|
||||
//
|
||||
# define BOOST_NO_0X_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_0X_HDR_CHRONO
|
||||
# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_0X_HDR_FUTURE
|
||||
# define BOOST_NO_0X_HDR_MUTEX
|
||||
# define BOOST_NO_0X_HDR_RATIO
|
||||
# define BOOST_NO_0X_HDR_THREAD
|
||||
# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_CXX11_HDR_CHRONO
|
||||
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_CXX11_HDR_FUTURE
|
||||
# define BOOST_NO_CXX11_HDR_MUTEX
|
||||
# define BOOST_NO_CXX11_HDR_RATIO
|
||||
# define BOOST_NO_CXX11_HDR_THREAD
|
||||
# define BOOST_NO_CXX11_ALLOCATOR
|
||||
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
|
||||
|
||||
#ifdef _CPPLIB_VER
|
||||
# define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER
|
||||
|
@ -35,26 +35,30 @@
|
||||
|
||||
// C++0x headers not yet implemented
|
||||
//
|
||||
# define BOOST_NO_0X_HDR_ARRAY
|
||||
# define BOOST_NO_0X_HDR_CHRONO
|
||||
# define BOOST_NO_0X_HDR_CODECVT
|
||||
# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_0X_HDR_FUTURE
|
||||
# define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_0X_HDR_MUTEX
|
||||
# define BOOST_NO_0X_HDR_RANDOM
|
||||
# define BOOST_NO_0X_HDR_RATIO
|
||||
# define BOOST_NO_0X_HDR_REGEX
|
||||
# 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_CXX11_HDR_ARRAY
|
||||
# define BOOST_NO_CXX11_HDR_CHRONO
|
||||
# define BOOST_NO_CXX11_HDR_CODECVT
|
||||
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_CXX11_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_CXX11_HDR_FUTURE
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_CXX11_HDR_MUTEX
|
||||
# define BOOST_NO_CXX11_HDR_RANDOM
|
||||
# define BOOST_NO_CXX11_HDR_RATIO
|
||||
# define BOOST_NO_CXX11_HDR_REGEX
|
||||
# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_CXX11_HDR_THREAD
|
||||
# define BOOST_NO_CXX11_HDR_TUPLE
|
||||
# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_CXX11_HDR_TYPEINDEX
|
||||
# define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
|
||||
# define BOOST_NO_NUMERIC_LIMITS_LOWEST
|
||||
# define BOOST_NO_CXX11_ALLOCATOR
|
||||
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
|
||||
# define BOOST_NO_CXX11_SMART_PTR
|
||||
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
|
||||
|
||||
//
|
||||
// Intrinsic type_traits support.
|
||||
|
@ -20,15 +20,16 @@
|
||||
#define BOOST_HAS_THREADS
|
||||
|
||||
#ifdef _LIBCPP_HAS_NO_VARIADICS
|
||||
# define BOOST_NO_0X_HDR_TUPLE
|
||||
# define BOOST_NO_CXX11_HDR_TUPLE
|
||||
#endif
|
||||
|
||||
//
|
||||
// These appear to be unusable/incomplete so far:
|
||||
//
|
||||
# define BOOST_NO_0X_HDR_CHRONO
|
||||
# define BOOST_NO_0X_HDR_FUTURE
|
||||
# define BOOST_NO_0X_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_CXX11_HDR_CHRONO
|
||||
# define BOOST_NO_CXX11_HDR_FUTURE
|
||||
# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
|
||||
|
||||
// libc++ uses a non-standard messages_base
|
||||
#define BOOST_NO_STD_MESSAGES
|
||||
|
@ -105,51 +105,62 @@
|
||||
// C++0x headers in GCC 4.3.0 and later
|
||||
//
|
||||
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
# define BOOST_NO_0X_HDR_ARRAY
|
||||
# define BOOST_NO_0X_HDR_REGEX
|
||||
# define BOOST_NO_0X_HDR_TUPLE
|
||||
# define BOOST_NO_CXX11_HDR_ARRAY
|
||||
# define BOOST_NO_CXX11_HDR_REGEX
|
||||
# define BOOST_NO_CXX11_HDR_TUPLE
|
||||
# define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
|
||||
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
|
||||
#endif
|
||||
|
||||
// C++0x headers in GCC 4.4.0 and later
|
||||
//
|
||||
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
# define BOOST_NO_0X_HDR_CHRONO
|
||||
# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_0X_HDR_MUTEX
|
||||
# define BOOST_NO_0X_HDR_RATIO
|
||||
# define BOOST_NO_0X_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_CXX11_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_CXX11_HDR_MUTEX
|
||||
# define BOOST_NO_CXX11_HDR_RATIO
|
||||
# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_CXX11_SMART_PTR
|
||||
#else
|
||||
# define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG
|
||||
# define BOOST_HAS_TR1_COMPLEX_OVERLOADS
|
||||
#endif
|
||||
|
||||
#if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1)) && (!defined(BOOST_NO_0X_HDR_CONDITION_VARIABLE) || !defined(BOOST_NO_0X_HDR_MUTEX))
|
||||
# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_0X_HDR_MUTEX
|
||||
#if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1)) && (!defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) || !defined(BOOST_NO_CXX11_HDR_MUTEX))
|
||||
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_CXX11_HDR_MUTEX
|
||||
#endif
|
||||
|
||||
// C++0x features in GCC 4.5.0 and later
|
||||
//
|
||||
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
# define BOOST_NO_NUMERIC_LIMITS_LOWEST
|
||||
# define BOOST_NO_0X_HDR_FUTURE
|
||||
# define BOOST_NO_0X_HDR_RANDOM
|
||||
# define BOOST_NO_CXX11_HDR_FUTURE
|
||||
# define BOOST_NO_CXX11_HDR_RANDOM
|
||||
#endif
|
||||
|
||||
// C++0x features in GCC 4.5.0 and later
|
||||
// C++0x features in GCC 4.6.0 and later
|
||||
//
|
||||
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
# define BOOST_NO_0X_HDR_TYPEINDEX
|
||||
# define BOOST_NO_CXX11_HDR_TYPEINDEX
|
||||
#endif
|
||||
|
||||
// C++0x features in GCC 4.7.0 and later
|
||||
//
|
||||
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
// Note that although <chrono> existed prior to 4.7, "stead_clock" is spelled "monotonic_clock"
|
||||
// so 4.7.0 is the first truely conforming one.
|
||||
# define BOOST_NO_CXX11_HDR_CHRONO
|
||||
# define BOOST_NO_CXX11_ALLOCATOR
|
||||
#endif
|
||||
// C++0x headers not yet (fully!) implemented
|
||||
//
|
||||
# define BOOST_NO_0X_HDR_THREAD
|
||||
# define BOOST_NO_0X_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_0X_HDR_CODECVT
|
||||
# define BOOST_NO_CXX11_HDR_THREAD
|
||||
# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_CXX11_HDR_CODECVT
|
||||
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
|
||||
|
||||
// --- end ---
|
||||
|
@ -24,26 +24,30 @@
|
||||
|
||||
// C++0x headers not yet implemented
|
||||
//
|
||||
# define BOOST_NO_0X_HDR_ARRAY
|
||||
# define BOOST_NO_0X_HDR_CHRONO
|
||||
# define BOOST_NO_0X_HDR_CODECVT
|
||||
# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_0X_HDR_FUTURE
|
||||
# define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_0X_HDR_MUTEX
|
||||
# define BOOST_NO_0X_HDR_RANDOM
|
||||
# define BOOST_NO_0X_HDR_RATIO
|
||||
# define BOOST_NO_0X_HDR_REGEX
|
||||
# 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_CXX11_HDR_ARRAY
|
||||
# define BOOST_NO_CXX11_HDR_CHRONO
|
||||
# define BOOST_NO_CXX11_HDR_CODECVT
|
||||
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_CXX11_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_CXX11_HDR_FUTURE
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_CXX11_HDR_MUTEX
|
||||
# define BOOST_NO_CXX11_HDR_RANDOM
|
||||
# define BOOST_NO_CXX11_HDR_RATIO
|
||||
# define BOOST_NO_CXX11_HDR_REGEX
|
||||
# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_CXX11_HDR_THREAD
|
||||
# define BOOST_NO_CXX11_HDR_TUPLE
|
||||
# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_CXX11_HDR_TYPEINDEX
|
||||
# define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
|
||||
# define BOOST_NO_NUMERIC_LIMITS_LOWEST
|
||||
# define BOOST_NO_CXX11_ALLOCATOR
|
||||
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
|
||||
# define BOOST_NO_CXX11_SMART_PTR
|
||||
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
|
||||
|
||||
#define BOOST_STDLIB "Modena C++ standard library"
|
||||
|
||||
|
@ -48,26 +48,30 @@
|
||||
|
||||
// C++0x headers not yet implemented
|
||||
//
|
||||
# define BOOST_NO_0X_HDR_ARRAY
|
||||
# define BOOST_NO_0X_HDR_CHRONO
|
||||
# define BOOST_NO_0X_HDR_CODECVT
|
||||
# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_0X_HDR_FUTURE
|
||||
# define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_0X_HDR_MUTEX
|
||||
# define BOOST_NO_0X_HDR_RANDOM
|
||||
# define BOOST_NO_0X_HDR_RATIO
|
||||
# define BOOST_NO_0X_HDR_REGEX
|
||||
# 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_CXX11_HDR_ARRAY
|
||||
# define BOOST_NO_CXX11_HDR_CHRONO
|
||||
# define BOOST_NO_CXX11_HDR_CODECVT
|
||||
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_CXX11_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_CXX11_HDR_FUTURE
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_CXX11_HDR_MUTEX
|
||||
# define BOOST_NO_CXX11_HDR_RANDOM
|
||||
# define BOOST_NO_CXX11_HDR_RATIO
|
||||
# define BOOST_NO_CXX11_HDR_REGEX
|
||||
# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_CXX11_HDR_THREAD
|
||||
# define BOOST_NO_CXX11_HDR_TUPLE
|
||||
# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_CXX11_HDR_TYPEINDEX
|
||||
# define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
|
||||
# define BOOST_NO_NUMERIC_LIMITS_LOWEST
|
||||
# define BOOST_NO_CXX11_ALLOCATOR
|
||||
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
|
||||
# define BOOST_NO_CXX11_SMART_PTR
|
||||
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
|
||||
|
||||
#define BOOST_STDLIB "Metrowerks Standard Library version " BOOST_STRINGIZE(__MSL_CPP__)
|
||||
|
||||
|
@ -155,29 +155,33 @@
|
||||
#endif
|
||||
|
||||
#if _RWSTD_VER < 0x05000000
|
||||
# define BOOST_NO_0X_HDR_ARRAY
|
||||
# define BOOST_NO_CXX11_HDR_ARRAY
|
||||
#endif
|
||||
// type_traits header is incomplete:
|
||||
# define BOOST_NO_0X_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
|
||||
//
|
||||
// C++0x headers not yet implemented
|
||||
//
|
||||
# define BOOST_NO_0X_HDR_CHRONO
|
||||
# define BOOST_NO_0X_HDR_CODECVT
|
||||
# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_0X_HDR_FUTURE
|
||||
# define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_0X_HDR_MUTEX
|
||||
# define BOOST_NO_0X_HDR_RANDOM
|
||||
# define BOOST_NO_0X_HDR_RATIO
|
||||
# define BOOST_NO_0X_HDR_REGEX
|
||||
# define BOOST_NO_0X_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_0X_HDR_THREAD
|
||||
# define BOOST_NO_0X_HDR_TUPLE
|
||||
# define BOOST_NO_0X_HDR_TYPEINDEX
|
||||
# define BOOST_NO_CXX11_HDR_CHRONO
|
||||
# define BOOST_NO_CXX11_HDR_CODECVT
|
||||
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_CXX11_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_CXX11_HDR_FUTURE
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_CXX11_HDR_MUTEX
|
||||
# define BOOST_NO_CXX11_HDR_RANDOM
|
||||
# define BOOST_NO_CXX11_HDR_RATIO
|
||||
# define BOOST_NO_CXX11_HDR_REGEX
|
||||
# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_CXX11_HDR_THREAD
|
||||
# define BOOST_NO_CXX11_HDR_TUPLE
|
||||
# define BOOST_NO_CXX11_HDR_TYPEINDEX
|
||||
# define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
|
||||
# define BOOST_NO_NUMERIC_LIMITS_LOWEST
|
||||
# define BOOST_NO_CXX11_ALLOCATOR
|
||||
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
|
||||
# define BOOST_NO_CXX11_SMART_PTR
|
||||
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
|
||||
|
||||
|
@ -118,26 +118,30 @@
|
||||
|
||||
// C++0x headers not yet implemented
|
||||
//
|
||||
# define BOOST_NO_0X_HDR_ARRAY
|
||||
# define BOOST_NO_0X_HDR_CHRONO
|
||||
# define BOOST_NO_0X_HDR_CODECVT
|
||||
# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_0X_HDR_FUTURE
|
||||
# define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_0X_HDR_MUTEX
|
||||
# define BOOST_NO_0X_HDR_RANDOM
|
||||
# define BOOST_NO_0X_HDR_RATIO
|
||||
# define BOOST_NO_0X_HDR_REGEX
|
||||
# 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_CXX11_HDR_ARRAY
|
||||
# define BOOST_NO_CXX11_HDR_CHRONO
|
||||
# define BOOST_NO_CXX11_HDR_CODECVT
|
||||
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_CXX11_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_CXX11_HDR_FUTURE
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_CXX11_HDR_MUTEX
|
||||
# define BOOST_NO_CXX11_HDR_RANDOM
|
||||
# define BOOST_NO_CXX11_HDR_RATIO
|
||||
# define BOOST_NO_CXX11_HDR_REGEX
|
||||
# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_CXX11_HDR_THREAD
|
||||
# define BOOST_NO_CXX11_HDR_TUPLE
|
||||
# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_CXX11_HDR_TYPEINDEX
|
||||
# define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
|
||||
# define BOOST_NO_NUMERIC_LIMITS_LOWEST
|
||||
# define BOOST_NO_CXX11_ALLOCATOR
|
||||
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
|
||||
# define BOOST_NO_CXX11_SMART_PTR
|
||||
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
|
||||
|
||||
#define BOOST_STDLIB "SGI standard library"
|
||||
|
||||
|
@ -212,26 +212,30 @@ namespace boost { using std::min; using std::max; }
|
||||
|
||||
// C++0x headers not yet implemented
|
||||
//
|
||||
# define BOOST_NO_0X_HDR_ARRAY
|
||||
# define BOOST_NO_0X_HDR_CHRONO
|
||||
# define BOOST_NO_0X_HDR_CODECVT
|
||||
# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_0X_HDR_FUTURE
|
||||
# define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_0X_HDR_MUTEX
|
||||
# define BOOST_NO_0X_HDR_RANDOM
|
||||
# define BOOST_NO_0X_HDR_RATIO
|
||||
# define BOOST_NO_0X_HDR_REGEX
|
||||
# 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_CXX11_HDR_ARRAY
|
||||
# define BOOST_NO_CXX11_HDR_CHRONO
|
||||
# define BOOST_NO_CXX11_HDR_CODECVT
|
||||
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_CXX11_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_CXX11_HDR_FUTURE
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_CXX11_HDR_MUTEX
|
||||
# define BOOST_NO_CXX11_HDR_RANDOM
|
||||
# define BOOST_NO_CXX11_HDR_RATIO
|
||||
# define BOOST_NO_CXX11_HDR_REGEX
|
||||
# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_CXX11_HDR_THREAD
|
||||
# define BOOST_NO_CXX11_HDR_TUPLE
|
||||
# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_CXX11_HDR_TYPEINDEX
|
||||
# define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
|
||||
# define BOOST_NO_NUMERIC_LIMITS_LOWEST
|
||||
# define BOOST_NO_CXX11_ALLOCATOR
|
||||
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
|
||||
# define BOOST_NO_CXX11_SMART_PTR
|
||||
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
|
||||
|
||||
#define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT)
|
||||
|
||||
|
@ -24,26 +24,30 @@
|
||||
|
||||
// C++0x headers not yet implemented
|
||||
//
|
||||
# define BOOST_NO_0X_HDR_ARRAY
|
||||
# define BOOST_NO_0X_HDR_CHRONO
|
||||
# define BOOST_NO_0X_HDR_CODECVT
|
||||
# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_0X_HDR_FUTURE
|
||||
# define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_0X_HDR_MUTEX
|
||||
# define BOOST_NO_0X_HDR_RANDOM
|
||||
# define BOOST_NO_0X_HDR_RATIO
|
||||
# define BOOST_NO_0X_HDR_REGEX
|
||||
# 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_CXX11_HDR_ARRAY
|
||||
# define BOOST_NO_CXX11_HDR_CHRONO
|
||||
# define BOOST_NO_CXX11_HDR_CODECVT
|
||||
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_CXX11_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_CXX11_HDR_FUTURE
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_CXX11_HDR_MUTEX
|
||||
# define BOOST_NO_CXX11_HDR_RANDOM
|
||||
# define BOOST_NO_CXX11_HDR_RATIO
|
||||
# define BOOST_NO_CXX11_HDR_REGEX
|
||||
# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_CXX11_HDR_THREAD
|
||||
# define BOOST_NO_CXX11_HDR_TUPLE
|
||||
# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_CXX11_HDR_TYPEINDEX
|
||||
# define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
|
||||
# define BOOST_NO_NUMERIC_LIMITS_LOWEST
|
||||
# define BOOST_NO_CXX11_ALLOCATOR
|
||||
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
|
||||
# define BOOST_NO_CXX11_SMART_PTR
|
||||
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
|
||||
|
||||
#define BOOST_STDLIB "Visual Age default standard library"
|
||||
|
||||
|
@ -334,17 +334,6 @@
|
||||
# define BOOST_HASH_MAP_HEADER <hash_map>
|
||||
#endif
|
||||
|
||||
//
|
||||
// Set BOOST_NO_INITIALIZER_LISTS if there is no library support.
|
||||
//
|
||||
|
||||
#if defined(BOOST_NO_0X_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS)
|
||||
# define BOOST_NO_INITIALIZER_LISTS
|
||||
#endif
|
||||
#if defined(BOOST_NO_INITIALIZER_LISTS) && !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
|
||||
# define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
#endif
|
||||
|
||||
//
|
||||
// Set BOOST_HAS_RVALUE_REFS when BOOST_NO_RVALUE_REFERENCES is not defined
|
||||
//
|
||||
@ -700,5 +689,97 @@ namespace std{ using ::type_info; }
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
// -------------------- Deprecated macros for 1.50 ---------------------------
|
||||
// These will go away in a future release
|
||||
|
||||
// Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST instead of BOOST_NO_INITIALIZER_LISTS
|
||||
#if defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS)
|
||||
# define BOOST_NO_INITIALIZER_LISTS
|
||||
#endif
|
||||
|
||||
// Use BOOST_NO_CXX11_HDR_ARRAY instead of BOOST_NO_0X_HDR_ARRAY
|
||||
#if defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_NO_BOOST_NO_0X_HDR_ARRAY)
|
||||
# define BOOST_NO_0X_HDR_ARRAY
|
||||
#endif
|
||||
// Use BOOST_NO_CXX11_HDR_CHRONO instead of BOOST_NO_0X_HDR_CHRONO
|
||||
#if defined(BOOST_NO_CXX11_HDR_CHRONO) && !defined(BOOST_NO_0X_HDR_CHRONO)
|
||||
# define BOOST_NO_0X_HDR_CHRONO
|
||||
#endif
|
||||
// Use BOOST_NO_CXX11_HDR_CODECVT instead of BOOST_NO_0X_HDR_CODECVT
|
||||
#if defined(BOOST_NO_CXX11_HDR_CODECVT) && !defined(BOOST_NO_0X_HDR_CODECVT)
|
||||
# define BOOST_NO_0X_HDR_CODECVT
|
||||
#endif
|
||||
// Use BOOST_NO_CXX11_HDR_CONDITION_VARIABLE instead of BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
#if defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) && !defined(BOOST_NO_0X_HDR_CONDITION_VARIABLE)
|
||||
# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
#endif
|
||||
// Use BOOST_NO_CXX11_HDR_FORWARD_LIST instead of BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
#if defined(BOOST_NO_CXX11_HDR_FORWARD_LIST) && !defined(BOOST_NO_0X_HDR_FORWARD_LIST)
|
||||
# define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
#endif
|
||||
// Use BOOST_NO_CXX11_HDR_FUTURE instead of BOOST_NO_0X_HDR_FUTURE
|
||||
#if defined(BOOST_NO_CXX11_HDR_FUTURE) && !defined(BOOST_NO_0X_HDR_FUTURE)
|
||||
# define BOOST_NO_0X_HDR_FUTURE
|
||||
#endif
|
||||
|
||||
// Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
// instead of BOOST_NO_0X_HDR_INITIALIZER_LIST or BOOST_NO_INITIALIZER_LISTS
|
||||
#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
# ifndef BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
# endif
|
||||
# ifndef BOOST_NO_INITIALIZER_LISTS
|
||||
# define BOOST_NO_INITIALIZER_LISTS
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// Use BOOST_NO_CXX11_HDR_MUTEX instead of BOOST_NO_0X_HDR_MUTEX
|
||||
#if defined(BOOST_NO_CXX11_HDR_MUTEX) && !defined(BOOST_NO_0X_HDR_MUTEX)
|
||||
# define BOOST_NO_0X_HDR_MUTEX
|
||||
#endif
|
||||
// Use BOOST_NO_CXX11_HDR_RANDOM instead of BOOST_NO_0X_HDR_RANDOM
|
||||
#if defined(BOOST_NO_CXX11_HDR_RANDOM) && !defined(BOOST_NO_0X_HDR_RANDOM)
|
||||
# define BOOST_NO_0X_HDR_RANDOM
|
||||
#endif
|
||||
// Use BOOST_NO_CXX11_HDR_RATIO instead of BOOST_NO_0X_HDR_RATIO
|
||||
#if defined(BOOST_NO_CXX11_HDR_RATIO) && !defined(BOOST_NO_0X_HDR_RATIO)
|
||||
# define BOOST_NO_0X_HDR_RATIO
|
||||
#endif
|
||||
// Use BOOST_NO_CXX11_HDR_REGEX instead of BOOST_NO_0X_HDR_REGEX
|
||||
#if defined(BOOST_NO_CXX11_HDR_REGEX) && !defined(BOOST_NO_0X_HDR_REGEX)
|
||||
# define BOOST_NO_0X_HDR_REGEX
|
||||
#endif
|
||||
// Use BOOST_NO_CXX11_HDR_SYSTEM_ERROR instead of BOOST_NO_0X_HDR_SYSTEM_ERROR
|
||||
#if defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR) && !defined(BOOST_NO_0X_HDR_SYSTEM_ERROR)
|
||||
# define BOOST_NO_0X_HDR_SYSTEM_ERROR
|
||||
#endif
|
||||
// Use BOOST_NO_CXX11_HDR_THREAD instead of BOOST_NO_0X_HDR_THREAD
|
||||
#if defined(BOOST_NO_CXX11_HDR_THREAD) && !defined(BOOST_NO_0X_HDR_THREAD)
|
||||
# define BOOST_NO_0X_HDR_THREAD
|
||||
#endif
|
||||
// Use BOOST_NO_CXX11_HDR_TUPLE instead of BOOST_NO_0X_HDR_TUPLE
|
||||
#if defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_0X_HDR_TUPLE)
|
||||
# define BOOST_NO_0X_HDR_TUPLE
|
||||
#endif
|
||||
// Use BOOST_NO_CXX11_HDR_TYPE_TRAITS instead of BOOST_NO_0X_HDR_TYPE_TRAITS
|
||||
#if defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) && !defined(BOOST_NO_0X_HDR_TYPE_TRAITS)
|
||||
# define BOOST_NO_0X_HDR_TYPE_TRAITS
|
||||
#endif
|
||||
// Use BOOST_NO_CXX11_HDR_TYPEINDEX instead of BOOST_NO_0X_HDR_TYPEINDEX
|
||||
#if defined(BOOST_NO_CXX11_HDR_TYPEINDEX) && !defined(BOOST_NO_0X_HDR_TYPEINDEX)
|
||||
# define BOOST_NO_0X_HDR_TYPEINDEX
|
||||
#endif
|
||||
// Use BOOST_NO_CXX11_HDR_UNORDERED_MAP instead of BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
#if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) && !defined(BOOST_NO_0X_HDR_UNORDERED_MAP)
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
#endif
|
||||
// Use BOOST_NO_CXX11_HDR_UNORDERED_SET instead of BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
#if defined(BOOST_NO_CXX11_HDR_UNORDERED_SET) && !defined(BOOST_NO_0X_HDR_UNORDERED_SET)
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
#endif
|
||||
|
||||
// ------------------ End of deprecated macros for 1.50 ---------------------------
|
||||
|
||||
|
||||
#endif
|
||||
|
385
cpp/BoostParts/boost/container/allocator_traits.hpp
Normal file
385
cpp/BoostParts/boost/container/allocator_traits.hpp
Normal file
@ -0,0 +1,385 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Pablo Halpern 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)
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2011-2012. 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/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_CONTAINER_ALLOCATOR_ALLOCATOR_TRAITS_HPP
|
||||
#define BOOST_CONTAINER_ALLOCATOR_ALLOCATOR_TRAITS_HPP
|
||||
|
||||
#if (defined _MSC_VER) && (_MSC_VER >= 1200)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/container/detail/config_begin.hpp>
|
||||
#include <boost/container/detail/workaround.hpp>
|
||||
#include <boost/intrusive/pointer_traits.hpp>
|
||||
#include <boost/intrusive/detail/memory_util.hpp>
|
||||
#include <boost/container/detail/memory_util.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/container/detail/mpl.hpp>
|
||||
#include <boost/move/move.hpp>
|
||||
#include <limits> //numeric_limits<>::max()
|
||||
#include <new> //placement new
|
||||
#include <memory> //std::allocator
|
||||
#include <boost/container/detail/preprocessor.hpp>
|
||||
|
||||
///@cond
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
|
||||
//workaround needed for C++03 compilers with no construct()
|
||||
//supporting rvalue references
|
||||
template<class A>
|
||||
struct is_std_allocator
|
||||
{ static const bool value = false; };
|
||||
|
||||
template<class T>
|
||||
struct is_std_allocator< std::allocator<T> >
|
||||
{ static const bool value = true; };
|
||||
|
||||
} //namespace container_detail {
|
||||
|
||||
///@endcond
|
||||
|
||||
//! The class template allocator_traits supplies a uniform interface to all allocator types.
|
||||
//! This class is a C++03-compatible implementation of std::allocator_traits
|
||||
template <typename Alloc>
|
||||
struct allocator_traits
|
||||
{
|
||||
//allocator_type
|
||||
typedef Alloc allocator_type;
|
||||
//value_type
|
||||
typedef typename Alloc::value_type value_type;
|
||||
|
||||
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
//! Alloc::pointer if such a type exists; otherwise, value_type*
|
||||
//!
|
||||
typedef unspecified pointer;
|
||||
//! Alloc::const_pointer if such a type exists ; otherwise, pointer_traits<pointer>::rebind<const
|
||||
//!
|
||||
typedef unspecified const_pointer;
|
||||
//! Non-standard extension
|
||||
//! Alloc::reference if such a type exists; otherwise, value_type&
|
||||
typedef unspecified reference;
|
||||
//! Non-standard extension
|
||||
//! Alloc::const_reference if such a type exists ; otherwise, const value_type&
|
||||
typedef unspecified const_reference;
|
||||
//! Alloc::void_pointer if such a type exists ; otherwise, pointer_traits<pointer>::rebind<void>.
|
||||
//!
|
||||
typedef unspecified void_pointer;
|
||||
//! Alloc::const_void_pointer if such a type exists ; otherwis e, pointer_traits<pointer>::rebind<const
|
||||
//!
|
||||
typedef unspecified const_void_pointer;
|
||||
//! Alloc::difference_type if such a type exists ; otherwise, pointer_traits<pointer>::difference_type.
|
||||
//!
|
||||
typedef unspecified difference_type;
|
||||
//! Alloc::size_type if such a type exists ; otherwise, make_unsigned<difference_type>::type
|
||||
//!
|
||||
typedef unspecified size_type;
|
||||
//! Alloc::propagate_on_container_copy_assignment if such a type exists, otherwise an integral_constant
|
||||
//! type with internal constant static member `value` == false.
|
||||
typedef unspecified propagate_on_container_copy_assignment;
|
||||
//! Alloc::propagate_on_container_move_assignment if such a type exists, otherwise an integral_constant
|
||||
//! type with internal constant static member `value` == false.
|
||||
typedef unspecified propagate_on_container_move_assignment;
|
||||
//! Alloc::propagate_on_container_swap if such a type exists, otherwise an integral_constant
|
||||
//! type with internal constant static member `value` == false.
|
||||
typedef unspecified propagate_on_container_swap;
|
||||
//! Defines an allocator: Alloc::rebind<T>::other if such a type exists; otherwise, Alloc<T, Args>
|
||||
//! if Alloc is a class template instantiation of the form Alloc<U, Args>, where Args is zero or
|
||||
//! more type arguments ; otherwise, the instantiation of rebind_alloc is ill-formed.
|
||||
//!
|
||||
//! In C++03 compilers `rebind_alloc` is a struct derived from an allocator
|
||||
//! deduced by previously detailed rules.
|
||||
template <class T> using rebind_alloc = unspecified;
|
||||
|
||||
//! In C++03 compilers `rebind_traits` is a struct derived from
|
||||
//! `allocator_traits<OtherAlloc>`, where `OtherAlloc` is
|
||||
//! the allocator deduced by rules explained in `rebind_alloc`.
|
||||
template <class T> using rebind_traits = allocator_traits<rebind_alloc<T> >;
|
||||
|
||||
//! Non-standard extension: Portable allocator rebind for C++03 and C++11 compilers.
|
||||
//! `type` is an allocator related to Alloc deduced deduced by rules explained in `rebind_alloc`.
|
||||
template <class T>
|
||||
struct portable_rebind_alloc
|
||||
{ typedef unspecified_type type; };
|
||||
#else
|
||||
//pointer
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Alloc,
|
||||
pointer, value_type*)
|
||||
pointer;
|
||||
//const_pointer
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::container_detail::, Alloc,
|
||||
const_pointer, typename boost::intrusive::pointer_traits<pointer>::template
|
||||
rebind_pointer<const value_type>)
|
||||
const_pointer;
|
||||
//reference
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Alloc,
|
||||
reference, typename container_detail::unvoid<value_type>::type&)
|
||||
reference;
|
||||
//const_reference
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Alloc,
|
||||
const_reference, const typename container_detail::unvoid<value_type>::type&)
|
||||
const_reference;
|
||||
//void_pointer
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::container_detail::, Alloc,
|
||||
void_pointer, typename boost::intrusive::pointer_traits<pointer>::template
|
||||
rebind_pointer<void>)
|
||||
void_pointer;
|
||||
//const_void_pointer
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::container_detail::, Alloc,
|
||||
const_void_pointer, typename boost::intrusive::pointer_traits<pointer>::template
|
||||
rebind_pointer<const void>)
|
||||
const_void_pointer;
|
||||
//difference_type
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Alloc,
|
||||
difference_type, std::ptrdiff_t)
|
||||
difference_type;
|
||||
//size_type
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Alloc,
|
||||
size_type, std::size_t)
|
||||
size_type;
|
||||
//propagate_on_container_copy_assignment
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Alloc,
|
||||
propagate_on_container_copy_assignment, boost::false_type)
|
||||
propagate_on_container_copy_assignment;
|
||||
//propagate_on_container_move_assignment
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Alloc,
|
||||
propagate_on_container_move_assignment, boost::false_type)
|
||||
propagate_on_container_move_assignment;
|
||||
//propagate_on_container_swap
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Alloc,
|
||||
propagate_on_container_swap, boost::false_type)
|
||||
propagate_on_container_swap;
|
||||
|
||||
#if !defined(BOOST_NO_TEMPLATE_ALIASES)
|
||||
//C++11
|
||||
template <typename T> using rebind_alloc = typename boost::intrusive::detail::type_rebinder<Alloc, T>::type;
|
||||
template <typename T> using rebind_traits = allocator_traits< rebind_alloc<T> >;
|
||||
#else // #if !defined(BOOST_NO_TEMPLATE_ALIASES)
|
||||
//Some workaround for C++03 or C++11 compilers with no template aliases
|
||||
template <typename T>
|
||||
struct rebind_alloc : boost::intrusive::detail::type_rebinder<Alloc,T>::type
|
||||
{
|
||||
typedef typename boost::intrusive::detail::type_rebinder<Alloc,T>::type Base;
|
||||
#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||
template <typename... Args>
|
||||
rebind_alloc(BOOST_FWD_REF(Args)... args)
|
||||
: Base(boost::forward<Args>(args)...)
|
||||
{}
|
||||
#else // #if !defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||
#define BOOST_PP_LOCAL_MACRO(n) \
|
||||
BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
|
||||
rebind_alloc(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
|
||||
: Base(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)) \
|
||||
{} \
|
||||
//
|
||||
#define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
|
||||
#include BOOST_PP_LOCAL_ITERATE()
|
||||
#endif // #if !defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct rebind_traits
|
||||
: allocator_traits<typename boost::intrusive::detail::type_rebinder<Alloc, T>::type>
|
||||
{};
|
||||
#endif // #if !defined(BOOST_NO_TEMPLATE_ALIASES)
|
||||
template <class T>
|
||||
struct portable_rebind_alloc
|
||||
{ typedef typename boost::intrusive::detail::type_rebinder<Alloc, T>::type type; };
|
||||
#endif //BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
//! <b>Returns</b>: `a.allocate(n)`
|
||||
//!
|
||||
static pointer allocate(Alloc &a, size_type n)
|
||||
{ return a.allocate(n); }
|
||||
|
||||
//! <b>Returns</b>: `a.deallocate(p, n)`
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing
|
||||
static void deallocate(Alloc &a, pointer p, size_type n)
|
||||
{ return a.deallocate(p, n); }
|
||||
|
||||
//! <b>Effects</b>: calls `a.construct(p, std::forward<Args>(args)...)` if that call is well-formed;
|
||||
//! otherwise, invokes `::new (static_cast<void*>(p)) T(std::forward<Args>(args)...)`
|
||||
static pointer allocate(Alloc &a, size_type n, const_void_pointer p)
|
||||
{
|
||||
const bool value = boost::container::container_detail::
|
||||
has_member_function_callable_with_allocate
|
||||
<Alloc, const size_type, const const_void_pointer>::value;
|
||||
::boost::integral_constant<bool, value> flag;
|
||||
return allocator_traits::priv_allocate(flag, a, n, p);
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: calls `a.destroy(p)` if that call is well-formed;
|
||||
//! otherwise, invokes `p->~T()`.
|
||||
template<class T>
|
||||
static void destroy(Alloc &a, T*p)
|
||||
{
|
||||
typedef T* destroy_pointer;
|
||||
const bool value = boost::container::container_detail::
|
||||
has_member_function_callable_with_destroy
|
||||
<Alloc, const destroy_pointer>::value;
|
||||
::boost::integral_constant<bool, value> flag;
|
||||
allocator_traits::priv_destroy(flag, a, p);
|
||||
}
|
||||
|
||||
//! <b>Returns</b>: `a.max_size()` if that expression is well-formed; otherwise,
|
||||
//! `numeric_limits<size_type>::max()`.
|
||||
static size_type max_size(const Alloc &a)
|
||||
{
|
||||
const bool value = boost::container::container_detail::
|
||||
has_member_function_callable_with_max_size
|
||||
<const Alloc>::value;
|
||||
::boost::integral_constant<bool, value> flag;
|
||||
return allocator_traits::priv_max_size(flag, a);
|
||||
}
|
||||
|
||||
//! <b>Returns</b>: `a.select_on_container_copy_construction()` if that expression is well-formed;
|
||||
//! otherwise, a.
|
||||
static Alloc select_on_container_copy_construction(const Alloc &a)
|
||||
{
|
||||
const bool value = boost::container::container_detail::
|
||||
has_member_function_callable_with_select_on_container_copy_construction
|
||||
<const Alloc>::value;
|
||||
::boost::integral_constant<bool, value> flag;
|
||||
return allocator_traits::priv_select_on_container_copy_construction(flag, a);
|
||||
}
|
||||
|
||||
#if !defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
//! <b>Effects</b>: calls `a.construct(p, std::forward<Args>(args)...)` if that call is well-formed;
|
||||
//! otherwise, invokes `::new (static_cast<void*>(p)) T(std::forward<Args>(args)...)`
|
||||
template <class T, class ...Args>
|
||||
static void construct(Alloc & a, T* p, BOOST_FWD_REF(Args)... args)
|
||||
{
|
||||
::boost::integral_constant<bool, container_detail::is_std_allocator<Alloc>::value> flag;
|
||||
allocator_traits::priv_construct(flag, a, p, ::boost::forward<Args>(args)...);
|
||||
}
|
||||
#endif
|
||||
///@cond
|
||||
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
private:
|
||||
static pointer priv_allocate(boost::true_type, Alloc &a, size_type n, const_void_pointer p)
|
||||
{ return a.allocate(n, p); }
|
||||
|
||||
static pointer priv_allocate(boost::false_type, Alloc &a, size_type n, const_void_pointer)
|
||||
{ return allocator_traits::allocate(a, n); }
|
||||
|
||||
template<class T>
|
||||
static void priv_destroy(boost::true_type, Alloc &a, T* p)
|
||||
{ a.destroy(p); }
|
||||
|
||||
template<class T>
|
||||
static void priv_destroy(boost::false_type, Alloc &, T* p)
|
||||
{ p->~T(); (void)p; }
|
||||
|
||||
static size_type priv_max_size(boost::true_type, const Alloc &a)
|
||||
{ return a.max_size(); }
|
||||
|
||||
static size_type priv_max_size(boost::false_type, const Alloc &)
|
||||
{ return (std::numeric_limits<size_type>::max)(); }
|
||||
|
||||
static Alloc priv_select_on_container_copy_construction(boost::true_type, const Alloc &a)
|
||||
{ return a.select_on_container_copy_construction(); }
|
||||
|
||||
static Alloc priv_select_on_container_copy_construction(boost::false_type, const Alloc &a)
|
||||
{ return a; }
|
||||
|
||||
#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||
template<class T, class ...Args>
|
||||
static void priv_construct(boost::false_type, Alloc &a, T *p, BOOST_FWD_REF(Args) ...args)
|
||||
{
|
||||
const bool value = boost::container::container_detail::
|
||||
has_member_function_callable_with_construct
|
||||
< Alloc, T*, Args... >::value;
|
||||
::boost::integral_constant<bool, value> flag;
|
||||
priv_construct_dispatch2(flag, a, p, ::boost::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
template<class T, class ...Args>
|
||||
static void priv_construct(boost::true_type, Alloc &a, T *p, BOOST_FWD_REF(Args) ...args)
|
||||
{
|
||||
priv_construct_dispatch2(boost::false_type(), a, p, ::boost::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
template<class T, class ...Args>
|
||||
static void priv_construct_dispatch2(boost::true_type, Alloc &a, T *p, BOOST_FWD_REF(Args) ...args)
|
||||
{ a.construct( p, ::boost::forward<Args>(args)...); }
|
||||
|
||||
template<class T, class ...Args>
|
||||
static void priv_construct_dispatch2(boost::false_type, Alloc &, T *p, BOOST_FWD_REF(Args) ...args)
|
||||
{ ::new((void*)p) T(::boost::forward<Args>(args)...); }
|
||||
#else // #if !defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||
public:
|
||||
#define BOOST_PP_LOCAL_MACRO(n) \
|
||||
template<class T BOOST_PP_ENUM_TRAILING_PARAMS(n, class P) > \
|
||||
static void construct(Alloc &a, T *p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
|
||||
{ \
|
||||
::boost::integral_constant<bool, container_detail::is_std_allocator<Alloc>::value> flag; \
|
||||
allocator_traits::priv_construct(flag, a, p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); \
|
||||
} \
|
||||
//
|
||||
#define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
|
||||
#include BOOST_PP_LOCAL_ITERATE()
|
||||
|
||||
private:
|
||||
#define BOOST_PP_LOCAL_MACRO(n) \
|
||||
template<class T BOOST_PP_ENUM_TRAILING_PARAMS(n, class P) > \
|
||||
static void priv_construct(boost::false_type, Alloc &a, T *p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST,_)) \
|
||||
{ \
|
||||
const bool value = \
|
||||
boost::container::container_detail::has_member_function_callable_with_construct \
|
||||
< Alloc, T* BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_FWD_TYPE, _) >::value; \
|
||||
::boost::integral_constant<bool, value> flag; \
|
||||
priv_construct_dispatch2(flag, a, p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _) ); \
|
||||
} \
|
||||
\
|
||||
template<class T BOOST_PP_ENUM_TRAILING_PARAMS(n, class P) > \
|
||||
static void priv_construct(boost::true_type, Alloc &a, T *p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST,_)) \
|
||||
{ \
|
||||
priv_construct_dispatch2(boost::false_type(), a, p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _) ); \
|
||||
} \
|
||||
\
|
||||
template<class T BOOST_PP_ENUM_TRAILING_PARAMS(n, class P) > \
|
||||
static void priv_construct_dispatch2(boost::true_type, Alloc &a, T *p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST,_)) \
|
||||
{ a.construct( p BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _) ); } \
|
||||
\
|
||||
template<class T BOOST_PP_ENUM_TRAILING_PARAMS(n, class P) > \
|
||||
static void priv_construct_dispatch2(boost::false_type, Alloc &, T *p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _) ) \
|
||||
{ ::new((void*)p) T(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); } \
|
||||
//
|
||||
#define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
|
||||
#include BOOST_PP_LOCAL_ITERATE()
|
||||
#endif // #if !defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||
#endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
||||
///@endcond
|
||||
};
|
||||
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
#include <boost/container/detail/config_end.hpp>
|
||||
|
||||
#endif // ! defined(BOOST_CONTAINER_ALLOCATOR_ALLOCATOR_TRAITS_HPP)
|
@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2005-2011. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2005-2012. 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)
|
||||
//
|
||||
@ -132,26 +132,22 @@ class basic_string;
|
||||
|
||||
//! Type used to tag that the input range is
|
||||
//! guaranteed to be ordered
|
||||
struct ordered_range_impl_t {};
|
||||
struct ordered_range_t
|
||||
{};
|
||||
|
||||
//! Type used to tag that the input range is
|
||||
//! guaranteed to be ordered and unique
|
||||
struct ordered_unique_range_impl_t{};
|
||||
|
||||
/// @cond
|
||||
|
||||
typedef ordered_range_impl_t * ordered_range_t;
|
||||
typedef ordered_unique_range_impl_t *ordered_unique_range_t;
|
||||
|
||||
/// @endcond
|
||||
struct ordered_unique_range_t
|
||||
: public ordered_range_t
|
||||
{};
|
||||
|
||||
//! Value used to tag that the input range is
|
||||
//! guaranteed to be ordered
|
||||
static const ordered_range_t ordered_range = 0;
|
||||
static const ordered_range_t ordered_range = ordered_range_t();
|
||||
|
||||
//! Value used to tag that the input range is
|
||||
//! guaranteed to be ordered and unique
|
||||
static const ordered_unique_range_t ordered_unique_range = 0;
|
||||
static const ordered_unique_range_t ordered_unique_range = ordered_unique_range_t();
|
||||
|
||||
/// @cond
|
||||
|
||||
|
49
cpp/BoostParts/boost/container/detail/config_begin.hpp
Normal file
49
cpp/BoostParts/boost/container/detail/config_begin.hpp
Normal file
@ -0,0 +1,49 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2005-2012. 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/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_CONFIG_INCLUDED
|
||||
#define BOOST_CONTAINER_CONTAINER_DETAIL_CONFIG_INCLUDED
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#endif //BOOST_CONTAINER_CONTAINER_DETAIL_CONFIG_INCLUDED
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#ifndef _CRT_SECURE_NO_DEPRECATE
|
||||
#define BOOST_CONTAINER_DETAIL_CRT_SECURE_NO_DEPRECATE
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
#endif
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable : 4702) // unreachable code
|
||||
#pragma warning (disable : 4706) // assignment within conditional expression
|
||||
#pragma warning (disable : 4127) // conditional expression is constant
|
||||
#pragma warning (disable : 4146) // unary minus operator applied to unsigned type, result still unsigned
|
||||
#pragma warning (disable : 4284) // odd return type for operator->
|
||||
#pragma warning (disable : 4244) // possible loss of data
|
||||
#pragma warning (disable : 4251) // "identifier" : class "type" needs to have dll-interface to be used by clients of class "type2"
|
||||
#pragma warning (disable : 4267) // conversion from "X" to "Y", possible loss of data
|
||||
#pragma warning (disable : 4275) // non DLL-interface classkey "identifier" used as base for DLL-interface classkey "identifier"
|
||||
#pragma warning (disable : 4355) // "this" : used in base member initializer list
|
||||
#pragma warning (disable : 4503) // "identifier" : decorated name length exceeded, name was truncated
|
||||
#pragma warning (disable : 4511) // copy constructor could not be generated
|
||||
#pragma warning (disable : 4512) // assignment operator could not be generated
|
||||
#pragma warning (disable : 4514) // unreferenced inline removed
|
||||
#pragma warning (disable : 4521) // Disable "multiple copy constructors specified"
|
||||
#pragma warning (disable : 4522) // "class" : multiple assignment operators specified
|
||||
#pragma warning (disable : 4675) // "method" should be declared "static" and have exactly one parameter
|
||||
#pragma warning (disable : 4710) // function not inlined
|
||||
#pragma warning (disable : 4711) // function selected for automatic inline expansion
|
||||
#pragma warning (disable : 4786) // identifier truncated in debug info
|
||||
#pragma warning (disable : 4996) // "function": was declared deprecated
|
||||
#pragma warning (disable : 4197) // top-level volatile in cast is ignored
|
||||
#pragma warning (disable : 4541) // 'typeid' used on polymorphic type 'boost::exception'
|
||||
// with /GR-; unpredictable behavior may result
|
||||
#pragma warning (disable : 4673) // throwing '' the following types will not be considered at the catch site
|
||||
#pragma warning (disable : 4671) // the copy constructor is inaccessible
|
||||
#pragma warning (disable : 4584) // X is already a base-class of Y
|
||||
#endif //BOOST_MSVC
|
17
cpp/BoostParts/boost/container/detail/config_end.hpp
Normal file
17
cpp/BoostParts/boost/container/detail/config_end.hpp
Normal file
@ -0,0 +1,17 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2005-2012. 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/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
#if defined BOOST_MSVC
|
||||
#pragma warning (pop)
|
||||
#ifdef BOOST_CONTAINER_DETAIL_CRT_SECURE_NO_DEPRECATE
|
||||
#undef BOOST_CONTAINER_DETAIL_CRT_SECURE_NO_DEPRECATE
|
||||
#undef _CRT_SECURE_NO_DEPRECATE
|
||||
#endif
|
||||
#endif
|
||||
|
77
cpp/BoostParts/boost/container/detail/memory_util.hpp
Normal file
77
cpp/BoostParts/boost/container/detail/memory_util.hpp
Normal file
@ -0,0 +1,77 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2011-2012. 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/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_CONTAINER_ALLOCATOR_MEMORY_UTIL_HPP
|
||||
#define BOOST_CONTAINER_ALLOCATOR_MEMORY_UTIL_HPP
|
||||
|
||||
#if (defined _MSC_VER) && (_MSC_VER >= 1200)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/container/detail/config_begin.hpp>
|
||||
#include <boost/container/detail/workaround.hpp>
|
||||
#include <boost/container/detail/preprocessor.hpp>
|
||||
#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
|
||||
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME allocate
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace container { namespace container_detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 2, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME destroy
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace container { namespace container_detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 3, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME max_size
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace container { namespace container_detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 0, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME select_on_container_copy_construction
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace container { namespace container_detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 0, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME construct
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace container { namespace container_detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS+1, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
|
||||
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(pointer)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_pointer)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(reference)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_reference)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(void_pointer)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_void_pointer)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(size_type)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_copy_assignment)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_move_assignment)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_swap)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(difference_type)
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
#include <boost/container/detail/config_end.hpp>
|
||||
|
||||
#endif // ! defined(BOOST_CONTAINER_ALLOCATOR_MEMORY_UTIL_HPP)
|
160
cpp/BoostParts/boost/container/detail/mpl.hpp
Normal file
160
cpp/BoostParts/boost/container/detail/mpl.hpp
Normal file
@ -0,0 +1,160 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2005-2012.
|
||||
//
|
||||
// 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/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_MPL_HPP
|
||||
#define BOOST_CONTAINER_CONTAINER_DETAIL_MPL_HPP
|
||||
|
||||
#if (defined _MSC_VER) && (_MSC_VER >= 1200)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
|
||||
template <class T, T val>
|
||||
struct integral_constant
|
||||
{
|
||||
static const T value = val;
|
||||
typedef integral_constant<T,val> type;
|
||||
};
|
||||
|
||||
template< bool C_ >
|
||||
struct bool_ : integral_constant<bool, C_>
|
||||
{
|
||||
static const bool value = C_;
|
||||
operator bool() const { return bool_::value; }
|
||||
};
|
||||
|
||||
typedef bool_<true> true_;
|
||||
typedef bool_<false> false_;
|
||||
|
||||
typedef true_ true_type;
|
||||
typedef false_ false_type;
|
||||
|
||||
typedef char yes_type;
|
||||
struct no_type
|
||||
{
|
||||
char padding[8];
|
||||
};
|
||||
|
||||
template <bool B, class T = void>
|
||||
struct enable_if_c {
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct enable_if_c<false, T> {};
|
||||
|
||||
template <class Cond, class T = void>
|
||||
struct enable_if : public enable_if_c<Cond::value, T> {};
|
||||
|
||||
template <class Cond, class T = void>
|
||||
struct disable_if : public enable_if_c<!Cond::value, T> {};
|
||||
|
||||
template <bool B, class T = void>
|
||||
struct disable_if_c : public enable_if_c<!B, T> {};
|
||||
|
||||
template <class T, class U>
|
||||
class is_convertible
|
||||
{
|
||||
typedef char true_t;
|
||||
class false_t { char dummy[2]; };
|
||||
static true_t dispatch(U);
|
||||
static false_t dispatch(...);
|
||||
static T trigger();
|
||||
public:
|
||||
enum { value = sizeof(dispatch(trigger())) == sizeof(true_t) };
|
||||
};
|
||||
|
||||
template<
|
||||
bool C
|
||||
, typename T1
|
||||
, typename T2
|
||||
>
|
||||
struct if_c
|
||||
{
|
||||
typedef T1 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T1
|
||||
, typename T2
|
||||
>
|
||||
struct if_c<false,T1,T2>
|
||||
{
|
||||
typedef T2 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T1
|
||||
, typename T2
|
||||
, typename T3
|
||||
>
|
||||
struct if_
|
||||
{
|
||||
typedef typename if_c<0 != T1::value, T2, T3>::type type;
|
||||
};
|
||||
|
||||
|
||||
template <class Pair>
|
||||
struct select1st
|
||||
// : public std::unary_function<Pair, typename Pair::first_type>
|
||||
{
|
||||
template<class OtherPair>
|
||||
const typename Pair::first_type& operator()(const OtherPair& x) const
|
||||
{ return x.first; }
|
||||
|
||||
const typename Pair::first_type& operator()(const typename Pair::first_type& x) const
|
||||
{ return x; }
|
||||
};
|
||||
|
||||
// identity is an extension: it is not part of the standard.
|
||||
template <class T>
|
||||
struct identity
|
||||
// : public std::unary_function<T,T>
|
||||
{
|
||||
typedef T type;
|
||||
const T& operator()(const T& x) const
|
||||
{ return x; }
|
||||
};
|
||||
|
||||
template<std::size_t S>
|
||||
struct ls_zeros
|
||||
{
|
||||
static const std::size_t value = (S & std::size_t(1)) ? 0 : (1u + ls_zeros<(S >> 1u)>::value);
|
||||
};
|
||||
|
||||
template<>
|
||||
struct ls_zeros<0>
|
||||
{
|
||||
static const std::size_t value = 0;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct ls_zeros<1>
|
||||
{
|
||||
static const std::size_t value = 0;
|
||||
};
|
||||
|
||||
template <typename T> struct unvoid { typedef T type; };
|
||||
template <> struct unvoid<void> { struct type { }; };
|
||||
template <> struct unvoid<const void> { struct type { }; };
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_MPL_HPP
|
||||
|
353
cpp/BoostParts/boost/container/detail/pair.hpp
Normal file
353
cpp/BoostParts/boost/container/detail/pair.hpp
Normal file
@ -0,0 +1,353 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2005-2012.
|
||||
//
|
||||
// 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/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_PAIR_HPP
|
||||
#define BOOST_CONTAINER_CONTAINER_DETAIL_PAIR_HPP
|
||||
|
||||
#if (defined _MSC_VER) && (_MSC_VER >= 1200)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include "config_begin.hpp"
|
||||
#include <boost/container/detail/workaround.hpp>
|
||||
|
||||
#include <boost/container/detail/mpl.hpp>
|
||||
#include <boost/container/detail/type_traits.hpp>
|
||||
#include <boost/container/detail/mpl.hpp>
|
||||
#include <boost/container/detail/type_traits.hpp>
|
||||
|
||||
#include <utility> //std::pair
|
||||
|
||||
#include <boost/move/move.hpp>
|
||||
#include <boost/type_traits/is_class.hpp>
|
||||
|
||||
#ifndef BOOST_CONTAINER_PERFECT_FORWARDING
|
||||
#include <boost/container/detail/preprocessor.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
|
||||
template <class T1, class T2>
|
||||
struct pair;
|
||||
|
||||
template <class T>
|
||||
struct is_pair
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
template <class T1, class T2>
|
||||
struct is_pair< pair<T1, T2> >
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
template <class T1, class T2>
|
||||
struct is_pair< std::pair<T1, T2> >
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
struct pair_nat;
|
||||
|
||||
struct piecewise_construct_t { };
|
||||
static const piecewise_construct_t piecewise_construct = piecewise_construct_t();
|
||||
|
||||
/*
|
||||
template <class T1, class T2>
|
||||
struct pair
|
||||
{
|
||||
template <class U, class V> pair(pair<U, V>&& p);
|
||||
template <class... Args1, class... Args2>
|
||||
pair(piecewise_construct_t, tuple<Args1...> first_args,
|
||||
tuple<Args2...> second_args);
|
||||
|
||||
template <class U, class V> pair& operator=(const pair<U, V>& p);
|
||||
pair& operator=(pair&& p) noexcept(is_nothrow_move_assignable<T1>::value &&
|
||||
is_nothrow_move_assignable<T2>::value);
|
||||
template <class U, class V> pair& operator=(pair<U, V>&& p);
|
||||
|
||||
void swap(pair& p) noexcept(noexcept(swap(first, p.first)) &&
|
||||
noexcept(swap(second, p.second)));
|
||||
};
|
||||
|
||||
template <class T1, class T2> bool operator==(const pair<T1,T2>&, const pair<T1,T2>&);
|
||||
template <class T1, class T2> bool operator!=(const pair<T1,T2>&, const pair<T1,T2>&);
|
||||
template <class T1, class T2> bool operator< (const pair<T1,T2>&, const pair<T1,T2>&);
|
||||
template <class T1, class T2> bool operator> (const pair<T1,T2>&, const pair<T1,T2>&);
|
||||
template <class T1, class T2> bool operator>=(const pair<T1,T2>&, const pair<T1,T2>&);
|
||||
template <class T1, class T2> bool operator<=(const pair<T1,T2>&, const pair<T1,T2>&);
|
||||
*/
|
||||
|
||||
|
||||
template <class T1, class T2>
|
||||
struct pair
|
||||
{
|
||||
private:
|
||||
BOOST_COPYABLE_AND_MOVABLE(pair)
|
||||
|
||||
public:
|
||||
typedef T1 first_type;
|
||||
typedef T2 second_type;
|
||||
|
||||
T1 first;
|
||||
T2 second;
|
||||
|
||||
//Default constructor
|
||||
pair()
|
||||
: first(), second()
|
||||
{}
|
||||
|
||||
//pair copy assignment
|
||||
pair(const pair& x)
|
||||
: first(x.first), second(x.second)
|
||||
{}
|
||||
|
||||
//pair move constructor
|
||||
pair(BOOST_RV_REF(pair) p)
|
||||
: first(::boost::move(p.first)), second(::boost::move(p.second))
|
||||
{}
|
||||
|
||||
template <class D, class S>
|
||||
pair(const pair<D, S> &p)
|
||||
: first(p.first), second(p.second)
|
||||
{}
|
||||
|
||||
template <class D, class S>
|
||||
pair(BOOST_RV_REF_BEG pair<D, S> BOOST_RV_REF_END p)
|
||||
: first(::boost::move(p.first)), second(::boost::move(p.second))
|
||||
{}
|
||||
|
||||
//pair from two values
|
||||
pair(const T1 &t1, const T2 &t2)
|
||||
: first(t1)
|
||||
, second(t2)
|
||||
{}
|
||||
|
||||
template<class U, class V>
|
||||
pair(BOOST_FWD_REF(U) u, BOOST_FWD_REF(V) v)
|
||||
: first(::boost::forward<U>(u))
|
||||
, second(::boost::forward<V>(v))
|
||||
{}
|
||||
|
||||
//And now compatibility with std::pair
|
||||
pair(const std::pair<T1, T2>& x)
|
||||
: first(x.first), second(x.second)
|
||||
{}
|
||||
|
||||
template <class D, class S>
|
||||
pair(const std::pair<D, S>& p)
|
||||
: first(p.first), second(p.second)
|
||||
{}
|
||||
|
||||
pair(BOOST_RV_REF_BEG std::pair<T1, T2> BOOST_RV_REF_END p)
|
||||
: first(::boost::move(p.first)), second(::boost::move(p.second))
|
||||
{}
|
||||
|
||||
template <class D, class S>
|
||||
pair(BOOST_RV_REF_BEG std::pair<D, S> BOOST_RV_REF_END p)
|
||||
: first(::boost::move(p.first)), second(::boost::move(p.second))
|
||||
{}
|
||||
|
||||
//piecewise_construct missing
|
||||
//template <class U, class V> pair(pair<U, V>&& p);
|
||||
//template <class... Args1, class... Args2>
|
||||
// pair(piecewise_construct_t, tuple<Args1...> first_args,
|
||||
// tuple<Args2...> second_args);
|
||||
/*
|
||||
//Variadic versions
|
||||
template<class U>
|
||||
pair(BOOST_CONTAINER_PP_PARAM(U, u), typename container_detail::disable_if
|
||||
< container_detail::is_pair< typename container_detail::remove_ref_const<U>::type >, pair_nat>::type* = 0)
|
||||
: first(::boost::forward<U>(u))
|
||||
, second()
|
||||
{}
|
||||
|
||||
#ifdef BOOST_CONTAINER_PERFECT_FORWARDING
|
||||
|
||||
template<class U, class V, class ...Args>
|
||||
pair(U &&u, V &&v)
|
||||
: first(::boost::forward<U>(u))
|
||||
, second(::boost::forward<V>(v), ::boost::forward<Args>(args)...)
|
||||
{}
|
||||
|
||||
#else
|
||||
|
||||
#define BOOST_PP_LOCAL_MACRO(n) \
|
||||
template<class U, BOOST_PP_ENUM_PARAMS(n, class P)> \
|
||||
pair(BOOST_CONTAINER_PP_PARAM(U, u) \
|
||||
,BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
|
||||
: first(::boost::forward<U>(u)) \
|
||||
, second(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)) \
|
||||
{} \
|
||||
//!
|
||||
#define BOOST_PP_LOCAL_LIMITS (1, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
|
||||
#include BOOST_PP_LOCAL_ITERATE()
|
||||
#endif
|
||||
*/
|
||||
//pair copy assignment
|
||||
pair& operator=(BOOST_COPY_ASSIGN_REF(pair) p)
|
||||
{
|
||||
first = p.first;
|
||||
second = p.second;
|
||||
return *this;
|
||||
}
|
||||
|
||||
//pair move assignment
|
||||
pair& operator=(BOOST_RV_REF(pair) p)
|
||||
{
|
||||
first = ::boost::move(p.first);
|
||||
second = ::boost::move(p.second);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class D, class S>
|
||||
typename ::boost::container::container_detail::enable_if_c
|
||||
< !(::boost::container::container_detail::is_same<T1, D>::value &&
|
||||
::boost::container::container_detail::is_same<T2, S>::value)
|
||||
, pair &>::type
|
||||
operator=(const pair<D, S>&p)
|
||||
{
|
||||
first = p.first;
|
||||
second = p.second;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class D, class S>
|
||||
typename ::boost::container::container_detail::enable_if_c
|
||||
< !(::boost::container::container_detail::is_same<T1, D>::value &&
|
||||
::boost::container::container_detail::is_same<T2, S>::value)
|
||||
, pair &>::type
|
||||
operator=(BOOST_RV_REF_BEG pair<D, S> BOOST_RV_REF_END p)
|
||||
{
|
||||
first = ::boost::move(p.first);
|
||||
second = ::boost::move(p.second);
|
||||
return *this;
|
||||
}
|
||||
|
||||
//std::pair copy assignment
|
||||
pair& operator=(const std::pair<T1, T2> &p)
|
||||
{
|
||||
first = p.first;
|
||||
second = p.second;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class D, class S>
|
||||
pair& operator=(const std::pair<D, S> &p)
|
||||
{
|
||||
first = ::boost::move(p.first);
|
||||
second = ::boost::move(p.second);
|
||||
return *this;
|
||||
}
|
||||
|
||||
//std::pair move assignment
|
||||
pair& operator=(BOOST_RV_REF_BEG std::pair<T1, T2> BOOST_RV_REF_END p)
|
||||
{
|
||||
first = ::boost::move(p.first);
|
||||
second = ::boost::move(p.second);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class D, class S>
|
||||
pair& operator=(BOOST_RV_REF_BEG std::pair<D, S> BOOST_RV_REF_END p)
|
||||
{
|
||||
first = ::boost::move(p.first);
|
||||
second = ::boost::move(p.second);
|
||||
return *this;
|
||||
}
|
||||
|
||||
//swap
|
||||
void swap(pair& p)
|
||||
{
|
||||
using std::swap;
|
||||
swap(this->first, p.first);
|
||||
swap(this->second, p.second);
|
||||
}
|
||||
};
|
||||
|
||||
template <class T1, class T2>
|
||||
inline bool operator==(const pair<T1,T2>& x, const pair<T1,T2>& y)
|
||||
{ return static_cast<bool>(x.first == y.first && x.second == y.second); }
|
||||
|
||||
template <class T1, class T2>
|
||||
inline bool operator< (const pair<T1,T2>& x, const pair<T1,T2>& y)
|
||||
{ return static_cast<bool>(x.first < y.first ||
|
||||
(!(y.first < x.first) && x.second < y.second)); }
|
||||
|
||||
template <class T1, class T2>
|
||||
inline bool operator!=(const pair<T1,T2>& x, const pair<T1,T2>& y)
|
||||
{ return static_cast<bool>(!(x == y)); }
|
||||
|
||||
template <class T1, class T2>
|
||||
inline bool operator> (const pair<T1,T2>& x, const pair<T1,T2>& y)
|
||||
{ return y < x; }
|
||||
|
||||
template <class T1, class T2>
|
||||
inline bool operator>=(const pair<T1,T2>& x, const pair<T1,T2>& y)
|
||||
{ return static_cast<bool>(!(x < y)); }
|
||||
|
||||
template <class T1, class T2>
|
||||
inline bool operator<=(const pair<T1,T2>& x, const pair<T1,T2>& y)
|
||||
{ return static_cast<bool>(!(y < x)); }
|
||||
|
||||
template <class T1, class T2>
|
||||
inline pair<T1, T2> make_pair(T1 x, T2 y)
|
||||
{ return pair<T1, T2>(x, y); }
|
||||
|
||||
template <class T1, class T2>
|
||||
inline void swap(pair<T1, T2>& x, pair<T1, T2>& y)
|
||||
{
|
||||
swap(x.first, y.first);
|
||||
swap(x.second, y.second);
|
||||
}
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace container {
|
||||
|
||||
|
||||
//Without this specialization recursive flat_(multi)map instantiation fails
|
||||
//because is_enum needs to instantiate the recursive pair, leading to a compilation error).
|
||||
//This breaks the cycle clearly stating that pair is not an enum avoiding any instantiation.
|
||||
template<class T>
|
||||
struct is_enum;
|
||||
|
||||
template<class T, class U>
|
||||
struct is_enum< ::boost::container::container_detail::pair<T, U> >
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
//This specialization is needed to avoid instantiation of pair in
|
||||
//is_class, and allow recursive maps.
|
||||
template <class T1, class T2>
|
||||
struct is_class< ::boost::container::container_detail::pair<T1, T2> >
|
||||
: public ::boost::true_type
|
||||
{};
|
||||
|
||||
#ifdef BOOST_NO_RVALUE_REFERENCES
|
||||
|
||||
template<class T1, class T2>
|
||||
struct has_move_emulation_enabled< ::boost::container::container_detail::pair<T1, T2> >
|
||||
: ::boost::true_type
|
||||
{};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
} //namespace boost {
|
||||
|
||||
#include <boost/container/detail/config_end.hpp>
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_DETAIL_PAIR_HPP
|
185
cpp/BoostParts/boost/container/detail/preprocessor.hpp
Normal file
185
cpp/BoostParts/boost/container/detail/preprocessor.hpp
Normal file
@ -0,0 +1,185 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2008-2012. 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/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_CONTAINER_DETAIL_PREPROCESSOR_HPP
|
||||
#define BOOST_CONTAINER_DETAIL_PREPROCESSOR_HPP
|
||||
|
||||
#if (defined _MSC_VER) && (_MSC_VER >= 1200)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/container/detail/config_begin.hpp>
|
||||
|
||||
#ifndef BOOST_NO_RVALUE_REFERENCES
|
||||
#include <boost/container/detail/stored_ref.hpp>
|
||||
#endif //#ifndef BOOST_NO_RVALUE_REFERENCES
|
||||
|
||||
#include <boost/container/detail/workaround.hpp>
|
||||
|
||||
#ifdef BOOST_CONTAINER_PERFECT_FORWARDING
|
||||
//#error "This file is not needed when perfect forwarding is available"
|
||||
#endif //BOOST_CONTAINER_PERFECT_FORWARDING
|
||||
|
||||
#include <boost/preprocessor/iteration/local.hpp>
|
||||
#include <boost/preprocessor/punctuation/paren_if.hpp>
|
||||
#include <boost/preprocessor/punctuation/comma_if.hpp>
|
||||
#include <boost/preprocessor/control/expr_if.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/preprocessor/repetition/enum.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_trailing.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_shifted.hpp>
|
||||
#include <boost/preprocessor/repetition/repeat.hpp>
|
||||
#include <boost/preprocessor/logical/not.hpp>
|
||||
#include <boost/preprocessor/arithmetic/sub.hpp>
|
||||
#include <boost/preprocessor/arithmetic/add.hpp>
|
||||
#include <boost/preprocessor/iteration/iterate.hpp>
|
||||
|
||||
#define BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS 10
|
||||
|
||||
//Note:
|
||||
//We define template parameters as const references to
|
||||
//be able to bind temporaries. After that we will un-const them.
|
||||
//This cast is ugly but it is necessary until "perfect forwarding"
|
||||
//is achieved in C++0x. Meanwhile, if we want to be able to
|
||||
//bind rvalues with non-const references, we have to be ugly
|
||||
#ifndef BOOST_NO_RVALUE_REFERENCES
|
||||
#define BOOST_CONTAINER_PP_PARAM_LIST(z, n, data) \
|
||||
BOOST_PP_CAT(P, n) && BOOST_PP_CAT(p, n) \
|
||||
//!
|
||||
#else
|
||||
#define BOOST_CONTAINER_PP_PARAM_LIST(z, n, data) \
|
||||
const BOOST_PP_CAT(P, n) & BOOST_PP_CAT(p, n) \
|
||||
//!
|
||||
#endif //#ifndef BOOST_NO_RVALUE_REFERENCES
|
||||
|
||||
#define BOOST_CONTAINER_PP_CONST_REF_PARAM_LIST_Q(z, n, Data) \
|
||||
const BOOST_PP_CAT(Q, n) & BOOST_PP_CAT(q, n) \
|
||||
//!
|
||||
|
||||
#ifndef BOOST_NO_RVALUE_REFERENCES
|
||||
#define BOOST_CONTAINER_PP_PARAM(U, u) \
|
||||
U && u \
|
||||
//!
|
||||
#else
|
||||
#define BOOST_CONTAINER_PP_PARAM(U, u) \
|
||||
const U & u \
|
||||
//!
|
||||
#endif //#ifndef BOOST_NO_RVALUE_REFERENCES
|
||||
|
||||
#ifndef BOOST_NO_RVALUE_REFERENCES
|
||||
|
||||
#if defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
|
||||
|
||||
#define BOOST_CONTAINER_PP_PARAM_INIT(z, n, data) \
|
||||
BOOST_PP_CAT(m_p, n) (static_cast<BOOST_PP_CAT(P, n)>( BOOST_PP_CAT(p, n) )) \
|
||||
|
||||
#else //#if defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
|
||||
|
||||
#define BOOST_CONTAINER_PP_PARAM_INIT(z, n, data) \
|
||||
BOOST_PP_CAT(m_p, n) (::boost::forward< BOOST_PP_CAT(P, n) >( BOOST_PP_CAT(p, n) )) \
|
||||
//!
|
||||
|
||||
#endif //BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
|
||||
|
||||
#else //BOOST_NO_RVALUE_REFERENCES
|
||||
|
||||
#define BOOST_CONTAINER_PP_PARAM_INIT(z, n, data) \
|
||||
BOOST_PP_CAT(m_p, n) (const_cast<BOOST_PP_CAT(P, n) &>(BOOST_PP_CAT(p, n))) \
|
||||
//!
|
||||
#endif //#ifndef BOOST_NO_RVALUE_REFERENCES
|
||||
|
||||
#ifndef BOOST_NO_RVALUE_REFERENCES
|
||||
|
||||
#if defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
|
||||
|
||||
#define BOOST_CONTAINER_PP_PARAM_DEFINE(z, n, data) \
|
||||
BOOST_PP_CAT(P, n) & BOOST_PP_CAT(m_p, n); \
|
||||
//!
|
||||
|
||||
#else //BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG
|
||||
|
||||
#define BOOST_CONTAINER_PP_PARAM_DEFINE(z, n, data) \
|
||||
BOOST_PP_CAT(P, n) && BOOST_PP_CAT(m_p, n); \
|
||||
//!
|
||||
|
||||
#endif //defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
|
||||
|
||||
#else //BOOST_NO_RVALUE_REFERENCES
|
||||
|
||||
#define BOOST_CONTAINER_PP_PARAM_DEFINE(z, n, data) \
|
||||
BOOST_PP_CAT(P, n) & BOOST_PP_CAT(m_p, n); \
|
||||
//!
|
||||
#endif //#ifndef BOOST_NO_RVALUE_REFERENCES
|
||||
|
||||
#if !defined(BOOST_NO_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
|
||||
|
||||
#define BOOST_CONTAINER_PP_MEMBER_FORWARD(z, n, data) \
|
||||
::boost::container::container_detail::stored_ref< BOOST_PP_CAT(P, n) >::forward( BOOST_PP_CAT(this->m_p, n) ) \
|
||||
//!
|
||||
|
||||
#else //!defined(BOOST_NO_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
|
||||
|
||||
#define BOOST_CONTAINER_PP_MEMBER_FORWARD(z, n, data) \
|
||||
::boost::forward< BOOST_PP_CAT(P, n) >( BOOST_PP_CAT(this->m_p, n) ) \
|
||||
//!
|
||||
|
||||
#endif //!defined(BOOST_NO_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
|
||||
|
||||
#define BOOST_CONTAINER_PP_PARAM_INC(z, n, data) \
|
||||
BOOST_PP_CAT(++this->m_p, n) \
|
||||
//!
|
||||
|
||||
#define BOOST_CONTAINER_PP_IDENTITY(z, n, data) data
|
||||
|
||||
|
||||
#define BOOST_CONTAINER_PP_PARAM_FORWARD(z, n, data) \
|
||||
::boost::forward< BOOST_PP_CAT(P, n) >( BOOST_PP_CAT(p, n) ) \
|
||||
//!
|
||||
|
||||
#define BOOST_CONTAINER_PP_DECLVAL(z, n, data) \
|
||||
::boost::move_detail::declval< BOOST_PP_CAT(P, n) >() \
|
||||
//!
|
||||
|
||||
#define BOOST_CONTAINER_PP_MEMBER_IT_FORWARD(z, n, data) \
|
||||
BOOST_PP_CAT(*this->m_p, n) \
|
||||
//!
|
||||
|
||||
#define BOOST_CONTAINER_PP_TEMPLATE_PARAM_VOID_DEFAULT(z, n, data) \
|
||||
BOOST_PP_CAT(class P, n) = void \
|
||||
//!
|
||||
|
||||
#define BOOST_CONTAINER_PP_TEMPLATE_PARAM_WITH_DEFAULT(z, n, default_type) \
|
||||
BOOST_PP_CAT(class P, n) = default_type \
|
||||
//!
|
||||
|
||||
#define BOOST_CONTAINER_PP_STATIC_PARAM_REF_DECLARE(z, n, data) \
|
||||
static BOOST_PP_CAT(P, n) & BOOST_PP_CAT(p, n); \
|
||||
//!
|
||||
|
||||
#define BOOST_CONTAINER_PP_PARAM_PASS(z, n, data) \
|
||||
BOOST_PP_CAT(p, n) \
|
||||
//!
|
||||
|
||||
#define BOOST_CONTAINER_PP_FWD_TYPE(z, n, data) \
|
||||
typename ::boost::move_detail::forward_type< BOOST_PP_CAT(P, n) >::type \
|
||||
//!
|
||||
|
||||
#include <boost/container/detail/config_end.hpp>
|
||||
|
||||
//#else
|
||||
|
||||
//#ifdef BOOST_CONTAINER_PERFECT_FORWARDING
|
||||
//#error "This file is not needed when perfect forwarding is available"
|
||||
//#endif //BOOST_CONTAINER_PERFECT_FORWARDING
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_DETAIL_PREPROCESSOR_HPP
|
92
cpp/BoostParts/boost/container/detail/stored_ref.hpp
Normal file
92
cpp/BoostParts/boost/container/detail/stored_ref.hpp
Normal file
@ -0,0 +1,92 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2008-2012. 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/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_CONTAINER_DETAIL_STORED_REF_HPP
|
||||
#define BOOST_CONTAINER_DETAIL_STORED_REF_HPP
|
||||
|
||||
#include "config_begin.hpp"
|
||||
#include <boost/container/detail/workaround.hpp>
|
||||
|
||||
#ifndef BOOST_NO_RVALUE_REFERENCES
|
||||
|
||||
namespace boost{
|
||||
namespace container{
|
||||
namespace container_detail{
|
||||
|
||||
template<class T>
|
||||
struct stored_ref
|
||||
{
|
||||
|
||||
static T && forward(T &t)
|
||||
#ifdef BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
|
||||
{ return t; }
|
||||
#else
|
||||
{ return boost::move(t); }
|
||||
#endif
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct stored_ref<const T>
|
||||
{
|
||||
static const T && forward(const T &t)
|
||||
#ifdef BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
|
||||
{ return t; }
|
||||
#else
|
||||
{ return static_cast<const T&&>(t); }
|
||||
#endif
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct stored_ref<T&&>
|
||||
{
|
||||
static T && forward(T &t)
|
||||
#ifdef BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
|
||||
{ return t; }
|
||||
#else
|
||||
{ return boost::move(t); }
|
||||
#endif
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct stored_ref<const T&&>
|
||||
{
|
||||
static const T && forward(const T &t)
|
||||
#ifdef BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
|
||||
{ return t; }
|
||||
#else
|
||||
{ return static_cast<const T &&>(t); }
|
||||
#endif
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct stored_ref<const T&>
|
||||
{
|
||||
static const T & forward(const T &t)
|
||||
{ return t; }
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct stored_ref<T&>
|
||||
{
|
||||
static T & forward(T &t)
|
||||
{ return t; }
|
||||
};
|
||||
|
||||
} //namespace container_detail{
|
||||
} //namespace container{
|
||||
} //namespace boost{
|
||||
|
||||
#else
|
||||
#error "This header can be included only for compiler with rvalue references"
|
||||
#endif //BOOST_NO_RVALUE_REFERENCES
|
||||
|
||||
#include <boost/container/detail/config_end.hpp>
|
||||
|
||||
#endif //BOOST_CONTAINER_DETAIL_STORED_REF_HPP
|
210
cpp/BoostParts/boost/container/detail/type_traits.hpp
Normal file
210
cpp/BoostParts/boost/container/detail/type_traits.hpp
Normal file
@ -0,0 +1,210 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// (C) Copyright John Maddock 2000.
|
||||
// (C) Copyright Ion Gaztanaga 2005-2012.
|
||||
//
|
||||
// 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/container for documentation.
|
||||
//
|
||||
// The alignment_of implementation comes from John Maddock's boost::alignment_of code
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_TYPE_TRAITS_HPP
|
||||
#define BOOST_CONTAINER_CONTAINER_DETAIL_TYPE_TRAITS_HPP
|
||||
|
||||
#if (defined _MSC_VER) && (_MSC_VER >= 1200)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include "config_begin.hpp"
|
||||
|
||||
#include <boost/move/move.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
|
||||
struct nat{};
|
||||
|
||||
template <typename U>
|
||||
struct LowPriorityConversion
|
||||
{
|
||||
// Convertible from T with user-defined-conversion rank.
|
||||
LowPriorityConversion(const U&) { }
|
||||
};
|
||||
|
||||
//boost::alignment_of yields to 10K lines of preprocessed code, so we
|
||||
//need an alternative
|
||||
template <typename T> struct alignment_of;
|
||||
|
||||
template <typename T>
|
||||
struct alignment_of_hack
|
||||
{
|
||||
char c;
|
||||
T t;
|
||||
alignment_of_hack();
|
||||
};
|
||||
|
||||
template <unsigned A, unsigned S>
|
||||
struct alignment_logic
|
||||
{
|
||||
enum{ value = A < S ? A : S };
|
||||
};
|
||||
|
||||
template< typename T >
|
||||
struct alignment_of
|
||||
{
|
||||
enum{ value = alignment_logic
|
||||
< sizeof(alignment_of_hack<T>) - sizeof(T)
|
||||
, sizeof(T)>::value };
|
||||
};
|
||||
|
||||
//This is not standard, but should work with all compilers
|
||||
union max_align
|
||||
{
|
||||
char char_;
|
||||
short short_;
|
||||
int int_;
|
||||
long long_;
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
long long long_long_;
|
||||
#endif
|
||||
float float_;
|
||||
double double_;
|
||||
long double long_double_;
|
||||
void * void_ptr_;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct remove_reference
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct remove_reference<T&>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
#ifndef BOOST_NO_RVALUE_REFERENCES
|
||||
|
||||
template<class T>
|
||||
struct remove_reference<T&&>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
template<class T>
|
||||
struct remove_reference< ::boost::rv<T> >
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
template<class T>
|
||||
struct is_reference
|
||||
{
|
||||
enum { value = false };
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct is_reference<T&>
|
||||
{
|
||||
enum { value = true };
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct is_pointer
|
||||
{
|
||||
enum { value = false };
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct is_pointer<T*>
|
||||
{
|
||||
enum { value = true };
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct add_reference
|
||||
{
|
||||
typedef T& type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct add_reference<T&>
|
||||
{
|
||||
typedef T& type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct add_reference<void>
|
||||
{
|
||||
typedef nat &type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct add_reference<const void>
|
||||
{
|
||||
typedef const nat &type;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct add_const_reference
|
||||
{ typedef const T &type; };
|
||||
|
||||
template <class T>
|
||||
struct add_const_reference<T&>
|
||||
{ typedef T& type; };
|
||||
|
||||
template <typename T, typename U>
|
||||
struct is_same
|
||||
{
|
||||
typedef char yes_type;
|
||||
struct no_type
|
||||
{
|
||||
char padding[8];
|
||||
};
|
||||
|
||||
template <typename V>
|
||||
static yes_type is_same_tester(V*, V*);
|
||||
static no_type is_same_tester(...);
|
||||
|
||||
static T *t;
|
||||
static U *u;
|
||||
|
||||
static const bool value = sizeof(yes_type) == sizeof(is_same_tester(t,u));
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct remove_const
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct remove_const< const T>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct remove_ref_const
|
||||
{
|
||||
typedef typename remove_const< typename remove_reference<T>::type >::type type;
|
||||
};
|
||||
|
||||
} // namespace container_detail
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
#include <boost/container/detail/config_end.hpp>
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_TYPE_TRAITS_HPP
|
282
cpp/BoostParts/boost/container/detail/utilities.hpp
Normal file
282
cpp/BoostParts/boost/container/detail/utilities.hpp
Normal file
@ -0,0 +1,282 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2005-2012. 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/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_CONTAINER_DETAIL_UTILITIES_HPP
|
||||
#define BOOST_CONTAINER_DETAIL_UTILITIES_HPP
|
||||
|
||||
#include "config_begin.hpp"
|
||||
#include <cstdio>
|
||||
#include <boost/type_traits/is_fundamental.hpp>
|
||||
#include <boost/type_traits/is_pointer.hpp>
|
||||
#include <boost/type_traits/is_enum.hpp>
|
||||
#include <boost/type_traits/is_member_pointer.hpp>
|
||||
#include <boost/type_traits/is_class.hpp>
|
||||
#include <boost/move/move.hpp>
|
||||
#include <boost/container/detail/mpl.hpp>
|
||||
#include <boost/container/detail/type_traits.hpp>
|
||||
#include <boost/container/allocator_traits.hpp>
|
||||
#include <algorithm>
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
|
||||
template <typename T>
|
||||
inline T* addressof(T& obj)
|
||||
{
|
||||
return static_cast<T*>(
|
||||
static_cast<void*>(
|
||||
const_cast<char*>(
|
||||
&reinterpret_cast<const char&>(obj)
|
||||
)));
|
||||
}
|
||||
|
||||
template<class T>
|
||||
const T &max_value(const T &a, const T &b)
|
||||
{ return a > b ? a : b; }
|
||||
|
||||
template<class T>
|
||||
const T &min_value(const T &a, const T &b)
|
||||
{ return a < b ? a : b; }
|
||||
|
||||
template <class SizeType>
|
||||
SizeType
|
||||
get_next_capacity(const SizeType max_size
|
||||
,const SizeType capacity
|
||||
,const SizeType n)
|
||||
{
|
||||
// if (n > max_size - capacity)
|
||||
// throw std::length_error("get_next_capacity");
|
||||
|
||||
const SizeType m3 = max_size/3;
|
||||
|
||||
if (capacity < m3)
|
||||
return capacity + max_value(3*(capacity+1)/5, n);
|
||||
|
||||
if (capacity < m3*2)
|
||||
return capacity + max_value((capacity+1)/2, n);
|
||||
|
||||
return max_size;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline T* to_raw_pointer(T* p)
|
||||
{ return p; }
|
||||
|
||||
template <class Pointer>
|
||||
inline typename Pointer::element_type*
|
||||
to_raw_pointer(const Pointer &p)
|
||||
{ return boost::container::container_detail::to_raw_pointer(p.operator->()); }
|
||||
|
||||
//!To avoid ADL problems with swap
|
||||
template <class T>
|
||||
inline void do_swap(T& x, T& y)
|
||||
{
|
||||
using std::swap;
|
||||
swap(x, y);
|
||||
}
|
||||
|
||||
template<class AllocatorType>
|
||||
inline void swap_alloc(AllocatorType &, AllocatorType &, container_detail::false_type)
|
||||
BOOST_CONTAINER_NOEXCEPT
|
||||
{}
|
||||
|
||||
template<class AllocatorType>
|
||||
inline void swap_alloc(AllocatorType &l, AllocatorType &r, container_detail::true_type)
|
||||
{ container_detail::do_swap(l, r); }
|
||||
|
||||
template<class AllocatorType>
|
||||
inline void assign_alloc(AllocatorType &, const AllocatorType &, container_detail::false_type)
|
||||
BOOST_CONTAINER_NOEXCEPT
|
||||
{}
|
||||
|
||||
template<class AllocatorType>
|
||||
inline void assign_alloc(AllocatorType &l, const AllocatorType &r, container_detail::true_type)
|
||||
{ l = r; }
|
||||
|
||||
template<class AllocatorType>
|
||||
inline void move_alloc(AllocatorType &, AllocatorType &, container_detail::false_type)
|
||||
BOOST_CONTAINER_NOEXCEPT
|
||||
{}
|
||||
|
||||
template<class AllocatorType>
|
||||
inline void move_alloc(AllocatorType &l, AllocatorType &r, container_detail::true_type)
|
||||
{ l = ::boost::move(r); }
|
||||
|
||||
//Rounds "orig_size" by excess to round_to bytes
|
||||
template<class SizeType>
|
||||
inline SizeType get_rounded_size(SizeType orig_size, SizeType round_to)
|
||||
{
|
||||
return ((orig_size-1)/round_to+1)*round_to;
|
||||
}
|
||||
|
||||
template <std::size_t OrigSize, std::size_t RoundTo>
|
||||
struct ct_rounded_size
|
||||
{
|
||||
enum { value = ((OrigSize-1)/RoundTo+1)*RoundTo };
|
||||
};
|
||||
/*
|
||||
template <class _TypeT>
|
||||
struct __rw_is_enum
|
||||
{
|
||||
struct _C_no { };
|
||||
struct _C_yes { int _C_dummy [2]; };
|
||||
|
||||
struct _C_indirect {
|
||||
// prevent classes with user-defined conversions from matching
|
||||
|
||||
// use double to prevent float->int gcc conversion warnings
|
||||
_C_indirect (double);
|
||||
};
|
||||
|
||||
// nested struct gets rid of bogus gcc errors
|
||||
struct _C_nest {
|
||||
// supply first argument to prevent HP aCC warnings
|
||||
static _C_no _C_is (int, ...);
|
||||
static _C_yes _C_is (int, _C_indirect);
|
||||
|
||||
static _TypeT _C_make_T ();
|
||||
};
|
||||
|
||||
enum {
|
||||
_C_val = sizeof (_C_yes) == sizeof (_C_nest::_C_is (0, _C_nest::_C_make_T ()))
|
||||
&& !::boost::is_fundamental<_TypeT>::value
|
||||
};
|
||||
|
||||
};
|
||||
*/
|
||||
|
||||
template<class T>
|
||||
struct move_const_ref_type
|
||||
: if_c
|
||||
// < ::boost::is_fundamental<T>::value || ::boost::is_pointer<T>::value || ::boost::is_member_pointer<T>::value || ::boost::is_enum<T>::value
|
||||
< !::boost::is_class<T>::value
|
||||
,const T &
|
||||
,BOOST_CATCH_CONST_RLVALUE(T)
|
||||
>
|
||||
{};
|
||||
|
||||
} //namespace container_detail {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// uninitialized_move_alloc
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//! <b>Effects</b>:
|
||||
//! \code
|
||||
//! for (; first != last; ++result, ++first)
|
||||
//! allocator_traits::construct(a, &*result, boost::move(*first));
|
||||
//! \endcode
|
||||
//!
|
||||
//! <b>Returns</b>: result
|
||||
template
|
||||
<typename A,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
F uninitialized_move_alloc(A &a, I f, I l, F r)
|
||||
{
|
||||
while (f != l) {
|
||||
allocator_traits<A>::construct(a, container_detail::to_raw_pointer(&*r), boost::move(*f));
|
||||
++f; ++r;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// uninitialized_copy_alloc
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//! <b>Effects</b>:
|
||||
//! \code
|
||||
//! for (; first != last; ++result, ++first)
|
||||
//! allocator_traits::construct(a, &*result, *first);
|
||||
//! \endcode
|
||||
//!
|
||||
//! <b>Returns</b>: result
|
||||
template
|
||||
<typename A,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
F uninitialized_copy_alloc(A &a, I f, I l, F r)
|
||||
{
|
||||
while (f != l) {
|
||||
allocator_traits<A>::construct(a, container_detail::to_raw_pointer(&*r), *f);
|
||||
++f; ++r;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// uninitialized_copy_alloc
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//! <b>Effects</b>:
|
||||
//! \code
|
||||
//! for (; first != last; ++result, ++first)
|
||||
//! allocator_traits::construct(a, &*result, *first);
|
||||
//! \endcode
|
||||
//!
|
||||
//! <b>Returns</b>: result
|
||||
template
|
||||
<typename A,
|
||||
typename F, // F models ForwardIterator
|
||||
typename T>
|
||||
void uninitialized_fill_alloc(A &a, F f, F l, const T &t)
|
||||
{
|
||||
while (f != l) {
|
||||
allocator_traits<A>::construct(a, container_detail::to_raw_pointer(&*f), t);
|
||||
++f;
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// uninitialized_copy_or_move_alloc
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template
|
||||
<typename A
|
||||
,typename I // I models InputIterator
|
||||
,typename F> // F models ForwardIterator
|
||||
F uninitialized_copy_or_move_alloc
|
||||
(A &a, I f, I l, F r
|
||||
,typename boost::container::container_detail::enable_if
|
||||
< boost::move_detail::is_move_iterator<I> >::type* = 0)
|
||||
{
|
||||
return ::boost::container::uninitialized_move_alloc(a, f, l, r);
|
||||
}
|
||||
|
||||
template
|
||||
<typename A
|
||||
,typename I // I models InputIterator
|
||||
,typename F> // F models ForwardIterator
|
||||
F uninitialized_copy_or_move_alloc
|
||||
(A &a, I f, I l, F r
|
||||
,typename boost::container::container_detail::disable_if
|
||||
< boost::move_detail::is_move_iterator<I> >::type* = 0)
|
||||
{
|
||||
return ::boost::container::uninitialized_copy_alloc(a, f, l, r);
|
||||
}
|
||||
|
||||
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
||||
#include <boost/container/detail/config_end.hpp>
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_DETAIL_UTILITIES_HPP
|
36
cpp/BoostParts/boost/container/detail/workaround.hpp
Normal file
36
cpp/BoostParts/boost/container/detail/workaround.hpp
Normal file
@ -0,0 +1,36 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2005-2012. 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/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP
|
||||
#define BOOST_CONTAINER_DETAIL_WORKAROUND_HPP
|
||||
|
||||
#include <boost/container/detail/config_begin.hpp>
|
||||
|
||||
#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)\
|
||||
&& !defined(BOOST_INTERPROCESS_DISABLE_VARIADIC_TMPL)
|
||||
#define BOOST_CONTAINER_PERFECT_FORWARDING
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_NO_NOEXCEPT)
|
||||
#define BOOST_CONTAINER_NOEXCEPT
|
||||
#define BOOST_CONTAINER_NOEXCEPT_IF(x)
|
||||
#else
|
||||
#define BOOST_CONTAINER_NOEXCEPT noexcept
|
||||
#define BOOST_CONTAINER_NOEXCEPT_IF(x) noexcept(x)
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_VARIADIC_TEMPLATES) && defined(__GXX_EXPERIMENTAL_CXX0X__)\
|
||||
&& (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40700)
|
||||
#define BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST
|
||||
#endif
|
||||
|
||||
#include <boost/container/detail/config_end.hpp>
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP
|
1506
cpp/BoostParts/boost/container/scoped_allocator.hpp
Normal file
1506
cpp/BoostParts/boost/container/scoped_allocator.hpp
Normal file
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,7 @@
|
||||
* Boost Software License, Version 1.0. (See accompanying
|
||||
* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
||||
* Author: Jeff Garland, Bart Garst
|
||||
* $Date: 2012-01-30 21:30:03 -0500 (Mon, 30 Jan 2012) $
|
||||
* $Date: 2012-05-26 15:33:09 -0400 (Sat, 26 May 2012) $
|
||||
*/
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
* Boost Software License, Version 1.0. (See accompanying
|
||||
* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
||||
* Author: Jeff Garland, Bart Garst
|
||||
* $Date: 2012-01-30 21:30:03 -0500 (Mon, 30 Jan 2012) $
|
||||
* $Date: 2012-05-26 15:33:09 -0400 (Sat, 26 May 2012) $
|
||||
*/
|
||||
|
||||
#include "boost/date_time/iso_format.hpp"
|
||||
|
@ -6,7 +6,7 @@
|
||||
* Boost Software License, Version 1.0. (See accompanying
|
||||
* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
||||
* Author: Jeff Garland, Bart Garst
|
||||
* $Date: 2012-01-30 21:30:03 -0500 (Mon, 30 Jan 2012) $
|
||||
* $Date: 2012-05-26 15:33:09 -0400 (Sat, 26 May 2012) $
|
||||
*/
|
||||
|
||||
/*! @file filetime_functions.hpp
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Boost Software License, Version 1.0. (See accompanying
|
||||
* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
||||
* Author: Jeff Garland, Bart Garst
|
||||
* $Date: 2012-01-30 21:30:03 -0500 (Mon, 30 Jan 2012) $
|
||||
* $Date: 2012-05-26 15:33:09 -0400 (Sat, 26 May 2012) $
|
||||
*/
|
||||
|
||||
#ifndef NO_BOOST_DATE_TIME_INLINE
|
||||
|
@ -21,10 +21,17 @@
|
||||
// Define BOOST_DETAIL_NO_CONTAINER_FWD if you don't want this header to //
|
||||
// forward declare standard containers. //
|
||||
// //
|
||||
// BOOST_DETAIL_CONTAINER_FWD to make it foward declare containers even if it //
|
||||
// normally doesn't. //
|
||||
// //
|
||||
// BOOST_DETAIL_NO_CONTAINER_FWD overrides BOOST_DETAIL_CONTAINER_FWD. //
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(BOOST_DETAIL_NO_CONTAINER_FWD)
|
||||
# if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
|
||||
# if defined(BOOST_DETAIL_CONTAINER_FWD)
|
||||
// Force forward declarations.
|
||||
# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
|
||||
// STLport
|
||||
# define BOOST_DETAIL_NO_CONTAINER_FWD
|
||||
# elif defined(__LIBCOMO__)
|
||||
@ -76,11 +83,6 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// BOOST_DETAIL_TEST_* macros are for testing only
|
||||
// and shouldn't be relied upon. But you can use
|
||||
// BOOST_DETAIL_NO_CONTAINER_FWD to prevent forward
|
||||
// declaration of containers.
|
||||
|
||||
#if !defined(BOOST_DETAIL_TEST_CONFIG_ONLY)
|
||||
|
||||
#if defined(BOOST_DETAIL_NO_CONTAINER_FWD) && \
|
||||
@ -118,6 +120,7 @@ namespace std
|
||||
template <class charT, class traits, class Allocator> class basic_string;
|
||||
|
||||
#if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
|
||||
|
||||
template <class charT> struct string_char_traits;
|
||||
#else
|
||||
template <class charT> struct char_traits;
|
||||
|
337
cpp/BoostParts/boost/detail/scoped_enum_emulation.hpp
Normal file
337
cpp/BoostParts/boost/detail/scoped_enum_emulation.hpp
Normal file
@ -0,0 +1,337 @@
|
||||
// scoped_enum_emulation.hpp ---------------------------------------------------------//
|
||||
|
||||
// Copyright Beman Dawes, 2009
|
||||
// Copyright (C) 2011-2012 Vicente J. Botet Escriba
|
||||
// Copyright (C) 2012 Anthony Williams
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
/*
|
||||
[section:scoped_enums Scoped Enums]
|
||||
|
||||
Generates C++0x scoped enums if the feature is present, otherwise emulates C++0x
|
||||
scoped enums with C++03 namespaces and enums. The Boost.Config BOOST_NO_SCOPED_ENUMS
|
||||
macro is used to detect feature support.
|
||||
|
||||
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf for a
|
||||
description of the scoped enum feature. Note that the committee changed the name
|
||||
from strongly typed enum to scoped enum.
|
||||
|
||||
Some of the enumerations defined in the standard library are scoped enums.
|
||||
|
||||
enum class future_errc
|
||||
{
|
||||
broken_promise,
|
||||
future_already_retrieved,
|
||||
promise_already_satisfied,
|
||||
no_state
|
||||
};
|
||||
|
||||
On compilers that don't support them, the library provides two emulations:
|
||||
|
||||
[heading Strict]
|
||||
|
||||
* Able to specify the underlying type.
|
||||
* explicit conversion to/from underlying type.
|
||||
* The wrapper is not a C++03 enum type.
|
||||
|
||||
The user can declare declare these types as
|
||||
|
||||
BOOST_SCOPED_ENUM_DECLARE_BEGIN(future_errc)
|
||||
{
|
||||
broken_promise,
|
||||
future_already_retrieved,
|
||||
promise_already_satisfied,
|
||||
no_state
|
||||
}
|
||||
BOOST_SCOPED_ENUM_DECLARE_END(future_errc)
|
||||
|
||||
These macros allows to use 'future_errc' in almost all the cases as an scoped enum.
|
||||
|
||||
future_errc err = future_errc::no_state;
|
||||
|
||||
There are however some limitations:
|
||||
|
||||
* The type is not a C++ enum, so 'is_enum<future_errc>' will be false_type.
|
||||
* The emulated scoped enum can not be used in switch nor in template arguments. For these cases the user needs to use some macros.
|
||||
|
||||
Instead of
|
||||
|
||||
switch (ev)
|
||||
{
|
||||
case future_errc::broken_promise:
|
||||
// ...
|
||||
|
||||
use
|
||||
|
||||
switch (boost::native_value(ev))
|
||||
{
|
||||
case future_errc::broken_promise:
|
||||
|
||||
And instead of
|
||||
|
||||
#ifdef BOOST_NO_SCOPED_ENUMS
|
||||
template <>
|
||||
struct BOOST_SYMBOL_VISIBLE is_error_code_enum<future_errc> : public true_type { };
|
||||
#endif
|
||||
|
||||
use
|
||||
|
||||
#ifdef BOOST_NO_SCOPED_ENUMS
|
||||
template <>
|
||||
struct BOOST_SYMBOL_VISIBLE is_error_code_enum<future_errc::enum_type > : public true_type { };
|
||||
#endif
|
||||
|
||||
|
||||
Sample usage:
|
||||
|
||||
BOOST_SCOPED_ENUM_UT_DECLARE_BEGIN(algae, char) { green, red, cyan }; BOOST_SCOPED_ENUM_DECLARE_END(algae)
|
||||
...
|
||||
algae sample( algae::red );
|
||||
void foo( algae color );
|
||||
...
|
||||
sample = algae::green;
|
||||
foo( algae::cyan );
|
||||
|
||||
Light
|
||||
Caution: only the syntax is emulated; the semantics are not emulated and
|
||||
the syntax emulation doesn't include being able to specify the underlying
|
||||
representation type.
|
||||
|
||||
The literal scoped emulation is via struct rather than namespace to allow use within classes.
|
||||
Thanks to Andrey Semashev for pointing that out.
|
||||
However the type is an real C++03 enum and so convertible implicitly to an int.
|
||||
|
||||
Sample usage:
|
||||
|
||||
BOOST_SCOPED_ENUM_START(algae) { green, red, cyan }; BOOST_SCOPED_ENUM_END
|
||||
...
|
||||
BOOST_SCOPED_ENUM(algae) sample( algae::red );
|
||||
void foo( BOOST_SCOPED_ENUM(algae) color );
|
||||
...
|
||||
sample = algae::green;
|
||||
foo( algae::cyan );
|
||||
|
||||
Helpful comments and suggestions were also made by Kjell Elster, Phil Endecott,
|
||||
Joel Falcou, Mathias Gaunard, Felipe Magno de Almeida, Matt Calabrese, Vicente
|
||||
Botet, and Daniel James.
|
||||
|
||||
[endsect]
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BOOST_SCOPED_ENUM_EMULATION_HPP
|
||||
#define BOOST_SCOPED_ENUM_EMULATION_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
#ifdef BOOST_NO_SCOPED_ENUMS
|
||||
/**
|
||||
* Meta-function to get the underlying type of a scoped enum.
|
||||
*
|
||||
* Requires EnumType must be an enum type or the emulation of a scoped enum
|
||||
*/
|
||||
template <typename EnumType>
|
||||
struct underlying_type
|
||||
{
|
||||
/**
|
||||
* The member typedef type names the underlying type of EnumType. It is EnumType::underlying_type when the EnumType is an emulated scoped enum,
|
||||
* std::underlying_type<EnumType>::type when the standard library std::underlying_type is provided.
|
||||
*
|
||||
* The user will need to specialize it when the compiler supports scoped enums but don't provides std::underlying_type.
|
||||
*/
|
||||
typedef typename EnumType::underlying_type type;
|
||||
};
|
||||
|
||||
/**
|
||||
* Meta-function to get the native enum type associated to an enum class or its emulation.
|
||||
*/
|
||||
template <typename EnumType>
|
||||
struct native_type
|
||||
{
|
||||
/**
|
||||
* The member typedef type names the native enum type associated to the scoped enum,
|
||||
* which is it self if the compiler supports scoped enums or EnumType::enum_type if it is an emulated scoped enum.
|
||||
*/
|
||||
typedef typename EnumType::enum_type type;
|
||||
};
|
||||
|
||||
/**
|
||||
* Casts a scoped enum to its underlying type.
|
||||
*
|
||||
* This function is useful when working with scoped enum classes, which doens't implicitly convert to the underlying type.
|
||||
* @param v A scoped enum.
|
||||
* @returns The underlying type.
|
||||
* @throws No-throws.
|
||||
*/
|
||||
template <typename UnderlyingType, typename EnumType>
|
||||
UnderlyingType underlying_cast(EnumType v)
|
||||
{
|
||||
return v.get_underlying_value_();
|
||||
}
|
||||
|
||||
/**
|
||||
* Casts a scoped enum to its native enum type.
|
||||
*
|
||||
* This function is useful to make programs portable when the scoped enum emulation can not be use where native enums can.
|
||||
*
|
||||
* EnumType the scoped enum type
|
||||
*
|
||||
* @param v A scoped enum.
|
||||
* @returns The native enum value.
|
||||
* @throws No-throws.
|
||||
*/
|
||||
template <typename EnumType>
|
||||
inline
|
||||
typename EnumType::enum_type native_value(EnumType e)
|
||||
{
|
||||
return e.native_value_();
|
||||
}
|
||||
|
||||
#else // BOOST_NO_SCOPED_ENUMS
|
||||
|
||||
template <typename EnumType>
|
||||
struct underlying_type
|
||||
{
|
||||
//typedef typename std::underlying_type<EnumType>::type type;
|
||||
};
|
||||
|
||||
template <typename EnumType>
|
||||
struct native_type
|
||||
{
|
||||
typedef EnumType type;
|
||||
};
|
||||
|
||||
template <typename UnderlyingType, typename EnumType>
|
||||
UnderlyingType underlying_cast(EnumType v)
|
||||
{
|
||||
return static_cast<UnderlyingType>(v);
|
||||
}
|
||||
|
||||
template <typename EnumType>
|
||||
inline
|
||||
EnumType native_value(EnumType e)
|
||||
{
|
||||
return e;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef BOOST_NO_SCOPED_ENUMS
|
||||
|
||||
#ifndef BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
|
||||
|
||||
#define BOOST_SCOPED_ENUM_UT_DECLARE_CONVERSION_OPERATOR \
|
||||
explicit operator underlying_type() const { return get_underlying_value_(); }
|
||||
|
||||
#else
|
||||
|
||||
#define BOOST_SCOPED_ENUM_UT_DECLARE_CONVERSION_OPERATOR
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Start a declaration of a scoped enum.
|
||||
*
|
||||
* @param EnumType The new scoped enum.
|
||||
* @param UnderlyingType The underlying type.
|
||||
*/
|
||||
#define BOOST_SCOPED_ENUM_UT_DECLARE_BEGIN(EnumType, UnderlyingType) \
|
||||
struct EnumType { \
|
||||
typedef UnderlyingType underlying_type; \
|
||||
EnumType() BOOST_NOEXCEPT {} \
|
||||
explicit EnumType(underlying_type v) : v_(v) {} \
|
||||
underlying_type get_underlying_value_() const { return v_; } \
|
||||
BOOST_SCOPED_ENUM_UT_DECLARE_CONVERSION_OPERATOR \
|
||||
private: \
|
||||
underlying_type v_; \
|
||||
typedef EnumType self_type; \
|
||||
public: \
|
||||
enum enum_type
|
||||
|
||||
#define BOOST_SCOPED_ENUM_DECLARE_END2() \
|
||||
enum_type get_native_value_() const BOOST_NOEXCEPT { return enum_type(v_); } \
|
||||
operator enum_type() const BOOST_NOEXCEPT { return get_native_value_(); } \
|
||||
friend bool operator ==(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)==enum_type(rhs.v_); } \
|
||||
friend bool operator ==(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)==rhs; } \
|
||||
friend bool operator ==(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs==enum_type(rhs.v_); } \
|
||||
friend bool operator !=(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)!=enum_type(rhs.v_); } \
|
||||
friend bool operator !=(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)!=rhs; } \
|
||||
friend bool operator !=(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs!=enum_type(rhs.v_); } \
|
||||
friend bool operator <(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)<enum_type(rhs.v_); } \
|
||||
friend bool operator <(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)<rhs; } \
|
||||
friend bool operator <(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs<enum_type(rhs.v_); } \
|
||||
friend bool operator <=(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)<=enum_type(rhs.v_); } \
|
||||
friend bool operator <=(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)<=rhs; } \
|
||||
friend bool operator <=(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs<=enum_type(rhs.v_); } \
|
||||
friend bool operator >(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)>enum_type(rhs.v_); } \
|
||||
friend bool operator >(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)>rhs; } \
|
||||
friend bool operator >(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs>enum_type(rhs.v_); } \
|
||||
friend bool operator >=(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)>=enum_type(rhs.v_); } \
|
||||
friend bool operator >=(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)>=rhs; } \
|
||||
friend bool operator >=(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs>=enum_type(rhs.v_); } \
|
||||
};
|
||||
|
||||
#define BOOST_SCOPED_ENUM_DECLARE_END(EnumType) \
|
||||
; \
|
||||
EnumType(enum_type v) BOOST_NOEXCEPT : v_(v) {} \
|
||||
BOOST_SCOPED_ENUM_DECLARE_END2()
|
||||
|
||||
/**
|
||||
* Starts a declaration of a scoped enum with the default int underlying type.
|
||||
*
|
||||
* @param EnumType The new scoped enum.
|
||||
*/
|
||||
#define BOOST_SCOPED_ENUM_DECLARE_BEGIN(EnumType) \
|
||||
BOOST_SCOPED_ENUM_UT_DECLARE_BEGIN(EnumType,int)
|
||||
|
||||
/**
|
||||
* Name of the native enum type.
|
||||
*
|
||||
* @param NT The new scoped enum.
|
||||
*/
|
||||
#define BOOST_SCOPED_ENUM_NATIVE(EnumType) EnumType::enum_type
|
||||
/**
|
||||
* Forward declares an scoped enum.
|
||||
*
|
||||
* @param NT The scoped enum.
|
||||
*/
|
||||
#define BOOST_SCOPED_ENUM_FORWARD_DECLARE(EnumType) struct EnumType
|
||||
|
||||
#else // BOOST_NO_SCOPED_ENUMS
|
||||
|
||||
#define BOOST_SCOPED_ENUM_UT_DECLARE_BEGIN(EnumType,UnderlyingType) enum class EnumType:UnderlyingType
|
||||
#define BOOST_SCOPED_ENUM_DECLARE_BEGIN(EnumType) enum class EnumType
|
||||
#define BOOST_SCOPED_ENUM_DECLARE_END2()
|
||||
#define BOOST_SCOPED_ENUM_DECLARE_END(EnumType) ;
|
||||
|
||||
#define BOOST_SCOPED_ENUM_NATIVE(EnumType) EnumType
|
||||
#define BOOST_SCOPED_ENUM_FORWARD_DECLARE(EnumType) enum class EnumType
|
||||
|
||||
#endif // BOOST_NO_SCOPED_ENUMS
|
||||
|
||||
#define BOOST_SCOPED_ENUM_START(name) BOOST_SCOPED_ENUM_DECLARE_BEGIN(name)
|
||||
#define BOOST_SCOPED_ENUM_END BOOST_SCOPED_ENUM_DECLARE_END2()
|
||||
#define BOOST_SCOPED_ENUM(name) BOOST_SCOPED_ENUM_NATIVE(name)
|
||||
|
||||
//#ifdef BOOST_NO_SCOPED_ENUMS
|
||||
//
|
||||
//# define BOOST_SCOPED_ENUM_START(name) struct name { enum enum_type
|
||||
//# define BOOST_SCOPED_ENUM_END };
|
||||
//# define BOOST_SCOPED_ENUM(name) name::enum_type
|
||||
//
|
||||
//#else
|
||||
//
|
||||
//# define BOOST_SCOPED_ENUM_START(name) enum class name
|
||||
//# define BOOST_SCOPED_ENUM_END
|
||||
//# define BOOST_SCOPED_ENUM(name) name
|
||||
//
|
||||
//#endif
|
||||
#endif // BOOST_SCOPED_ENUM_EMULATION_HPP
|
@ -1,5 +1,5 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// utf8_codecvt_facet.cpp
|
||||
// utf8_codecvt_facet.ipp
|
||||
|
||||
// Copyright (c) 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu)
|
||||
// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu).
|
27
cpp/BoostParts/boost/detail/win/GetLastError.hpp
Normal file
27
cpp/BoostParts/boost/detail/win/GetLastError.hpp
Normal file
@ -0,0 +1,27 @@
|
||||
// GetLastError.hpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright 2010 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
|
||||
#ifndef BOOST_DETAIL_WIN_GETLASTERROR_HPP
|
||||
#define BOOST_DETAIL_WIN_GETLASTERROR_HPP
|
||||
|
||||
#include <boost/detail/win/basic_types.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace detail {
|
||||
namespace win32 {
|
||||
#if defined( BOOST_USE_WINDOWS_H )
|
||||
using ::GetLastError;
|
||||
#else
|
||||
extern "C" __declspec(dllimport) DWORD_ WINAPI
|
||||
GetLastError();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BOOST_DETAIL_WIN_TIME_HPP
|
111
cpp/BoostParts/boost/detail/win/basic_types.hpp
Normal file
111
cpp/BoostParts/boost/detail/win/basic_types.hpp
Normal file
@ -0,0 +1,111 @@
|
||||
// basic_types.hpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright 2010 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
|
||||
#ifndef BOOST_DETAIL_WIN_BASIC_TYPES_HPP
|
||||
#define BOOST_DETAIL_WIN_BASIC_TYPES_HPP
|
||||
#include <boost/config.hpp>
|
||||
#include <cstdarg>
|
||||
#include <boost/cstdint.hpp>
|
||||
#if defined( BOOST_USE_WINDOWS_H )
|
||||
# include <windows.h>
|
||||
#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined(__CYGWIN__)
|
||||
# include <WinError.h>
|
||||
// @FIXME Which condition must be tested
|
||||
# ifdef UNDER_CE
|
||||
# ifndef WINAPI
|
||||
# ifndef _WIN32_WCE_EMULATION
|
||||
# define WINAPI __cdecl // Note this doesn't match the desktop definition
|
||||
# else
|
||||
# define WINAPI __stdcall
|
||||
# endif
|
||||
# endif
|
||||
# else
|
||||
# ifndef WINAPI
|
||||
# define WINAPI __stdcall
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
# error "Win32 functions not available"
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace detail {
|
||||
namespace win32 {
|
||||
#if defined( BOOST_USE_WINDOWS_H )
|
||||
typedef ::BOOL BOOL_;
|
||||
typedef ::WORD WORD_;
|
||||
typedef ::DWORD DWORD_;
|
||||
typedef ::HANDLE HANDLE_;
|
||||
typedef ::LONG LONG_;
|
||||
typedef ::LONGLONG LONGLONG_;
|
||||
typedef ::ULONG_PTR ULONG_PTR_;
|
||||
typedef ::LARGE_INTEGER LARGE_INTEGER_;
|
||||
typedef ::PLARGE_INTEGER PLARGE_INTEGER_;
|
||||
typedef ::PVOID PVOID_;
|
||||
typedef ::LPVOID LPVOID_;
|
||||
typedef ::CHAR CHAR_;
|
||||
typedef ::LPSTR LPSTR_;
|
||||
typedef ::LPCSTR LPCSTR_;
|
||||
typedef ::WCHAR WCHAR_;
|
||||
typedef ::LPWSTR LPWSTR_;
|
||||
typedef ::LPCWSTR LPCWSTR_;
|
||||
#else
|
||||
extern "C" {
|
||||
typedef int BOOL_;
|
||||
typedef unsigned short WORD_;
|
||||
typedef unsigned long DWORD_;
|
||||
typedef void* HANDLE_;
|
||||
|
||||
typedef long LONG_;
|
||||
|
||||
// @FIXME Which condition must be tested
|
||||
//~ #if !defined(_M_IX86)
|
||||
//~ #if defined(BOOST_NO_INT64_T)
|
||||
//~ typedef double LONGLONG_;
|
||||
//~ #else
|
||||
//~ typedef __int64 LONGLONG_;
|
||||
//~ #endif
|
||||
//~ #else
|
||||
//~ typedef double LONGLONG_;
|
||||
//~ #endif
|
||||
typedef boost::int64_t LONGLONG_;
|
||||
|
||||
// @FIXME Which condition must be tested
|
||||
# ifdef _WIN64
|
||||
#if defined(__CYGWIN__)
|
||||
typedef unsigned long ULONG_PTR_;
|
||||
#else
|
||||
typedef unsigned __int64 ULONG_PTR_;
|
||||
#endif
|
||||
# else
|
||||
typedef unsigned long ULONG_PTR_;
|
||||
# endif
|
||||
|
||||
typedef struct _LARGE_INTEGER {
|
||||
LONGLONG_ QuadPart;
|
||||
} LARGE_INTEGER_;
|
||||
typedef LARGE_INTEGER_ *PLARGE_INTEGER_;
|
||||
|
||||
typedef void *PVOID_;
|
||||
typedef void *LPVOID_;
|
||||
typedef const void *LPCVOID_;
|
||||
|
||||
typedef char CHAR_;
|
||||
typedef CHAR_ *LPSTR_;
|
||||
typedef const CHAR_ *LPCSTR_;
|
||||
|
||||
typedef wchar_t WCHAR_;
|
||||
typedef WCHAR_ *LPWSTR_;
|
||||
typedef const WCHAR_ *LPCWSTR_;
|
||||
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // BOOST_DETAIL_WIN_TIME_HPP
|
72
cpp/BoostParts/boost/detail/win/time.hpp
Normal file
72
cpp/BoostParts/boost/detail/win/time.hpp
Normal file
@ -0,0 +1,72 @@
|
||||
// time.hpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright 2010 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
|
||||
#ifndef BOOST_DETAIL_WIN_TIME_HPP
|
||||
#define BOOST_DETAIL_WIN_TIME_HPP
|
||||
|
||||
#include <boost/detail/win/basic_types.hpp>
|
||||
|
||||
|
||||
namespace boost {
|
||||
namespace detail {
|
||||
namespace win32 {
|
||||
#if defined( BOOST_USE_WINDOWS_H )
|
||||
typedef FILETIME FILETIME_;
|
||||
typedef PFILETIME PFILETIME_;
|
||||
typedef LPFILETIME LPFILETIME_;
|
||||
|
||||
typedef SYSTEMTIME SYSTEMTIME_;
|
||||
typedef SYSTEMTIME* PSYSTEMTIME_;
|
||||
|
||||
#ifndef UNDER_CE // Windows CE does not define GetSystemTimeAsFileTime
|
||||
using ::GetSystemTimeAsFileTime;
|
||||
#endif
|
||||
using ::FileTimeToLocalFileTime;
|
||||
using ::GetSystemTime;
|
||||
using ::SystemTimeToFileTime;
|
||||
using ::GetTickCount;
|
||||
|
||||
#else
|
||||
extern "C" {
|
||||
typedef struct _FILETIME {
|
||||
DWORD_ dwLowDateTime;
|
||||
DWORD_ dwHighDateTime;
|
||||
} FILETIME_, *PFILETIME_, *LPFILETIME_;
|
||||
|
||||
typedef struct _SYSTEMTIME {
|
||||
WORD_ wYear;
|
||||
WORD_ wMonth;
|
||||
WORD_ wDayOfWeek;
|
||||
WORD_ wDay;
|
||||
WORD_ wHour;
|
||||
WORD_ wMinute;
|
||||
WORD_ wSecond;
|
||||
WORD_ wMilliseconds;
|
||||
} SYSTEMTIME_, *PSYSTEMTIME_;
|
||||
|
||||
#ifndef UNDER_CE // Windows CE does not define GetSystemTimeAsFileTime
|
||||
__declspec(dllimport) void WINAPI
|
||||
GetSystemTimeAsFileTime(FILETIME_* lpFileTime);
|
||||
#endif
|
||||
__declspec(dllimport) int WINAPI
|
||||
FileTimeToLocalFileTime(const FILETIME_* lpFileTime,
|
||||
FILETIME_* lpLocalFileTime);
|
||||
__declspec(dllimport) void WINAPI
|
||||
GetSystemTime(SYSTEMTIME_* lpSystemTime);
|
||||
__declspec(dllimport) int WINAPI
|
||||
SystemTimeToFileTime(const SYSTEMTIME_* lpSystemTime,
|
||||
FILETIME_* lpFileTime);
|
||||
__declspec(dllimport) unsigned long __stdcall
|
||||
GetTickCount();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BOOST_DETAIL_WIN_TIME_HPP
|
41
cpp/BoostParts/boost/detail/win/timers.hpp
Normal file
41
cpp/BoostParts/boost/detail/win/timers.hpp
Normal file
@ -0,0 +1,41 @@
|
||||
// timers.hpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright 2010 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
|
||||
#ifndef BOOST_DETAIL_WIN_TIMERS_HPP
|
||||
#define BOOST_DETAIL_WIN_TIMERS_HPP
|
||||
|
||||
#include <boost/detail/win/basic_types.hpp>
|
||||
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
namespace win32
|
||||
{
|
||||
#if defined( BOOST_USE_WINDOWS_H )
|
||||
using ::QueryPerformanceCounter;
|
||||
using ::QueryPerformanceFrequency;
|
||||
#else
|
||||
extern "C" {
|
||||
__declspec(dllimport) BOOL_ WINAPI
|
||||
QueryPerformanceCounter(
|
||||
LARGE_INTEGER_ *lpPerformanceCount
|
||||
);
|
||||
|
||||
__declspec(dllimport) BOOL_ WINAPI
|
||||
QueryPerformanceFrequency(
|
||||
LARGE_INTEGER_ *lpFrequency
|
||||
);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BOOST_DETAIL_WIN_TIMERS_HPP
|
@ -9,7 +9,7 @@
|
||||
#if defined(_MSC_VER)
|
||||
#define BOOST_ATTRIBUTE_NORETURN __declspec(noreturn)
|
||||
#elif defined(__GNUC__)
|
||||
#define BOOST_ATTRIBUTE_NORETURN __attribute__((noreturn))
|
||||
#define BOOST_ATTRIBUTE_NORETURN __attribute__((__noreturn__))
|
||||
#else
|
||||
#define BOOST_ATTRIBUTE_NORETURN
|
||||
#endif
|
||||
|
@ -30,6 +30,7 @@ boost
|
||||
|
||||
protected:
|
||||
|
||||
virtual
|
||||
~error_info_base() throw()
|
||||
{
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <stdexcept>
|
||||
#include <new>
|
||||
#include <ios>
|
||||
#include <cstdlib>
|
||||
#include <stdlib.h>
|
||||
|
||||
namespace
|
||||
boost
|
||||
@ -457,7 +457,12 @@ boost
|
||||
BOOST_ASSERT(p);
|
||||
p.ptr_->rethrow();
|
||||
BOOST_ASSERT(0);
|
||||
std::abort();
|
||||
#if defined(UNDER_CE)
|
||||
// some CE platforms don't define ::abort()
|
||||
exit(-1);
|
||||
#else
|
||||
abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
inline
|
||||
|
@ -3,4 +3,7 @@
|
||||
//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)
|
||||
|
||||
#ifndef UUID_EE7ECCA0433B11E1923E37064924019B
|
||||
#define UUID_EE7ECCA0433B11E1923E37064924019B
|
||||
namespace boost { template <class Tag,class T> class error_info; }
|
||||
#endif
|
||||
|
@ -310,6 +310,11 @@ boost
|
||||
namespace
|
||||
exception_detail
|
||||
{
|
||||
#if defined(__GNUC__)
|
||||
# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
|
||||
# pragma GCC visibility push (default)
|
||||
# endif
|
||||
#endif
|
||||
template <class T>
|
||||
struct
|
||||
error_info_injector:
|
||||
@ -326,6 +331,11 @@ boost
|
||||
{
|
||||
}
|
||||
};
|
||||
#if defined(__GNUC__)
|
||||
# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
|
||||
# pragma GCC visibility pop
|
||||
# endif
|
||||
#endif
|
||||
|
||||
struct large_size { char c[256]; };
|
||||
large_size dispatch_boost_exception( exception const * );
|
||||
@ -373,6 +383,11 @@ boost
|
||||
namespace
|
||||
exception_detail
|
||||
{
|
||||
#if defined(__GNUC__)
|
||||
# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
|
||||
# pragma GCC visibility push (default)
|
||||
# endif
|
||||
#endif
|
||||
class
|
||||
clone_base
|
||||
{
|
||||
@ -386,6 +401,11 @@ boost
|
||||
{
|
||||
}
|
||||
};
|
||||
#if defined(__GNUC__)
|
||||
# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
|
||||
# pragma GCC visibility pop
|
||||
# endif
|
||||
#endif
|
||||
|
||||
inline
|
||||
void
|
||||
@ -410,8 +430,15 @@ boost
|
||||
class
|
||||
clone_impl:
|
||||
public T,
|
||||
public clone_base
|
||||
public virtual clone_base
|
||||
{
|
||||
struct clone_tag { };
|
||||
clone_impl( clone_impl const & x, clone_tag ):
|
||||
T(x)
|
||||
{
|
||||
copy_boost_exception(this,&x);
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
explicit
|
||||
@ -430,7 +457,7 @@ boost
|
||||
clone_base const *
|
||||
clone() const
|
||||
{
|
||||
return new clone_impl(*this);
|
||||
return new clone_impl(*this,clone_tag());
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -97,7 +97,7 @@ boost
|
||||
{
|
||||
shared_ptr<error_info_base> const & p = i->second;
|
||||
#ifndef BOOST_NO_RTTI
|
||||
BOOST_ASSERT( BOOST_EXCEPTION_DYNAMIC_TYPEID(*p).type_==ti.type_ );
|
||||
BOOST_ASSERT( *BOOST_EXCEPTION_DYNAMIC_TYPEID(*p).type_==*ti.type_ );
|
||||
#endif
|
||||
return p;
|
||||
}
|
||||
|
@ -18,6 +18,30 @@
|
||||
namespace
|
||||
boost
|
||||
{
|
||||
template <
|
||||
class E >
|
||||
inline
|
||||
E const &
|
||||
operator<<(
|
||||
E const & x,
|
||||
tuple< > const & v )
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
template <
|
||||
class E,
|
||||
class Tag1,class T1 >
|
||||
inline
|
||||
E const &
|
||||
operator<<(
|
||||
E const & x,
|
||||
tuple<
|
||||
error_info<Tag1,T1> > const & v )
|
||||
{
|
||||
return x << v.template get<0>();
|
||||
}
|
||||
|
||||
template <
|
||||
class E,
|
||||
class Tag1,class T1,
|
||||
|
@ -165,7 +165,7 @@ namespace foreach
|
||||
// this one works on legacy compilers. Overload boost_foreach_is_lightweight_proxy
|
||||
// at the global namespace for your type.
|
||||
template<typename T>
|
||||
inline boost::BOOST_FOREACH::is_lightweight_proxy<T> *
|
||||
inline boost::foreach::is_lightweight_proxy<T> *
|
||||
boost_foreach_is_lightweight_proxy(T *&, BOOST_FOREACH_TAG_DEFAULT) { return 0; }
|
||||
|
||||
template<typename T>
|
||||
@ -190,7 +190,7 @@ boost_foreach_is_lightweight_proxy(T **&, boost::foreach::tag) { return 0; }
|
||||
// this one works on legacy compilers. Overload boost_foreach_is_noncopyable
|
||||
// at the global namespace for your type.
|
||||
template<typename T>
|
||||
inline boost::BOOST_FOREACH::is_noncopyable<T> *
|
||||
inline boost::foreach::is_noncopyable<T> *
|
||||
boost_foreach_is_noncopyable(T *&, BOOST_FOREACH_TAG_DEFAULT) { return 0; }
|
||||
|
||||
namespace boost
|
||||
|
@ -14,8 +14,6 @@
|
||||
#ifndef BOOST_FOREACH_FWD_HPP
|
||||
#define BOOST_FOREACH_FWD_HPP
|
||||
|
||||
#include <utility> // for std::pair
|
||||
|
||||
// This must be at global scope, hence the uglified name
|
||||
enum boost_foreach_argument_dependent_lookup_hack
|
||||
{
|
||||
@ -27,9 +25,6 @@ namespace boost
|
||||
|
||||
namespace foreach
|
||||
{
|
||||
template<typename T>
|
||||
std::pair<T, T> in_range(T begin, T end);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// boost::foreach::tag
|
||||
//
|
||||
@ -51,24 +46,6 @@ namespace foreach
|
||||
|
||||
} // namespace foreach
|
||||
|
||||
// Workaround for unfortunate https://svn.boost.org/trac/boost/ticket/6131
|
||||
namespace BOOST_FOREACH
|
||||
{
|
||||
using foreach::in_range;
|
||||
using foreach::tag;
|
||||
|
||||
template<typename T>
|
||||
struct is_lightweight_proxy
|
||||
: foreach::is_lightweight_proxy<T>
|
||||
{};
|
||||
|
||||
template<typename T>
|
||||
struct is_noncopyable
|
||||
: foreach::is_noncopyable<T>
|
||||
{};
|
||||
|
||||
} // namespace BOOST_FOREACH
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,41 @@
|
||||
|
||||
// Copyright 2012 Daniel James.
|
||||
// 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(BOOST_DETAIL_CONTAINER_FWD_0X_HPP)
|
||||
#define BOOST_DETAIL_CONTAINER_FWD_0X_HPP
|
||||
|
||||
#include <boost/detail/container_fwd.hpp>
|
||||
|
||||
// std::array
|
||||
|
||||
#if !defined(BOOST_NO_0X_HDR_ARRAY)
|
||||
// Don't forward declare std::array for Dinkumware, as it seems to be
|
||||
// just 'using std::tr1::array'.
|
||||
# if (defined(BOOST_DETAIL_NO_CONTAINER_FWD) && \
|
||||
!defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD)) || \
|
||||
(defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
|
||||
# include <array>
|
||||
# else
|
||||
namespace std {
|
||||
template <class, std::size_t> class array;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// std::tuple
|
||||
|
||||
#if !defined(BOOST_NO_0X_HDR_TUPLE)
|
||||
# if (defined(BOOST_DETAIL_NO_CONTAINER_FWD) && \
|
||||
!defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD)) || \
|
||||
defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||
# include <tuple>
|
||||
# else
|
||||
namespace std {
|
||||
template <typename...> class tuple;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
@ -86,10 +86,24 @@ namespace boost
|
||||
{
|
||||
namespace hash_detail
|
||||
{
|
||||
template <class T>
|
||||
inline bool is_zero(T v)
|
||||
{
|
||||
#if !defined(__GNUC__)
|
||||
return v == 0;
|
||||
#else
|
||||
// GCC's '-Wfloat-equal' will complain about comparing
|
||||
// v to 0, but because it disables warnings for system
|
||||
// headers it won't complain if you use std::equal_to to
|
||||
// compare with 0. Resulting in this silliness:
|
||||
return std::equal_to<T>()(v, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline std::size_t float_hash_value(T v)
|
||||
{
|
||||
return v == 0 ? 0 : float_hash_impl(v);
|
||||
return boost::hash_detail::is_zero(v) ? 0 : float_hash_impl(v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,11 @@
|
||||
#define BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP
|
||||
|
||||
#include <boost/functional/hash/hash.hpp>
|
||||
#include <boost/detail/container_fwd.hpp>
|
||||
#include <boost/functional/hash/detail/container_fwd_0x.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
@ -54,51 +58,51 @@ namespace boost
|
||||
std::size_t hash_value(std::pair<A, B> const& v)
|
||||
{
|
||||
std::size_t seed = 0;
|
||||
hash_combine(seed, v.first);
|
||||
hash_combine(seed, v.second);
|
||||
boost::hash_combine(seed, v.first);
|
||||
boost::hash_combine(seed, v.second);
|
||||
return seed;
|
||||
}
|
||||
|
||||
template <class T, class A>
|
||||
std::size_t hash_value(std::vector<T, A> const& v)
|
||||
{
|
||||
return hash_range(v.begin(), v.end());
|
||||
return boost::hash_range(v.begin(), v.end());
|
||||
}
|
||||
|
||||
template <class T, class A>
|
||||
std::size_t hash_value(std::list<T, A> const& v)
|
||||
{
|
||||
return hash_range(v.begin(), v.end());
|
||||
return boost::hash_range(v.begin(), v.end());
|
||||
}
|
||||
|
||||
template <class T, class A>
|
||||
std::size_t hash_value(std::deque<T, A> const& v)
|
||||
{
|
||||
return hash_range(v.begin(), v.end());
|
||||
return boost::hash_range(v.begin(), v.end());
|
||||
}
|
||||
|
||||
template <class K, class C, class A>
|
||||
std::size_t hash_value(std::set<K, C, A> const& v)
|
||||
{
|
||||
return hash_range(v.begin(), v.end());
|
||||
return boost::hash_range(v.begin(), v.end());
|
||||
}
|
||||
|
||||
template <class K, class C, class A>
|
||||
std::size_t hash_value(std::multiset<K, C, A> const& v)
|
||||
{
|
||||
return hash_range(v.begin(), v.end());
|
||||
return boost::hash_range(v.begin(), v.end());
|
||||
}
|
||||
|
||||
template <class K, class T, class C, class A>
|
||||
std::size_t hash_value(std::map<K, T, C, A> const& v)
|
||||
{
|
||||
return hash_range(v.begin(), v.end());
|
||||
return boost::hash_range(v.begin(), v.end());
|
||||
}
|
||||
|
||||
template <class K, class T, class C, class A>
|
||||
std::size_t hash_value(std::multimap<K, T, C, A> const& v)
|
||||
{
|
||||
return hash_range(v.begin(), v.end());
|
||||
return boost::hash_range(v.begin(), v.end());
|
||||
}
|
||||
|
||||
template <class T>
|
||||
@ -110,6 +114,71 @@ namespace boost
|
||||
return seed;
|
||||
}
|
||||
|
||||
#if !defined(BOOST_NO_0X_HDR_ARRAY)
|
||||
template <class T, std::size_t N>
|
||||
std::size_t hash_value(std::array<T, N> const& v)
|
||||
{
|
||||
return boost::hash_range(v.begin(), v.end());
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_0X_HDR_TUPLE)
|
||||
namespace hash_detail {
|
||||
template <std::size_t I, typename T>
|
||||
inline typename boost::enable_if_c<(I == std::tuple_size<T>::value),
|
||||
void>::type
|
||||
hash_combine_tuple(std::size_t&, T const&)
|
||||
{
|
||||
}
|
||||
|
||||
template <std::size_t I, typename T>
|
||||
inline typename boost::enable_if_c<(I < std::tuple_size<T>::value),
|
||||
void>::type
|
||||
hash_combine_tuple(std::size_t& seed, T const& v)
|
||||
{
|
||||
boost::hash_combine(seed, std::get<I>(v));
|
||||
boost::hash_detail::hash_combine_tuple<I + 1>(seed, v);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline std::size_t hash_tuple(T const& v)
|
||||
{
|
||||
std::size_t seed = 0;
|
||||
boost::hash_detail::hash_combine_tuple<0>(seed, v);
|
||||
return seed;
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||
template <typename... T>
|
||||
inline std::size_t hash_value(std::tuple<T...> const& v)
|
||||
{
|
||||
return boost::hash_detail::hash_tuple(v);
|
||||
}
|
||||
#else
|
||||
|
||||
inline std::size_t hash_value(std::tuple<> const& v)
|
||||
{
|
||||
return boost::hash_detail::hash_tuple(v);
|
||||
}
|
||||
|
||||
# define BOOST_HASH_TUPLE_F(z, n, _) \
|
||||
template< \
|
||||
BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \
|
||||
> \
|
||||
inline std::size_t hash_value(std::tuple< \
|
||||
BOOST_PP_ENUM_PARAMS_Z(z, n, A) \
|
||||
> const& v) \
|
||||
{ \
|
||||
return boost::hash_detail::hash_tuple(v); \
|
||||
}
|
||||
|
||||
BOOST_PP_REPEAT_FROM_TO(1, 11, BOOST_HASH_TUPLE_F, _)
|
||||
# undef BOOST_HASH_TUPLE_F
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// call_hash_impl
|
||||
//
|
||||
|
@ -502,20 +502,20 @@ namespace boost {
|
||||
#define ADJLIST adjacency_list<OEL,VL,D,VP,EP,GP,EL>
|
||||
|
||||
template<ADJLIST_PARAMS, typename Tag, typename Value>
|
||||
inline void set_property(ADJLIST& g, Tag, Value const& value) {
|
||||
get_property_value(*g.m_property, Tag()) = value;
|
||||
inline void set_property(ADJLIST& g, Tag tag, Value const& value) {
|
||||
get_property_value(*g.m_property, tag) = value;
|
||||
}
|
||||
|
||||
template<ADJLIST_PARAMS, typename Tag>
|
||||
inline typename graph_property<ADJLIST, Tag>::type&
|
||||
get_property(ADJLIST& g, Tag) {
|
||||
return get_property_value(*g.m_property, Tag());
|
||||
get_property(ADJLIST& g, Tag tag) {
|
||||
return get_property_value(*g.m_property, tag);
|
||||
}
|
||||
|
||||
template<ADJLIST_PARAMS, typename Tag>
|
||||
inline typename graph_property<ADJLIST, Tag>::type const&
|
||||
get_property(ADJLIST const& g, Tag) {
|
||||
return get_property_value(*g.m_property, Tag());
|
||||
get_property(ADJLIST const& g, Tag tag) {
|
||||
return get_property_value(*g.m_property, tag);
|
||||
}
|
||||
|
||||
// dwa 09/25/00 - needed to be more explicit so reverse_graph would work.
|
||||
|
@ -727,8 +727,10 @@ namespace boost {
|
||||
|
||||
typename Config::OutEdgeList& out_el = g.out_edge_list(source(e, g));
|
||||
typename Config::OutEdgeList::iterator out_i = out_el.begin();
|
||||
typename Config::EdgeIter edge_iter_to_erase;
|
||||
for (; out_i != out_el.end(); ++out_i)
|
||||
if (&(*out_i).get_property() == &p) {
|
||||
edge_iter_to_erase = (*out_i).get_iter();
|
||||
out_el.erase(out_i);
|
||||
break;
|
||||
}
|
||||
@ -736,10 +738,10 @@ namespace boost {
|
||||
typename Config::OutEdgeList::iterator in_i = in_el.begin();
|
||||
for (; in_i != in_el.end(); ++in_i)
|
||||
if (&(*in_i).get_property() == &p) {
|
||||
g.m_edges.erase((*in_i).get_iter());
|
||||
in_el.erase(in_i);
|
||||
return;
|
||||
break;
|
||||
}
|
||||
g.m_edges.erase(edge_iter_to_erase);
|
||||
}
|
||||
};
|
||||
|
||||
@ -760,8 +762,10 @@ namespace boost {
|
||||
no_property* p = (no_property*)e.get_property();
|
||||
typename Config::OutEdgeList& out_el = g.out_edge_list(source(e, g));
|
||||
typename Config::OutEdgeList::iterator out_i = out_el.begin();
|
||||
typename Config::EdgeIter edge_iter_to_erase;
|
||||
for (; out_i != out_el.end(); ++out_i)
|
||||
if (&(*out_i).get_property() == p) {
|
||||
edge_iter_to_erase = (*out_i).get_iter();
|
||||
out_el.erase(out_i);
|
||||
break;
|
||||
}
|
||||
@ -769,10 +773,10 @@ namespace boost {
|
||||
typename Config::OutEdgeList::iterator in_i = in_el.begin();
|
||||
for (; in_i != in_el.end(); ++in_i)
|
||||
if (&(*in_i).get_property() == p) {
|
||||
g.m_edges.erase((*in_i).get_iter());
|
||||
in_el.erase(in_i);
|
||||
return;
|
||||
break;
|
||||
}
|
||||
g.m_edges.erase(edge_iter_to_erase);
|
||||
}
|
||||
};
|
||||
|
||||
@ -811,6 +815,7 @@ namespace boost {
|
||||
|
||||
typedef typename EdgeList::value_type StoredEdge;
|
||||
typename EdgeList::iterator i = el.find(StoredEdge(v)), end = el.end();
|
||||
BOOST_ASSERT ((i != end));
|
||||
if (i != end) {
|
||||
g.m_edges.erase((*i).get_iter());
|
||||
el.erase(i);
|
||||
@ -991,25 +996,13 @@ namespace boost {
|
||||
typedef typename Config::graph_type graph_type;
|
||||
typedef typename Config::edge_parallel_category Cat;
|
||||
graph_type& g = static_cast<graph_type&>(g_);
|
||||
typename Config::OutEdgeList& el = g.out_edge_list(u);
|
||||
typename Config::OutEdgeList::iterator
|
||||
ei = el.begin(), ei_end = el.end();
|
||||
for (; ei != ei_end; /* Increment below */ ) {
|
||||
bool is_self_loop = (*ei).get_target() == u;
|
||||
// Don't erase from our own incidence list in the case of a self-loop
|
||||
// since we're clearing it anyway.
|
||||
if (!is_self_loop) {
|
||||
detail::erase_from_incidence_list
|
||||
(g.out_edge_list((*ei).get_target()), u, Cat());
|
||||
typename Config::OutEdgeList::iterator ei_copy = ei;
|
||||
++ei;
|
||||
if (!is_self_loop) g.m_edges.erase((*ei_copy).get_iter());
|
||||
} else {
|
||||
++ei;
|
||||
while (true) {
|
||||
typename Config::out_edge_iterator ei, ei_end;
|
||||
boost::tie(ei, ei_end) = out_edges(u, g);
|
||||
if (ei == ei_end) break;
|
||||
remove_edge(*ei, g);
|
||||
}
|
||||
}
|
||||
g.out_edge_list(u).clear();
|
||||
}
|
||||
// O(1) for allow_parallel_edge_tag
|
||||
// O(log(E/V)) for disallow_parallel_edge_tag
|
||||
template <class Config>
|
||||
|
@ -15,9 +15,8 @@
|
||||
#include <boost/ref.hpp>
|
||||
#include <boost/parameter/name.hpp>
|
||||
#include <boost/parameter/binding.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <boost/mpl/not.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
#include <boost/graph/properties.hpp>
|
||||
#include <boost/graph/detail/d_ary_heap.hpp>
|
||||
#include <boost/property_map/property_map.hpp>
|
||||
@ -609,6 +608,13 @@ BOOST_BGL_DECLARE_NAMED_PARAMS
|
||||
|
||||
make_priority_queue_from_arg_pack_gen(KeyT defaultKey_) : defaultKey(defaultKey_) { }
|
||||
|
||||
template <class F>
|
||||
struct result {
|
||||
typedef typename remove_const<typename remove_reference<typename function_traits<F>::arg1_type>::type>::type graph_type;
|
||||
typedef typename remove_const<typename remove_reference<typename function_traits<F>::arg2_type>::type>::type arg_pack_type;
|
||||
typedef typename priority_queue_maker<graph_type, arg_pack_type, KeyT, ValueT, PriorityQueueTag, KeyMapTag, IndexInHeapMapTag, Compare>::priority_queue_type type;
|
||||
};
|
||||
|
||||
template <class Graph, class ArgPack>
|
||||
typename priority_queue_maker<Graph, ArgPack, KeyT, ValueT, PriorityQueueTag, KeyMapTag, IndexInHeapMapTag, Compare>::priority_queue_type
|
||||
operator()(const Graph& g, const ArgPack& ap) const {
|
||||
|
@ -29,7 +29,7 @@ namespace boost
|
||||
|
||||
// The null_property_map<K,V> only has a put() function.
|
||||
template <typename K, typename V>
|
||||
void put(null_property_map<K,V>& pm, const K& key, const V& value)
|
||||
void put(null_property_map<K,V>& /*pm*/, const K& /*key*/, const V& /*value*/)
|
||||
{ }
|
||||
|
||||
// A helper function for intantiating null property maps.
|
||||
|
@ -105,6 +105,7 @@ class reverse_graph {
|
||||
typedef graph_traits<BidirectionalGraph> Traits;
|
||||
public:
|
||||
typedef BidirectionalGraph base_type;
|
||||
typedef GraphRef base_ref_type;
|
||||
|
||||
// Constructor
|
||||
reverse_graph(GraphRef g) : m_g(g) {}
|
||||
@ -391,14 +392,18 @@ struct edge_property_selector<reverse_graph_tag> {
|
||||
};
|
||||
|
||||
template <class BidirGraph, class GRef, class Property>
|
||||
typename property_map<reverse_graph<BidirGraph,GRef>, Property>::type
|
||||
typename disable_if<
|
||||
is_same<Property, edge_underlying_t>,
|
||||
typename property_map<reverse_graph<BidirGraph,GRef>, Property>::type>::type
|
||||
get(Property p, reverse_graph<BidirGraph,GRef>& g)
|
||||
{
|
||||
return typename property_map<reverse_graph<BidirGraph,GRef>, Property>::type(get(p, g.m_g));
|
||||
}
|
||||
|
||||
template <class BidirGraph, class GRef, class Property>
|
||||
typename property_map<reverse_graph<BidirGraph,GRef>, Property>::const_type
|
||||
typename disable_if<
|
||||
is_same<Property, edge_underlying_t>,
|
||||
typename property_map<reverse_graph<BidirGraph,GRef>, Property>::const_type>::type
|
||||
get(Property p, const reverse_graph<BidirGraph,GRef>& g)
|
||||
{
|
||||
const BidirGraph& gref = g.m_g; // in case GRef is non-const
|
||||
@ -406,9 +411,11 @@ get(Property p, const reverse_graph<BidirGraph,GRef>& g)
|
||||
}
|
||||
|
||||
template <class BidirectionalGraph, class GRef, class Property, class Key>
|
||||
typename property_traits<
|
||||
typename property_map<BidirectionalGraph, Property>::const_type
|
||||
>::value_type
|
||||
typename disable_if<
|
||||
is_same<Property, edge_underlying_t>,
|
||||
typename property_traits<
|
||||
typename property_map<reverse_graph<BidirectionalGraph, GRef>, Property>::const_type
|
||||
>::value_type>::type
|
||||
get(Property p, const reverse_graph<BidirectionalGraph,GRef>& g, const Key& k)
|
||||
{
|
||||
return get(get(p, g), k);
|
||||
@ -459,19 +466,40 @@ struct property_map<reverse_graph<Graph, GRef>, edge_underlying_t> {
|
||||
typedef detail::underlying_edge_desc_map_type<ed> const_type;
|
||||
};
|
||||
|
||||
template <class Graph, class GRef>
|
||||
detail::underlying_edge_desc_map_type<typename graph_traits<Graph>::edge_descriptor>
|
||||
template <typename T> struct is_reverse_graph: boost::mpl::false_ {};
|
||||
template <typename G, typename R> struct is_reverse_graph<reverse_graph<G, R> >: boost::mpl::true_ {};
|
||||
|
||||
template <class G>
|
||||
typename enable_if<is_reverse_graph<G>,
|
||||
detail::underlying_edge_desc_map_type<typename graph_traits<typename G::base_type>::edge_descriptor> >::type
|
||||
get(edge_underlying_t,
|
||||
const reverse_graph<Graph,GRef>& g)
|
||||
G& g)
|
||||
{
|
||||
return detail::underlying_edge_desc_map_type<typename graph_traits<Graph>::edge_descriptor>();
|
||||
return detail::underlying_edge_desc_map_type<typename graph_traits<typename G::base_type>::edge_descriptor>();
|
||||
}
|
||||
|
||||
template <class Graph, class GRef>
|
||||
typename graph_traits<Graph>::edge_descriptor
|
||||
template <class G>
|
||||
typename enable_if<is_reverse_graph<G>, typename graph_traits<typename G::base_type>::edge_descriptor>::type
|
||||
get(edge_underlying_t,
|
||||
const reverse_graph<Graph,GRef>& g,
|
||||
const typename graph_traits<reverse_graph<Graph, GRef> >::edge_descriptor& k)
|
||||
G& g,
|
||||
const typename graph_traits<G>::edge_descriptor& k)
|
||||
{
|
||||
return k.underlying_descx;
|
||||
}
|
||||
|
||||
template <class G>
|
||||
typename enable_if<is_reverse_graph<G>, detail::underlying_edge_desc_map_type<typename graph_traits<typename G::base_type>::edge_descriptor> >::type
|
||||
get(edge_underlying_t,
|
||||
const G& g)
|
||||
{
|
||||
return detail::underlying_edge_desc_map_type<typename graph_traits<typename G::base_type>::edge_descriptor>();
|
||||
}
|
||||
|
||||
template <class G>
|
||||
typename enable_if<is_reverse_graph<G>, typename graph_traits<typename G::base_type>::edge_descriptor>::type
|
||||
get(edge_underlying_t,
|
||||
const G& g,
|
||||
const typename graph_traits<G>::edge_descriptor& k)
|
||||
{
|
||||
return k.underlying_descx;
|
||||
}
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <boost/integer_traits.hpp> // for boost::::boost::integer_traits
|
||||
#include <boost/limits.hpp> // for ::std::numeric_limits
|
||||
#include <boost/cstdint.hpp> // for boost::int64_t and BOOST_NO_INTEGRAL_INT64_T
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
//
|
||||
// We simply cannot include this header on gcc without getting copious warnings of the kind:
|
||||
@ -51,6 +52,7 @@ namespace boost
|
||||
|
||||
// convert category to type
|
||||
template< int Category > struct int_least_helper {}; // default is empty
|
||||
template< int Category > struct uint_least_helper {}; // default is empty
|
||||
|
||||
// specializatons: 1=long, 2=int, 3=short, 4=signed char,
|
||||
// 6=unsigned long, 7=unsigned int, 8=unsigned short, 9=unsigned char
|
||||
@ -65,14 +67,14 @@ namespace boost
|
||||
template<> struct int_least_helper<4> { typedef short least; };
|
||||
template<> struct int_least_helper<5> { typedef signed char least; };
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
template<> struct int_least_helper<6> { typedef boost::ulong_long_type least; };
|
||||
template<> struct uint_least_helper<1> { typedef boost::ulong_long_type least; };
|
||||
#elif defined(BOOST_HAS_MS_INT64)
|
||||
template<> struct int_least_helper<6> { typedef unsigned __int64 least; };
|
||||
template<> struct uint_least_helper<1> { typedef unsigned __int64 least; };
|
||||
#endif
|
||||
template<> struct int_least_helper<7> { typedef unsigned long least; };
|
||||
template<> struct int_least_helper<8> { typedef unsigned int least; };
|
||||
template<> struct int_least_helper<9> { typedef unsigned short least; };
|
||||
template<> struct int_least_helper<10> { typedef unsigned char least; };
|
||||
template<> struct uint_least_helper<2> { typedef unsigned long least; };
|
||||
template<> struct uint_least_helper<3> { typedef unsigned int least; };
|
||||
template<> struct uint_least_helper<4> { typedef unsigned short least; };
|
||||
template<> struct uint_least_helper<5> { typedef unsigned char least; };
|
||||
|
||||
template <int Bits>
|
||||
struct exact_signed_base_helper{};
|
||||
@ -111,10 +113,12 @@ namespace boost
|
||||
template< int Bits > // bits (including sign) required
|
||||
struct int_t : public detail::exact_signed_base_helper<Bits>
|
||||
{
|
||||
BOOST_STATIC_ASSERT_MSG(Bits <= (int)(sizeof(boost::intmax_t) * CHAR_BIT),
|
||||
"No suitable signed integer type with the requested number of bits is available.");
|
||||
typedef typename detail::int_least_helper
|
||||
<
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
(Bits-1 <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) +
|
||||
(Bits <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) +
|
||||
#else
|
||||
1 +
|
||||
#endif
|
||||
@ -130,6 +134,8 @@ namespace boost
|
||||
template< int Bits > // bits required
|
||||
struct uint_t : public detail::exact_unsigned_base_helper<Bits>
|
||||
{
|
||||
BOOST_STATIC_ASSERT_MSG(Bits <= (int)(sizeof(boost::uintmax_t) * CHAR_BIT),
|
||||
"No suitable unsigned integer type with the requested number of bits is available.");
|
||||
#if (defined(__BORLANDC__) || defined(__CODEGEAR__)) && defined(BOOST_NO_INTEGRAL_INT64_T)
|
||||
// It's really not clear why this workaround should be needed... shrug I guess! JM
|
||||
BOOST_STATIC_CONSTANT(int, s =
|
||||
@ -140,11 +146,10 @@ namespace boost
|
||||
(Bits <= ::std::numeric_limits<unsigned char>::digits));
|
||||
typedef typename detail::int_least_helper< ::boost::uint_t<Bits>::s>::least least;
|
||||
#else
|
||||
typedef typename detail::int_least_helper
|
||||
typedef typename detail::uint_least_helper
|
||||
<
|
||||
5 +
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
(Bits-1 <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) +
|
||||
(Bits <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) +
|
||||
#else
|
||||
1 +
|
||||
#endif
|
||||
@ -217,7 +222,7 @@ namespace boost
|
||||
// It's really not clear why this workaround should be needed... shrug I guess! JM
|
||||
#if defined(BOOST_NO_INTEGRAL_INT64_T)
|
||||
BOOST_STATIC_CONSTANT(unsigned, which =
|
||||
6 +
|
||||
1 +
|
||||
(MaxValue <= ::boost::integer_traits<unsigned long>::const_max) +
|
||||
(MaxValue <= ::boost::integer_traits<unsigned int>::const_max) +
|
||||
(MaxValue <= ::boost::integer_traits<unsigned short>::const_max) +
|
||||
@ -225,18 +230,17 @@ namespace boost
|
||||
typedef typename detail::int_least_helper< ::boost::uint_value_t<MaxValue>::which>::least least;
|
||||
#else // BOOST_NO_INTEGRAL_INT64_T
|
||||
BOOST_STATIC_CONSTANT(unsigned, which =
|
||||
5 +
|
||||
1 +
|
||||
(MaxValue <= ::boost::integer_traits<boost::ulong_long_type>::const_max) +
|
||||
(MaxValue <= ::boost::integer_traits<unsigned long>::const_max) +
|
||||
(MaxValue <= ::boost::integer_traits<unsigned int>::const_max) +
|
||||
(MaxValue <= ::boost::integer_traits<unsigned short>::const_max) +
|
||||
(MaxValue <= ::boost::integer_traits<unsigned char>::const_max));
|
||||
typedef typename detail::int_least_helper< ::boost::uint_value_t<MaxValue>::which>::least least;
|
||||
typedef typename detail::uint_least_helper< ::boost::uint_value_t<MaxValue>::which>::least least;
|
||||
#endif // BOOST_NO_INTEGRAL_INT64_T
|
||||
#else
|
||||
typedef typename detail::int_least_helper
|
||||
typedef typename detail::uint_least_helper
|
||||
<
|
||||
5 +
|
||||
#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
|
||||
(MaxValue <= ::boost::integer_traits<boost::ulong_long_type>::const_max) +
|
||||
#else
|
||||
|
@ -5,7 +5,7 @@
|
||||
* accompanying file LICENSE_1_0.txt or copy at
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
* $Id: integer_traits.hpp 76784 2012-01-29 21:58:13Z eric_niebler $
|
||||
* $Id: integer_traits.hpp 78652 2012-05-26 19:33:09Z jewillco $
|
||||
*
|
||||
* Idea by Beman Dawes, Ed Brey, Steve Cleary, and Nathan Myers
|
||||
*/
|
||||
|
52
cpp/BoostParts/boost/intrusive/detail/config_begin.hpp
Normal file
52
cpp/BoostParts/boost/intrusive/detail/config_begin.hpp
Normal file
@ -0,0 +1,52 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-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/intrusive for documentation.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_CONFIG_INCLUDED
|
||||
#define BOOST_INTRUSIVE_CONFIG_INCLUDED
|
||||
#include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
|
||||
#pragma warning (push)
|
||||
//
|
||||
//'function' : resolved overload was found by argument-dependent lookup
|
||||
//A function found by argument-dependent lookup (Koenig lookup) was eventually
|
||||
//chosen by overload resolution.
|
||||
//
|
||||
//In Visual C++ .NET and earlier compilers, a different function would have
|
||||
//been called. To pick the original function, use an explicitly qualified name.
|
||||
//
|
||||
|
||||
//warning C4275: non dll-interface class 'x' used as base for
|
||||
//dll-interface class 'Y'
|
||||
#pragma warning (disable : 4275)
|
||||
//warning C4251: 'x' : class 'y' needs to have dll-interface to
|
||||
//be used by clients of class 'z'
|
||||
#pragma warning (disable : 4251)
|
||||
#pragma warning (disable : 4675)
|
||||
#pragma warning (disable : 4996)
|
||||
#pragma warning (disable : 4503)
|
||||
#pragma warning (disable : 4284) // odd return type for operator->
|
||||
#pragma warning (disable : 4244) // possible loss of data
|
||||
#pragma warning (disable : 4521) ////Disable "multiple copy constructors specified"
|
||||
#pragma warning (disable : 4522)
|
||||
#pragma warning (disable : 4146)
|
||||
#pragma warning (disable : 4267) //conversion from 'X' to 'Y', possible loss of data
|
||||
#pragma warning (disable : 4127) //conditional expression is constant
|
||||
#pragma warning (disable : 4706) //assignment within conditional expression
|
||||
#pragma warning (disable : 4541) //'typeid' used on polymorphic type 'boost::exception' with /GR-
|
||||
#pragma warning (disable : 4512) //'typeid' used on polymorphic type 'boost::exception' with /GR-
|
||||
#endif
|
||||
|
||||
//#define BOOST_INTRUSIVE_USE_ITERATOR_FACADE
|
||||
//#define BOOST_INTRUSIVE_USE_ITERATOR_ENABLE_IF_CONVERTIBLE
|
15
cpp/BoostParts/boost/intrusive/detail/config_end.hpp
Normal file
15
cpp/BoostParts/boost/intrusive/detail/config_end.hpp
Normal file
@ -0,0 +1,15 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-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/intrusive for documentation.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if defined BOOST_MSVC
|
||||
#pragma warning (pop)
|
||||
#endif
|
@ -0,0 +1,356 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2011-2011. 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/intrusive for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// sample.h
|
||||
|
||||
#if !defined(BOOST_PP_IS_ITERATING)
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_DETAILS_INCLUDED
|
||||
#define BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_DETAILS_INCLUDED
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
#include <boost/intrusive/detail/preprocessor.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/move/move.hpp>
|
||||
|
||||
//Mark that we don't support 0 arg calls due to compiler ICE in GCC 3.4/4.0/4.1 and
|
||||
//wrong SFINAE for GCC 4.2/4.3
|
||||
#if defined(__GNUC__) && !defined(__clang__) && ((__GNUC__*100 + __GNUC_MINOR__*10) >= 340) && ((__GNUC__*100 + __GNUC_MINOR__*10) <= 430)
|
||||
#define BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED
|
||||
#elif defined(BOOST_INTEL) && (BOOST_INTEL < 1200 )
|
||||
#define BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED
|
||||
#endif
|
||||
|
||||
namespace boost_intrusive_has_member_function_callable_with {
|
||||
|
||||
struct dont_care
|
||||
{
|
||||
dont_care(...);
|
||||
};
|
||||
|
||||
struct private_type
|
||||
{
|
||||
static private_type p;
|
||||
private_type const &operator,(int) const;
|
||||
};
|
||||
|
||||
typedef char yes_type; // sizeof(yes_type) == 1
|
||||
struct no_type{ char dummy[2]; }; // sizeof(no_type) == 2
|
||||
|
||||
template<typename T>
|
||||
no_type is_private_type(T const &);
|
||||
yes_type is_private_type(private_type const &);
|
||||
|
||||
} //boost_intrusive_has_member_function_callable_with
|
||||
|
||||
#include <boost/intrusive/detail/config_end.hpp>
|
||||
|
||||
#endif //BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_DETAILS_INCLUDED
|
||||
|
||||
#else //!BOOST_PP_IS_ITERATING
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME
|
||||
#error "BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME not defined!"
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN
|
||||
#error "BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN not defined!"
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END
|
||||
#error "BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END not defined!"
|
||||
#endif
|
||||
|
||||
#if BOOST_PP_ITERATION_START() != 0
|
||||
#error "BOOST_PP_ITERATION_START() must be zero (0)"
|
||||
#endif
|
||||
|
||||
#if BOOST_PP_ITERATION() == 0
|
||||
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN
|
||||
|
||||
template <typename Type>
|
||||
class BOOST_PP_CAT(has_member_function_named_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
|
||||
{
|
||||
struct BaseMixin
|
||||
{
|
||||
void BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME();
|
||||
};
|
||||
|
||||
struct Base : public Type, public BaseMixin { Base(); };
|
||||
template <typename T, T t> class Helper{};
|
||||
|
||||
template <typename U>
|
||||
static boost_intrusive_has_member_function_callable_with::no_type deduce
|
||||
(U*, Helper<void (BaseMixin::*)(), &U::BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME>* = 0);
|
||||
static boost_intrusive_has_member_function_callable_with::yes_type deduce(...);
|
||||
|
||||
public:
|
||||
static const bool value =
|
||||
sizeof(boost_intrusive_has_member_function_callable_with::yes_type) == sizeof(deduce((Base*)(0)));
|
||||
};
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_PERFECT_FORWARDING)
|
||||
|
||||
template<typename Fun, bool HasFunc
|
||||
BOOST_PP_ENUM_TRAILING(BOOST_PP_ITERATION_FINISH(), BOOST_INTRUSIVE_PP_TEMPLATE_PARAM_VOID_DEFAULT, _)>
|
||||
struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME), _impl);
|
||||
//!
|
||||
|
||||
template<typename Fun BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION_FINISH(), class P)>
|
||||
struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME), _impl)
|
||||
<Fun, false BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION_FINISH(), P)>
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
//!
|
||||
|
||||
#if !defined(_MSC_VER) || (_MSC_VER < 1600)
|
||||
|
||||
#if defined(BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED)
|
||||
|
||||
template<typename Fun>
|
||||
struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl)
|
||||
<Fun, true BOOST_PP_ENUM_TRAILING(BOOST_PP_SUB(BOOST_PP_ITERATION_FINISH(), BOOST_PP_ITERATION()), BOOST_INTRUSIVE_PP_IDENTITY, void)>
|
||||
{
|
||||
//Mark that we don't support 0 arg calls due to compiler ICE in GCC 3.4/4.0/4.1 and
|
||||
//wrong SFINAE for GCC 4.2/4.3
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
#else //defined(BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED)
|
||||
|
||||
//Special case for 0 args
|
||||
template< class F
|
||||
, std::size_t N =
|
||||
sizeof((boost::move_detail::declval<F>().
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME (), 0))>
|
||||
struct BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
|
||||
{
|
||||
boost_intrusive_has_member_function_callable_with::yes_type dummy;
|
||||
BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)(int);
|
||||
};
|
||||
|
||||
//For buggy compilers like MSVC 7.1+ ((F*)0)->func() does not
|
||||
//SFINAE-out the zeroarg_checker_ instantiation but sizeof yields to 0.
|
||||
template<class F>
|
||||
struct BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<F, 0>
|
||||
{
|
||||
boost_intrusive_has_member_function_callable_with::no_type dummy;
|
||||
BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)(int);
|
||||
};
|
||||
|
||||
template<typename Fun>
|
||||
struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl)
|
||||
<Fun, true BOOST_PP_ENUM_TRAILING(BOOST_PP_SUB(BOOST_PP_ITERATION_FINISH(), BOOST_PP_ITERATION()), BOOST_INTRUSIVE_PP_IDENTITY, void)>
|
||||
{
|
||||
template<class U>
|
||||
static BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<U>
|
||||
Test(BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<U>*);
|
||||
|
||||
template <class U>
|
||||
static boost_intrusive_has_member_function_callable_with::no_type Test(...);
|
||||
|
||||
static const bool value = sizeof(Test< Fun >(0))
|
||||
== sizeof(boost_intrusive_has_member_function_callable_with::yes_type);
|
||||
};
|
||||
#endif //defined(BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED)
|
||||
|
||||
#else //#if !defined(_MSC_VER) || (_MSC_VER < 1600)
|
||||
template<typename Fun>
|
||||
struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl)
|
||||
<Fun, true BOOST_PP_ENUM_TRAILING(BOOST_PP_SUB(BOOST_PP_ITERATION_FINISH(), BOOST_PP_ITERATION()), BOOST_INTRUSIVE_PP_IDENTITY, void)>
|
||||
{
|
||||
template<class U>
|
||||
static decltype( boost::move_detail::declval<Fun>().BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME()
|
||||
, boost_intrusive_has_member_function_callable_with::yes_type())
|
||||
Test(Fun*);
|
||||
|
||||
template<class U>
|
||||
static boost_intrusive_has_member_function_callable_with::no_type Test(...);
|
||||
|
||||
static const bool value = sizeof(Test<Fun>(0))
|
||||
== sizeof(boost_intrusive_has_member_function_callable_with::yes_type);
|
||||
};
|
||||
#endif //#if !defined(_MSC_VER) || (_MSC_VER < 1600)
|
||||
|
||||
#else //#if !defined(BOOST_INTRUSIVE_PERFECT_FORWARDING)
|
||||
|
||||
template<typename Fun, bool HasFunc, class ...Args>
|
||||
struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl);
|
||||
|
||||
template<typename Fun, class ...Args>
|
||||
struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl)
|
||||
<Fun, false, Args...>
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
//Special case for 0 args
|
||||
template< class F
|
||||
, std::size_t N =
|
||||
sizeof((boost::move_detail::declval<F>().
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME (), 0))>
|
||||
struct BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
|
||||
{
|
||||
boost_intrusive_has_member_function_callable_with::yes_type dummy;
|
||||
BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)(int);
|
||||
};
|
||||
|
||||
//For buggy compilers like MSVC 7.1+ ((F*)0)->func() does not
|
||||
//SFINAE-out the zeroarg_checker_ instantiation but sizeof yields to 0.
|
||||
template<class F>
|
||||
struct BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<F, 0>
|
||||
{
|
||||
boost_intrusive_has_member_function_callable_with::no_type dummy;
|
||||
BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)(int);
|
||||
};
|
||||
|
||||
template<typename Fun>
|
||||
struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl)
|
||||
<Fun, true>
|
||||
{
|
||||
template<class U>
|
||||
static BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
|
||||
<U> Test(BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<U>*);
|
||||
|
||||
template <class U>
|
||||
static boost_intrusive_has_member_function_callable_with::no_type Test(...);
|
||||
|
||||
static const bool value = sizeof(Test< Fun >(0))
|
||||
== sizeof(boost_intrusive_has_member_function_callable_with::yes_type);
|
||||
};
|
||||
|
||||
template<typename Fun, class ...DontCares>
|
||||
struct BOOST_PP_CAT( funwrap_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME )
|
||||
: Fun
|
||||
{
|
||||
BOOST_PP_CAT( funwrap_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME )();
|
||||
using Fun::BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME;
|
||||
|
||||
boost_intrusive_has_member_function_callable_with::private_type
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME
|
||||
( DontCares...) const;
|
||||
};
|
||||
|
||||
template<typename Fun, class ...Args>
|
||||
struct BOOST_PP_CAT( BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME), _impl)
|
||||
<Fun, true , Args...>
|
||||
{
|
||||
template<class T>
|
||||
struct make_dontcare
|
||||
{
|
||||
typedef boost_intrusive_has_member_function_callable_with::dont_care type;
|
||||
};
|
||||
|
||||
typedef BOOST_PP_CAT( funwrap_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME )
|
||||
<Fun, typename make_dontcare<Args>::type...> FunWrap;
|
||||
|
||||
static bool const value = (sizeof(boost_intrusive_has_member_function_callable_with::no_type) ==
|
||||
sizeof(boost_intrusive_has_member_function_callable_with::is_private_type
|
||||
( (::boost::move_detail::declval< FunWrap >().
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME
|
||||
( ::boost::move_detail::declval<Args>()... ), 0) )
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
template<typename Fun, class ...Args>
|
||||
struct BOOST_PP_CAT( has_member_function_callable_with_
|
||||
, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
|
||||
: public BOOST_PP_CAT( BOOST_PP_CAT(has_member_function_callable_with_
|
||||
, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl)
|
||||
< Fun
|
||||
, BOOST_PP_CAT( has_member_function_named_
|
||||
, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME )<Fun>::value
|
||||
, Args... >
|
||||
{};
|
||||
|
||||
#endif //#if !defined(BOOST_INTRUSIVE_PERFECT_FORWARDING)
|
||||
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END
|
||||
|
||||
#else //BOOST_PP_ITERATION() == 0
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_PERFECT_FORWARDING)
|
||||
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN
|
||||
|
||||
template<typename Fun>
|
||||
struct BOOST_PP_CAT( BOOST_PP_CAT(funwrap, BOOST_PP_ITERATION())
|
||||
, BOOST_PP_CAT(_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME))
|
||||
: Fun
|
||||
{
|
||||
BOOST_PP_CAT( BOOST_PP_CAT(funwrap, BOOST_PP_ITERATION())
|
||||
, BOOST_PP_CAT(_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME))();
|
||||
|
||||
using Fun::BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME;
|
||||
boost_intrusive_has_member_function_callable_with::private_type
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME
|
||||
( BOOST_PP_ENUM(BOOST_PP_ITERATION()
|
||||
, BOOST_INTRUSIVE_PP_IDENTITY
|
||||
, boost_intrusive_has_member_function_callable_with::dont_care)) const;
|
||||
};
|
||||
|
||||
template<typename Fun BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(), class P)>
|
||||
struct BOOST_PP_CAT( BOOST_PP_CAT(has_member_function_callable_with_
|
||||
, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl)
|
||||
<Fun, true
|
||||
BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(), P)
|
||||
BOOST_PP_ENUM_TRAILING( BOOST_PP_SUB(BOOST_PP_ITERATION_FINISH(), BOOST_PP_ITERATION())
|
||||
, BOOST_INTRUSIVE_PP_IDENTITY
|
||||
, void)>
|
||||
{
|
||||
typedef BOOST_PP_CAT( BOOST_PP_CAT(funwrap, BOOST_PP_ITERATION())
|
||||
, BOOST_PP_CAT(_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME))<Fun>
|
||||
FunWrap;
|
||||
static bool const value =
|
||||
(sizeof(boost_intrusive_has_member_function_callable_with::no_type) ==
|
||||
sizeof(boost_intrusive_has_member_function_callable_with::is_private_type
|
||||
( (boost::move_detail::declval<FunWrap>().
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME
|
||||
( BOOST_PP_ENUM( BOOST_PP_ITERATION(), BOOST_INTRUSIVE_PP_DECLVAL, _) ), 0
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END
|
||||
#endif //#if !defined(BOOST_INTRUSIVE_PERFECT_FORWARDING)
|
||||
|
||||
#endif //BOOST_PP_ITERATION() == 0
|
||||
|
||||
#if BOOST_PP_ITERATION() == BOOST_PP_ITERATION_FINISH()
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_PERFECT_FORWARDING)
|
||||
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN
|
||||
|
||||
template<typename Fun
|
||||
BOOST_PP_ENUM_TRAILING(BOOST_PP_ITERATION_FINISH(), BOOST_INTRUSIVE_PP_TEMPLATE_PARAM_VOID_DEFAULT, _)>
|
||||
struct BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
|
||||
: public BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME), _impl)
|
||||
<Fun, BOOST_PP_CAT(has_member_function_named_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<Fun>::value
|
||||
BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION_FINISH(), P) >
|
||||
{};
|
||||
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END
|
||||
|
||||
#endif //#if !defined(BOOST_INTRUSIVE_PERFECT_FORWARDING)
|
||||
|
||||
#undef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME
|
||||
#undef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN
|
||||
#undef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END
|
||||
|
||||
#endif //#if BOOST_PP_ITERATION() == BOOST_PP_ITERATION_FINISH()
|
||||
|
||||
#endif //!BOOST_PP_IS_ITERATING
|
286
cpp/BoostParts/boost/intrusive/detail/memory_util.hpp
Normal file
286
cpp/BoostParts/boost/intrusive/detail/memory_util.hpp
Normal file
@ -0,0 +1,286 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Pablo Halpern 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)
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2011-2011. 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/intrusive for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_ALLOCATOR_MEMORY_UTIL_HPP
|
||||
#define BOOST_INTRUSIVE_ALLOCATOR_MEMORY_UTIL_HPP
|
||||
|
||||
#if (defined _MSC_VER) && (_MSC_VER >= 1200)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <boost/intrusive/detail/preprocessor.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
namespace detail {
|
||||
|
||||
template <typename T>
|
||||
inline T* addressof(T& obj)
|
||||
{
|
||||
return static_cast<T*>
|
||||
(static_cast<void*>
|
||||
(const_cast<char*>
|
||||
(&reinterpret_cast<const char&>(obj))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
template <typename T> struct unvoid { typedef T type; };
|
||||
template <> struct unvoid<void> { struct type { }; };
|
||||
template <> struct unvoid<const void> { struct type { }; };
|
||||
|
||||
template <typename T>
|
||||
struct LowPriorityConversion
|
||||
{
|
||||
// Convertible from T with user-defined-conversion rank.
|
||||
LowPriorityConversion(const T&) { }
|
||||
};
|
||||
|
||||
// Infrastructure for providing a default type for T::TNAME if absent.
|
||||
#define BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(TNAME) \
|
||||
template <typename T, typename DefaultType> \
|
||||
struct boost_intrusive_default_type_ ## TNAME \
|
||||
{ \
|
||||
template <typename X> \
|
||||
static char test(int, typename X::TNAME*); \
|
||||
\
|
||||
template <typename X> \
|
||||
static int test(boost::intrusive::detail:: \
|
||||
LowPriorityConversion<int>, void*); \
|
||||
\
|
||||
struct DefaultWrap { typedef DefaultType TNAME; }; \
|
||||
\
|
||||
static const bool value = (1 == sizeof(test<T>(0, 0))); \
|
||||
\
|
||||
typedef typename \
|
||||
::boost::intrusive::detail::if_c \
|
||||
<value, T, DefaultWrap>::type::TNAME type; \
|
||||
}; \
|
||||
\
|
||||
template <typename T, typename DefaultType> \
|
||||
struct boost_intrusive_eval_default_type_ ## TNAME \
|
||||
{ \
|
||||
template <typename X> \
|
||||
static char test(int, typename X::TNAME*); \
|
||||
\
|
||||
template <typename X> \
|
||||
static int test(boost::intrusive::detail:: \
|
||||
LowPriorityConversion<int>, void*); \
|
||||
\
|
||||
struct DefaultWrap \
|
||||
{ typedef typename DefaultType::type TNAME; }; \
|
||||
\
|
||||
static const bool value = (1 == sizeof(test<T>(0, 0))); \
|
||||
\
|
||||
typedef typename \
|
||||
::boost::intrusive::detail::eval_if_c \
|
||||
< value \
|
||||
, ::boost::intrusive::detail::identity<T> \
|
||||
, ::boost::intrusive::detail::identity<DefaultWrap> \
|
||||
>::type::TNAME type; \
|
||||
}; \
|
||||
//
|
||||
|
||||
#define BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(INSTANTIATION_NS_PREFIX, T, TNAME, TIMPL) \
|
||||
typename INSTANTIATION_NS_PREFIX \
|
||||
boost_intrusive_default_type_ ## TNAME< T, TIMPL >::type \
|
||||
//
|
||||
|
||||
#define BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(INSTANTIATION_NS_PREFIX, T, TNAME, TIMPL) \
|
||||
typename INSTANTIATION_NS_PREFIX \
|
||||
boost_intrusive_eval_default_type_ ## TNAME< T, TIMPL >::type \
|
||||
//
|
||||
|
||||
}}} //namespace boost::intrusive::detail
|
||||
|
||||
#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME pointer_to
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace intrusive { namespace detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 1, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME static_cast_from
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace intrusive { namespace detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 1, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME const_cast_from
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace intrusive { namespace detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 1, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME dynamic_cast_from
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace intrusive { namespace detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 1, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
namespace detail {
|
||||
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(element_type)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(difference_type)
|
||||
|
||||
//////////////////////
|
||||
//struct first_param
|
||||
//////////////////////
|
||||
|
||||
template <typename T> struct first_param
|
||||
{ typedef void type; };
|
||||
|
||||
#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||
|
||||
template <template <typename, typename...> class TemplateClass, typename T, typename... Args>
|
||||
struct first_param< TemplateClass<T, Args...> >
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
#else //C++03 compilers
|
||||
|
||||
#define BOOST_PP_LOCAL_MACRO(n) \
|
||||
template < template <typename \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_INTRUSIVE_PP_IDENTITY, typename) > \
|
||||
class TemplateClass \
|
||||
, typename T BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)> \
|
||||
struct first_param \
|
||||
< TemplateClass<T BOOST_PP_ENUM_TRAILING_PARAMS(n, P)> > \
|
||||
{ \
|
||||
typedef T type; \
|
||||
}; \
|
||||
//
|
||||
#define BOOST_PP_LOCAL_LIMITS (0, BOOST_INTRUSIVE_MAX_CONSTRUCTOR_PARAMETERS)
|
||||
#include BOOST_PP_LOCAL_ITERATE()
|
||||
|
||||
#endif //!defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||
|
||||
///////////////////////////
|
||||
//struct type_rebind_mode
|
||||
///////////////////////////
|
||||
template <typename Ptr, typename T>
|
||||
struct type_has_rebind
|
||||
{
|
||||
template <typename X>
|
||||
static char test(int, typename X::template rebind<T>*);
|
||||
|
||||
template <typename X>
|
||||
static int test(boost::intrusive::detail::LowPriorityConversion<int>, void*);
|
||||
|
||||
static const bool value = (1 == sizeof(test<Ptr>(0, 0)));
|
||||
};
|
||||
|
||||
template <typename Ptr, typename T>
|
||||
struct type_has_rebind_other
|
||||
{
|
||||
template <typename X>
|
||||
static char test(int, typename X::template rebind<T>::other*);
|
||||
|
||||
template <typename X>
|
||||
static int test(boost::intrusive::detail::LowPriorityConversion<int>, void*);
|
||||
|
||||
static const bool value = (1 == sizeof(test<Ptr>(0, 0)));
|
||||
};
|
||||
|
||||
template <typename Ptr, typename T>
|
||||
struct type_rebind_mode
|
||||
{
|
||||
template <typename X>
|
||||
static char test(int, typename X::template rebind<T>::other*);
|
||||
|
||||
template <typename X>
|
||||
static int test(boost::intrusive::detail::LowPriorityConversion<int>, void*);
|
||||
|
||||
static const unsigned int rebind = (unsigned int)type_has_rebind<Ptr, T>::value;
|
||||
static const unsigned int rebind_other = (unsigned int)type_has_rebind_other<Ptr, T>::value;
|
||||
static const unsigned int mode = rebind + rebind*rebind_other;
|
||||
};
|
||||
|
||||
////////////////////////
|
||||
//struct type_rebinder
|
||||
////////////////////////
|
||||
template <typename Ptr, typename U, unsigned int RebindMode = type_rebind_mode<Ptr, U>::mode>
|
||||
struct type_rebinder;
|
||||
|
||||
// Implementation of pointer_traits<Ptr>::rebind if Ptr has
|
||||
// its own rebind::other type (C++03)
|
||||
template <typename Ptr, typename U>
|
||||
struct type_rebinder< Ptr, U, 2u >
|
||||
{
|
||||
typedef typename Ptr::template rebind<U>::other type;
|
||||
};
|
||||
|
||||
// Implementation of pointer_traits<Ptr>::rebind if Ptr has
|
||||
// its own rebind template.
|
||||
template <typename Ptr, typename U>
|
||||
struct type_rebinder< Ptr, U, 1u >
|
||||
{
|
||||
typedef typename Ptr::template rebind<U> type;
|
||||
};
|
||||
|
||||
// Specialization of pointer_traits<Ptr>::rebind if Ptr does not
|
||||
// have its own rebind template but has a the form Ptr<class T,
|
||||
// OtherArgs>, where OtherArgs comprises zero or more type parameters.
|
||||
// Many pointers fit this form, hence many pointers will get a
|
||||
// reasonable default for rebind.
|
||||
#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||
|
||||
template <template <class, class...> class Ptr, typename T, class... Tn, class U>
|
||||
struct type_rebinder<Ptr<T, Tn...>, U, 0u >
|
||||
{
|
||||
typedef Ptr<U, Tn...> type;
|
||||
};
|
||||
|
||||
//Needed for non-conforming compilers like GCC 4.3
|
||||
template <template <class> class Ptr, typename T, class U>
|
||||
struct type_rebinder<Ptr<T>, U, 0u >
|
||||
{
|
||||
typedef Ptr<U> type;
|
||||
};
|
||||
|
||||
#else //C++03 compilers
|
||||
|
||||
#define BOOST_PP_LOCAL_MACRO(n) \
|
||||
template < template <typename \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_INTRUSIVE_PP_IDENTITY, typename) > \
|
||||
class Ptr \
|
||||
, typename T BOOST_PP_ENUM_TRAILING_PARAMS(n, class P) \
|
||||
, class U> \
|
||||
struct type_rebinder \
|
||||
< Ptr<T BOOST_PP_ENUM_TRAILING_PARAMS(n, P)>, U, 0u > \
|
||||
{ \
|
||||
typedef Ptr<U BOOST_PP_ENUM_TRAILING_PARAMS(n, P)> type; \
|
||||
}; \
|
||||
//
|
||||
#define BOOST_PP_LOCAL_LIMITS (0, BOOST_INTRUSIVE_MAX_CONSTRUCTOR_PARAMETERS)
|
||||
#include BOOST_PP_LOCAL_ITERATE()
|
||||
|
||||
#endif //!defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||
|
||||
} //namespace detail {
|
||||
} //namespace intrusive {
|
||||
} //namespace boost {
|
||||
|
||||
#include <boost/intrusive/detail/config_end.hpp>
|
||||
|
||||
#endif // ! defined(BOOST_INTRUSIVE_ALLOCATOR_MEMORY_UTIL_HPP)
|
355
cpp/BoostParts/boost/intrusive/detail/mpl.hpp
Normal file
355
cpp/BoostParts/boost/intrusive/detail/mpl.hpp
Normal file
@ -0,0 +1,355 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-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/intrusive for documentation.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_DETAIL_MPL_HPP
|
||||
#define BOOST_INTRUSIVE_DETAIL_MPL_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <cstddef>
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
namespace detail {
|
||||
|
||||
typedef char one;
|
||||
struct two {one _[2];};
|
||||
|
||||
template< bool C_ >
|
||||
struct bool_
|
||||
{
|
||||
static const bool value = C_;
|
||||
};
|
||||
|
||||
typedef bool_<true> true_;
|
||||
typedef bool_<false> false_;
|
||||
|
||||
typedef true_ true_type;
|
||||
typedef false_ false_type;
|
||||
|
||||
typedef char yes_type;
|
||||
struct no_type
|
||||
{
|
||||
char padding[8];
|
||||
};
|
||||
|
||||
template <bool B, class T = void>
|
||||
struct enable_if_c {
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct enable_if_c<false, T> {};
|
||||
|
||||
template <class Cond, class T = void>
|
||||
struct enable_if : public enable_if_c<Cond::value, T>{};
|
||||
|
||||
template<class F, class Param>
|
||||
struct apply
|
||||
{
|
||||
typedef typename F::template apply<Param>::type type;
|
||||
};
|
||||
|
||||
template <class T, class U>
|
||||
class is_convertible
|
||||
{
|
||||
typedef char true_t;
|
||||
class false_t { char dummy[2]; };
|
||||
static true_t dispatch(U);
|
||||
static false_t dispatch(...);
|
||||
static const T &trigger();
|
||||
public:
|
||||
static const bool value = sizeof(dispatch(trigger())) == sizeof(true_t);
|
||||
};
|
||||
|
||||
template<
|
||||
bool C
|
||||
, typename T1
|
||||
, typename T2
|
||||
>
|
||||
struct if_c
|
||||
{
|
||||
typedef T1 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T1
|
||||
, typename T2
|
||||
>
|
||||
struct if_c<false,T1,T2>
|
||||
{
|
||||
typedef T2 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename C
|
||||
, typename T1
|
||||
, typename T2
|
||||
>
|
||||
struct if_
|
||||
{
|
||||
typedef typename if_c<0 != C::value, T1, T2>::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
bool C
|
||||
, typename F1
|
||||
, typename F2
|
||||
>
|
||||
struct eval_if_c
|
||||
: if_c<C,F1,F2>::type
|
||||
{};
|
||||
|
||||
template<
|
||||
typename C
|
||||
, typename T1
|
||||
, typename T2
|
||||
>
|
||||
struct eval_if
|
||||
: if_<C,T1,T2>::type
|
||||
{};
|
||||
|
||||
// identity is an extension: it is not part of the standard.
|
||||
template <class T>
|
||||
struct identity
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
#if defined(BOOST_MSVC) || defined(__BORLANDC_)
|
||||
#define BOOST_INTRUSIVE_TT_DECL __cdecl
|
||||
#else
|
||||
#define BOOST_INTRUSIVE_TT_DECL
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_EXTENSIONS) && !defined(__BORLAND__) && !defined(_WIN64) && !defined(UNDER_CE)
|
||||
#define BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
struct is_unary_or_binary_function_impl
|
||||
{ static const bool value = false; };
|
||||
|
||||
// see boost ticket #4094
|
||||
// avoid duplicate definitions of is_unary_or_binary_function_impl
|
||||
#ifndef BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
|
||||
|
||||
template <typename R>
|
||||
struct is_unary_or_binary_function_impl<R (*)()>
|
||||
{ static const bool value = true; };
|
||||
|
||||
template <typename R>
|
||||
struct is_unary_or_binary_function_impl<R (*)(...)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
#else // BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
|
||||
|
||||
template <typename R>
|
||||
struct is_unary_or_binary_function_impl<R (__stdcall*)()>
|
||||
{ static const bool value = true; };
|
||||
|
||||
template <typename R>
|
||||
struct is_unary_or_binary_function_impl<R (__fastcall*)()>
|
||||
{ static const bool value = true; };
|
||||
|
||||
template <typename R>
|
||||
struct is_unary_or_binary_function_impl<R (__cdecl*)()>
|
||||
{ static const bool value = true; };
|
||||
|
||||
template <typename R>
|
||||
struct is_unary_or_binary_function_impl<R (__cdecl*)(...)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
#endif
|
||||
|
||||
// see boost ticket #4094
|
||||
// avoid duplicate definitions of is_unary_or_binary_function_impl
|
||||
#ifndef BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
|
||||
|
||||
template <typename R, class T0>
|
||||
struct is_unary_or_binary_function_impl<R (*)(T0)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
template <typename R, class T0>
|
||||
struct is_unary_or_binary_function_impl<R (*)(T0...)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
#else // BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
|
||||
|
||||
template <typename R, class T0>
|
||||
struct is_unary_or_binary_function_impl<R (__stdcall*)(T0)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
template <typename R, class T0>
|
||||
struct is_unary_or_binary_function_impl<R (__fastcall*)(T0)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
template <typename R, class T0>
|
||||
struct is_unary_or_binary_function_impl<R (__cdecl*)(T0)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
template <typename R, class T0>
|
||||
struct is_unary_or_binary_function_impl<R (__cdecl*)(T0...)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
#endif
|
||||
|
||||
// see boost ticket #4094
|
||||
// avoid duplicate definitions of is_unary_or_binary_function_impl
|
||||
#ifndef BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
|
||||
|
||||
template <typename R, class T0, class T1>
|
||||
struct is_unary_or_binary_function_impl<R (*)(T0, T1)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
template <typename R, class T0, class T1>
|
||||
struct is_unary_or_binary_function_impl<R (*)(T0, T1...)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
#else // BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
|
||||
|
||||
template <typename R, class T0, class T1>
|
||||
struct is_unary_or_binary_function_impl<R (__stdcall*)(T0, T1)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
template <typename R, class T0, class T1>
|
||||
struct is_unary_or_binary_function_impl<R (__fastcall*)(T0, T1)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
template <typename R, class T0, class T1>
|
||||
struct is_unary_or_binary_function_impl<R (__cdecl*)(T0, T1)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
template <typename R, class T0, class T1>
|
||||
struct is_unary_or_binary_function_impl<R (__cdecl*)(T0, T1...)>
|
||||
{ static const bool value = true; };
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
struct is_unary_or_binary_function_impl<T&>
|
||||
{ static const bool value = false; };
|
||||
|
||||
template<typename T>
|
||||
struct is_unary_or_binary_function
|
||||
{ static const bool value = is_unary_or_binary_function_impl<T>::value; };
|
||||
|
||||
//boost::alignment_of yields to 10K lines of preprocessed code, so we
|
||||
//need an alternative
|
||||
template <typename T> struct alignment_of;
|
||||
|
||||
template <typename T>
|
||||
struct alignment_of_hack
|
||||
{
|
||||
char c;
|
||||
T t;
|
||||
alignment_of_hack();
|
||||
};
|
||||
|
||||
template <unsigned A, unsigned S>
|
||||
struct alignment_logic
|
||||
{
|
||||
static const std::size_t value = A < S ? A : S;
|
||||
};
|
||||
|
||||
template< typename T >
|
||||
struct alignment_of
|
||||
{
|
||||
static const std::size_t value = alignment_logic
|
||||
< sizeof(alignment_of_hack<T>) - sizeof(T)
|
||||
, sizeof(T)
|
||||
>::value;
|
||||
};
|
||||
|
||||
template <typename T, typename U>
|
||||
struct is_same
|
||||
{
|
||||
typedef char yes_type;
|
||||
struct no_type
|
||||
{
|
||||
char padding[8];
|
||||
};
|
||||
|
||||
template <typename V>
|
||||
static yes_type is_same_tester(V*, V*);
|
||||
static no_type is_same_tester(...);
|
||||
|
||||
static T *t;
|
||||
static U *u;
|
||||
|
||||
static const bool value = sizeof(yes_type) == sizeof(is_same_tester(t,u));
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct add_const
|
||||
{ typedef const T type; };
|
||||
|
||||
template<typename T>
|
||||
struct remove_const
|
||||
{ typedef T type; };
|
||||
|
||||
template<typename T>
|
||||
struct remove_const<const T>
|
||||
{ typedef T type; };
|
||||
|
||||
template<class T>
|
||||
struct remove_reference
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct remove_reference<T&>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<class Class>
|
||||
class is_empty_class
|
||||
{
|
||||
template <typename T>
|
||||
struct empty_helper_t1 : public T
|
||||
{
|
||||
empty_helper_t1();
|
||||
int i[256];
|
||||
};
|
||||
|
||||
struct empty_helper_t2
|
||||
{ int i[256]; };
|
||||
|
||||
public:
|
||||
static const bool value = sizeof(empty_helper_t1<Class>) == sizeof(empty_helper_t2);
|
||||
};
|
||||
|
||||
template<std::size_t S>
|
||||
struct ls_zeros
|
||||
{
|
||||
static const std::size_t value = (S & std::size_t(1)) ? 0 : (1 + ls_zeros<(S>>1u)>::value);
|
||||
};
|
||||
|
||||
template<>
|
||||
struct ls_zeros<0>
|
||||
{
|
||||
static const std::size_t value = 0;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct ls_zeros<1>
|
||||
{
|
||||
static const std::size_t value = 0;
|
||||
};
|
||||
|
||||
} //namespace detail
|
||||
} //namespace intrusive
|
||||
} //namespace boost
|
||||
|
||||
#include <boost/intrusive/detail/config_end.hpp>
|
||||
|
||||
#endif //BOOST_INTRUSIVE_DETAIL_MPL_HPP
|
52
cpp/BoostParts/boost/intrusive/detail/preprocessor.hpp
Normal file
52
cpp/BoostParts/boost/intrusive/detail/preprocessor.hpp
Normal file
@ -0,0 +1,52 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2008-2011. 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/intrusive for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_DETAIL_PREPROCESSOR_HPP
|
||||
#define BOOST_INTRUSIVE_DETAIL_PREPROCESSOR_HPP
|
||||
|
||||
#if (defined _MSC_VER) && (_MSC_VER >= 1200)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
|
||||
#include <boost/preprocessor/iteration/local.hpp>
|
||||
#include <boost/preprocessor/punctuation/paren_if.hpp>
|
||||
#include <boost/preprocessor/punctuation/comma_if.hpp>
|
||||
#include <boost/preprocessor/control/expr_if.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/preprocessor/repetition/enum.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_trailing.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_shifted.hpp>
|
||||
#include <boost/preprocessor/repetition/repeat.hpp>
|
||||
#include <boost/preprocessor/logical/not.hpp>
|
||||
#include <boost/preprocessor/arithmetic/sub.hpp>
|
||||
#include <boost/preprocessor/arithmetic/add.hpp>
|
||||
#include <boost/preprocessor/iteration/iterate.hpp>
|
||||
|
||||
#define BOOST_INTRUSIVE_MAX_CONSTRUCTOR_PARAMETERS 10
|
||||
|
||||
#define BOOST_INTRUSIVE_PP_IDENTITY(z, n, data) data
|
||||
|
||||
#define BOOST_INTRUSIVE_PP_DECLVAL(z, n, data) \
|
||||
boost::move_detail::declval< BOOST_PP_CAT(P, n) >() \
|
||||
//!
|
||||
|
||||
#define BOOST_INTRUSIVE_PP_TEMPLATE_PARAM_VOID_DEFAULT(z, n, data) \
|
||||
BOOST_PP_CAT(class P, n) = void \
|
||||
//!
|
||||
|
||||
#include <boost/intrusive/detail/config_end.hpp>
|
||||
|
||||
#endif //#ifndef BOOST_INTRUSIVE_DETAIL_PREPROCESSOR_HPP
|
22
cpp/BoostParts/boost/intrusive/detail/workaround.hpp
Normal file
22
cpp/BoostParts/boost/intrusive/detail/workaround.hpp
Normal file
@ -0,0 +1,22 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2005-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_INTRUSIVE_DETAIL_WRKRND_HPP
|
||||
#define BOOST_INTRUSIVE_DETAIL_WRKRND_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
|
||||
#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||
#define BOOST_INTRUSIVE_PERFECT_FORWARDING
|
||||
#endif
|
||||
|
||||
#include <boost/intrusive/detail/config_end.hpp>
|
||||
|
||||
#endif //#ifndef BOOST_INTRUSIVE_DETAIL_WRKRND_HPP
|
265
cpp/BoostParts/boost/intrusive/pointer_traits.hpp
Normal file
265
cpp/BoostParts/boost/intrusive/pointer_traits.hpp
Normal file
@ -0,0 +1,265 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Pablo Halpern 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)
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2011-2011. 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/intrusive for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_POINTER_TRAITS_HPP
|
||||
#define BOOST_INTRUSIVE_POINTER_TRAITS_HPP
|
||||
|
||||
#if (defined _MSC_VER) && (_MSC_VER >= 1200)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
#include <boost/intrusive/detail/memory_util.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <cstddef>
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
|
||||
//! pointer_traits is the implementation of C++11 std::pointer_traits class with some
|
||||
//! extensions like castings.
|
||||
//!
|
||||
//! pointer_traits supplies a uniform interface to certain attributes of pointer-like types.
|
||||
template <typename Ptr>
|
||||
struct pointer_traits
|
||||
{
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//!The pointer type
|
||||
//!queried by this pointer_traits instantiation
|
||||
typedef Ptr pointer;
|
||||
|
||||
//!Ptr::element_type if such a type exists; otherwise, T if Ptr is a class
|
||||
//!template instantiation of the form SomePointer<T, Args>, where Args is zero or
|
||||
//!more type arguments ; otherwise , the specialization is ill-formed.
|
||||
typedef unspecified_type element_type;
|
||||
|
||||
//!Ptr::difference_type if such a type exists; otherwise,
|
||||
//!std::ptrdiff_t.
|
||||
typedef unspecified_type difference_type;
|
||||
|
||||
//!Ptr::rebind<U> if such a type exists; otherwise, SomePointer<U, Args> if Ptr is
|
||||
//!a class template instantiation of the form SomePointer<T, Args>, where Args is zero or
|
||||
//!more type arguments ; otherwise, the instantiation of rebind is ill-formed.
|
||||
//!
|
||||
//!For portable code for C++03 and C++11, <pre>typename rebind_pointer<U>::type</pre>
|
||||
//!shall be used instead of rebind<U> to obtain a pointer to U.
|
||||
template <class U> using rebind = unspecified;
|
||||
|
||||
//!Ptr::rebind<U> if such a type exists; otherwise, SomePointer<U, Args> if Ptr is
|
||||
//!a class template instantiation of the form SomePointer<T, Args>, where Args is zero or
|
||||
//!more type arguments ; otherwise, the instantiation of rebind is ill-formed.
|
||||
//!
|
||||
typedef element_type &reference;
|
||||
#else
|
||||
typedef Ptr pointer;
|
||||
//
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT
|
||||
( boost::intrusive::detail::, Ptr, element_type
|
||||
, boost::intrusive::detail::first_param<Ptr>) element_type;
|
||||
//
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
|
||||
(boost::intrusive::detail::, Ptr, difference_type, std::ptrdiff_t) difference_type;
|
||||
//
|
||||
typedef typename boost::intrusive::detail::unvoid<element_type>::type& reference;
|
||||
//
|
||||
template <class U> struct rebind_pointer
|
||||
{
|
||||
typedef typename boost::intrusive::detail::type_rebinder<Ptr, U>::type type;
|
||||
};
|
||||
|
||||
#if !defined(BOOST_NO_TEMPLATE_ALIASES)
|
||||
template <class U> using rebind = typename boost::intrusive::detail::type_rebinder<Ptr, U>::type;
|
||||
#endif
|
||||
#endif //#if !defined(BOOST_NO_TEMPLATE_ALIASES)
|
||||
|
||||
//! <b>Remark</b>: If element_type is (possibly cv-qualified) void, r type is unspecified; otherwise,
|
||||
//! it is element_type &.
|
||||
//!
|
||||
//! <b>Returns</b>: A dereferenceable pointer to r obtained by calling Ptr::pointer_to(r).
|
||||
//! Non-standard extension: If such function does not exist, returns pointer(addressof(r));
|
||||
static pointer pointer_to(reference r)
|
||||
{
|
||||
//Non-standard extension, it does not require Ptr::pointer_to. If not present
|
||||
//tries to converts &r to pointer.
|
||||
const bool value = boost::intrusive::detail::
|
||||
has_member_function_callable_with_pointer_to
|
||||
<Ptr, typename boost::intrusive::detail::unvoid<element_type &>::type>::value;
|
||||
::boost::integral_constant<bool, value> flag;
|
||||
return pointer_traits::priv_pointer_to(flag, r);
|
||||
}
|
||||
|
||||
//! <b>Remark</b>: Non-standard extension.
|
||||
//!
|
||||
//! <b>Returns</b>: A dereferenceable pointer to r obtained by calling Ptr::static_cast_from(r).
|
||||
//! If such function does not exist, returns pointer_to(static_cast<element_type&>(*uptr))
|
||||
template<class UPtr>
|
||||
static pointer static_cast_from(const UPtr &uptr)
|
||||
{
|
||||
const bool value = boost::intrusive::detail::
|
||||
has_member_function_callable_with_static_cast_from
|
||||
<Ptr, const UPtr>::value;
|
||||
::boost::integral_constant<bool, value> flag;
|
||||
return pointer_traits::priv_static_cast_from(flag, uptr);
|
||||
}
|
||||
|
||||
//! <b>Remark</b>: Non-standard extension.
|
||||
//!
|
||||
//! <b>Returns</b>: A dereferenceable pointer to r obtained by calling Ptr::const_cast_from(r).
|
||||
//! If such function does not exist, returns pointer_to(const_cast<element_type&>(*uptr))
|
||||
template<class UPtr>
|
||||
static pointer const_cast_from(const UPtr &uptr)
|
||||
{
|
||||
const bool value = boost::intrusive::detail::
|
||||
has_member_function_callable_with_const_cast_from
|
||||
<Ptr, const UPtr>::value;
|
||||
::boost::integral_constant<bool, value> flag;
|
||||
return pointer_traits::priv_const_cast_from(flag, uptr);
|
||||
}
|
||||
|
||||
//! <b>Remark</b>: Non-standard extension.
|
||||
//!
|
||||
//! <b>Returns</b>: A dereferenceable pointer to r obtained by calling Ptr::dynamic_cast_from(r).
|
||||
//! If such function does not exist, returns pointer_to(*dynamic_cast<element_type*>(&*uptr))
|
||||
template<class UPtr>
|
||||
static pointer dynamic_cast_from(const UPtr &uptr)
|
||||
{
|
||||
const bool value = boost::intrusive::detail::
|
||||
has_member_function_callable_with_dynamic_cast_from
|
||||
<Ptr, const UPtr>::value;
|
||||
::boost::integral_constant<bool, value> flag;
|
||||
return pointer_traits::priv_dynamic_cast_from(flag, uptr);
|
||||
}
|
||||
|
||||
///@cond
|
||||
private:
|
||||
//priv_to_raw_pointer
|
||||
template <class T>
|
||||
static T* to_raw_pointer(T* p)
|
||||
{ return p; }
|
||||
|
||||
template <class Pointer>
|
||||
static typename pointer_traits<Pointer>::element_type*
|
||||
to_raw_pointer(const Pointer &p)
|
||||
{ return pointer_traits::to_raw_pointer(p.operator->()); }
|
||||
|
||||
//priv_pointer_to
|
||||
static pointer priv_pointer_to(boost::true_type, typename boost::intrusive::detail::unvoid<element_type>::type& r)
|
||||
{ return Ptr::pointer_to(r); }
|
||||
|
||||
static pointer priv_pointer_to(boost::false_type, typename boost::intrusive::detail::unvoid<element_type>::type& r)
|
||||
{ return pointer(boost::intrusive::detail::addressof(r)); }
|
||||
|
||||
//priv_static_cast_from
|
||||
template<class UPtr>
|
||||
static pointer priv_static_cast_from(boost::true_type, const UPtr &uptr)
|
||||
{ return Ptr::static_cast_from(uptr); }
|
||||
|
||||
template<class UPtr>
|
||||
static pointer priv_static_cast_from(boost::false_type, const UPtr &uptr)
|
||||
{ return pointer_to(static_cast<element_type&>(*uptr)); }
|
||||
|
||||
//priv_const_cast_from
|
||||
template<class UPtr>
|
||||
static pointer priv_const_cast_from(boost::true_type, const UPtr &uptr)
|
||||
{ return Ptr::const_cast_from(uptr); }
|
||||
|
||||
template<class UPtr>
|
||||
static pointer priv_const_cast_from(boost::false_type, const UPtr &uptr)
|
||||
{ return pointer_to(const_cast<element_type&>(*uptr)); }
|
||||
|
||||
//priv_dynamic_cast_from
|
||||
template<class UPtr>
|
||||
static pointer priv_dynamic_cast_from(boost::true_type, const UPtr &uptr)
|
||||
{ return Ptr::dynamic_cast_from(uptr); }
|
||||
|
||||
template<class UPtr>
|
||||
static pointer priv_dynamic_cast_from(boost::false_type, const UPtr &uptr)
|
||||
{ return pointer_to(*dynamic_cast<element_type*>(&*uptr)); }
|
||||
///@endcond
|
||||
};
|
||||
|
||||
///@cond
|
||||
|
||||
// Remove cv qualification from Ptr parameter to pointer_traits:
|
||||
template <typename Ptr>
|
||||
struct pointer_traits<const Ptr> : pointer_traits<Ptr> {};
|
||||
template <typename Ptr>
|
||||
struct pointer_traits<volatile Ptr> : pointer_traits<Ptr> { };
|
||||
template <typename Ptr>
|
||||
struct pointer_traits<const volatile Ptr> : pointer_traits<Ptr> { };
|
||||
// Remove reference from Ptr parameter to pointer_traits:
|
||||
template <typename Ptr>
|
||||
struct pointer_traits<Ptr&> : pointer_traits<Ptr> { };
|
||||
|
||||
///@endcond
|
||||
|
||||
//! Specialization of pointer_traits for raw pointers
|
||||
//!
|
||||
template <typename T>
|
||||
struct pointer_traits<T*>
|
||||
{
|
||||
typedef T element_type;
|
||||
typedef T* pointer;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
typedef T & reference;
|
||||
//!typedef for <pre>U *</pre>
|
||||
//!
|
||||
//!For portable code for C++03 and C++11, <pre>typename rebind_pointer<U>::type</pre>
|
||||
//!shall be used instead of rebind<U> to obtain a pointer to U.
|
||||
template <class U> using rebind = U*;
|
||||
#else
|
||||
typedef typename boost::intrusive::detail::unvoid<element_type>::type& reference;
|
||||
#if !defined(BOOST_NO_TEMPLATE_ALIASES)
|
||||
template <class U> using rebind = U*;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
template <class U> struct rebind_pointer
|
||||
{ typedef U* type; };
|
||||
|
||||
//! <b>Returns</b>: addressof(r)
|
||||
//!
|
||||
static pointer pointer_to(reference r)
|
||||
{ return boost::intrusive::detail::addressof(r); }
|
||||
|
||||
//! <b>Returns</b>: static_cast<pointer>(uptr)
|
||||
//!
|
||||
template<class U>
|
||||
static pointer static_cast_from(U *uptr)
|
||||
{ return static_cast<pointer>(uptr); }
|
||||
|
||||
//! <b>Returns</b>: const_cast<pointer>(uptr)
|
||||
//!
|
||||
template<class U>
|
||||
static pointer const_cast_from(U *uptr)
|
||||
{ return const_cast<pointer>(uptr); }
|
||||
|
||||
//! <b>Returns</b>: dynamic_cast<pointer>(uptr)
|
||||
//!
|
||||
template<class U>
|
||||
static pointer dynamic_cast_from(U *uptr)
|
||||
{ return dynamic_cast<pointer>(uptr); }
|
||||
};
|
||||
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
#include <boost/intrusive/detail/config_end.hpp>
|
||||
|
||||
#endif // ! defined(BOOST_INTRUSIVE_POINTER_TRAITS_HPP)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user