diff --git a/cpp/BoostParts/CMakeLists.txt b/cpp/BoostParts/CMakeLists.txt index 216bd52f..82a4c659 100644 --- a/cpp/BoostParts/CMakeLists.txt +++ b/cpp/BoostParts/CMakeLists.txt @@ -84,7 +84,7 @@ endif() # that prevents this from happening. Also present in cpp/ycm/CMakeLists.txt. # See here for more details: https://svn.boost.org/trac/boost/ticket/7671 # TODO: remove this when it's fixed upstream (probably boost 1.53). -add_definitions( -DBOOST_THREAD_DONT_USE_CHRONO ) +#add_definitions( -DBOOST_THREAD_DONT_USE_CHRONO ) if( MSVC ) # BOOST_PYTHON_SOURCE makes boost use the correct __declspec and diff --git a/cpp/BoostParts/boost/algorithm/string/detail/find_format.hpp b/cpp/BoostParts/boost/algorithm/string/detail/find_format.hpp index 8b9ad427..1612b937 100644 --- a/cpp/BoostParts/boost/algorithm/string/detail/find_format.hpp +++ b/cpp/BoostParts/boost/algorithm/string/detail/find_format.hpp @@ -56,7 +56,7 @@ namespace boost { // Copy the beginning of the sequence Output = std::copy( ::boost::begin(Input), ::boost::begin(M), Output ); // Format find result - // Copy formated result + // Copy formatted result Output = std::copy( ::boost::begin(M.format_result()), ::boost::end(M.format_result()), Output ); // Copy the rest of the sequence Output = std::copy( M.end(), ::boost::end(Input), Output ); @@ -118,11 +118,11 @@ namespace boost { InputT Output; // Copy the beginning of the sequence - insert( Output, ::boost::end(Output), ::boost::begin(Input), M.begin() ); - // Copy formated result - insert( Output, ::boost::end(Output), M.format_result() ); + boost::algorithm::detail::insert( Output, ::boost::end(Output), ::boost::begin(Input), M.begin() ); + // Copy formatted result + boost::algorithm::detail::insert( Output, ::boost::end(Output), M.format_result() ); // Copy the rest of the sequence - insert( Output, ::boost::end(Output), M.end(), ::boost::end(Input) ); + boost::algorithm::detail::insert( Output, ::boost::end(Output), M.end(), ::boost::end(Input) ); return Output; } diff --git a/cpp/BoostParts/boost/algorithm/string/detail/find_format_all.hpp b/cpp/BoostParts/boost/algorithm/string/detail/find_format_all.hpp index 978710c9..51ad5667 100644 --- a/cpp/BoostParts/boost/algorithm/string/detail/find_format_all.hpp +++ b/cpp/BoostParts/boost/algorithm/string/detail/find_format_all.hpp @@ -58,7 +58,7 @@ namespace boost { { // Copy the beginning of the sequence Output = std::copy( LastMatch, M.begin(), Output ); - // Copy formated result + // Copy formatted result Output = std::copy( ::boost::begin(M.format_result()), ::boost::end(M.format_result()), Output ); // Proceed to the next match @@ -134,9 +134,9 @@ namespace boost { while( M ) { // Copy the beginning of the sequence - insert( Output, ::boost::end(Output), LastMatch, M.begin() ); - // Copy formated result - insert( Output, ::boost::end(Output), M.format_result() ); + boost::algorithm::detail::insert( Output, ::boost::end(Output), LastMatch, M.begin() ); + // Copy formatted result + boost::algorithm::detail::insert( Output, ::boost::end(Output), M.format_result() ); // Proceed to the next match LastMatch=M.end(); @@ -218,7 +218,7 @@ namespace boost { // Adjust search iterator SearchIt=M.end(); - // Copy formated replace to the storage + // Copy formatted replace to the storage ::boost::algorithm::detail::copy_to_storage( Storage, M.format_result() ); // Find range for a next match diff --git a/cpp/BoostParts/boost/algorithm/string/detail/finder.hpp b/cpp/BoostParts/boost/algorithm/string/detail/finder.hpp index 45bcb7d3..93310d05 100644 --- a/cpp/BoostParts/boost/algorithm/string/detail/finder.hpp +++ b/cpp/BoostParts/boost/algorithm/string/detail/finder.hpp @@ -92,7 +92,7 @@ namespace boost { // find last functor -----------------------------------------------// - // find the last match a subseqeunce in the sequence ( functor ) + // find the last match a subsequence in the sequence ( functor ) /* Returns a pair marking the subsequence in the sequence. If the find fails, returns diff --git a/cpp/BoostParts/boost/algorithm/string/detail/finder_regex.hpp b/cpp/BoostParts/boost/algorithm/string/detail/finder_regex.hpp index 673d93a5..01bf5a08 100644 --- a/cpp/BoostParts/boost/algorithm/string/detail/finder_regex.hpp +++ b/cpp/BoostParts/boost/algorithm/string/detail/finder_regex.hpp @@ -60,14 +60,14 @@ namespace boost { return *this; } - // Match result retrival + // Match result retrieval const match_results_type& match_results() const { return m_MatchResults; } private: - // Saved matchresult + // Saved match result match_results_type m_MatchResults; }; diff --git a/cpp/BoostParts/boost/algorithm/string/find.hpp b/cpp/BoostParts/boost/algorithm/string/find.hpp index cc99ca1c..da1cb616 100644 --- a/cpp/BoostParts/boost/algorithm/string/find.hpp +++ b/cpp/BoostParts/boost/algorithm/string/find.hpp @@ -86,7 +86,7 @@ namespace boost { //! Find first algorithm ( case insensitive ) /*! - Search for the first occurence of the substring in the input. + Search for the first occurrence of the substring in the input. Searching is case insensitive. \param Input A string which will be searched. @@ -293,7 +293,7 @@ namespace boost { If the "token compress mode" is enabled, adjacent tokens are considered to be one match. \param Input A input string. - \param Pred An unary predicate to identify a token + \param Pred A unary predicate to identify a token \param eCompress Enable/Disable compressing of adjacent tokens \return An \c iterator_range delimiting the match. diff --git a/cpp/BoostParts/boost/algorithm/string/find_iterator.hpp b/cpp/BoostParts/boost/algorithm/string/find_iterator.hpp index b72ba7c7..07a909e1 100644 --- a/cpp/BoostParts/boost/algorithm/string/find_iterator.hpp +++ b/cpp/BoostParts/boost/algorithm/string/find_iterator.hpp @@ -132,7 +132,10 @@ namespace boost { // increment void increment() { - m_Match=this->do_find(m_Match.end(),m_End); + if(m_Match.begin() == m_Match.end()) + m_Match=this->do_find(m_Match.end(),m_End); + else + m_Match=this->do_find(m_Match.begin()+1,m_End); } // comparison diff --git a/cpp/BoostParts/boost/algorithm/string/formatter.hpp b/cpp/BoostParts/boost/algorithm/string/formatter.hpp index ab5921e7..c2c13eb2 100644 --- a/cpp/BoostParts/boost/algorithm/string/formatter.hpp +++ b/cpp/BoostParts/boost/algorithm/string/formatter.hpp @@ -39,7 +39,7 @@ namespace boost { Constructs a \c const_formatter. Const formatter always returns the same value, regardless of the parameter. - \param Format A predefined value used as a result for formating + \param Format A predefined value used as a result for formatting \return An instance of the \c const_formatter object. */ template @@ -95,7 +95,7 @@ namespace boost { to extract a portion of the formatted sequence. The first finder's match is returned as a result - \param Finder a finder used to select a portion of the formated sequence + \param Finder a finder used to select a portion of the formatted sequence \return An instance of the \c dissect_formatter object. */ template diff --git a/cpp/BoostParts/boost/algorithm/string/predicate_facade.hpp b/cpp/BoostParts/boost/algorithm/string/predicate_facade.hpp index c8319f7e..a9753fc2 100644 --- a/cpp/BoostParts/boost/algorithm/string/predicate_facade.hpp +++ b/cpp/BoostParts/boost/algorithm/string/predicate_facade.hpp @@ -15,7 +15,7 @@ /* \file boost/algorith/string/predicate_facade.hpp - This file containes predicate_facade definition. This template class is used + This file contains predicate_facade definition. This template class is used to identify classification predicates, so they can be combined using composition operators. */ diff --git a/cpp/BoostParts/boost/algorithm/string/regex_find_format.hpp b/cpp/BoostParts/boost/algorithm/string/regex_find_format.hpp index f698004a..409afc2b 100644 --- a/cpp/BoostParts/boost/algorithm/string/regex_find_format.hpp +++ b/cpp/BoostParts/boost/algorithm/string/regex_find_format.hpp @@ -32,7 +32,7 @@ namespace boost { Construct the \c regex_finder. Finder uses the regex engine to search for a match. Result is given in \c regex_search_result. This is an extension - of the iterator_range. In addition it containes match results + of the iterator_range. In addition it contains match results from the \c regex_search algorithm. \param Rx A regular expression diff --git a/cpp/BoostParts/boost/algorithm/string/trim.hpp b/cpp/BoostParts/boost/algorithm/string/trim.hpp index eb408a35..be57cd92 100644 --- a/cpp/BoostParts/boost/algorithm/string/trim.hpp +++ b/cpp/BoostParts/boost/algorithm/string/trim.hpp @@ -50,7 +50,7 @@ namespace boost { \param Output An output iterator to which the result will be copied \param Input An input range - \param IsSpace An unary predicate identifying spaces + \param IsSpace A unary predicate identifying spaces \return An output iterator pointing just after the last inserted character or a copy of the input @@ -118,7 +118,7 @@ namespace boost { The input sequence is modified in-place. \param Input An input sequence - \param IsSpace An unary predicate identifying spaces + \param IsSpace A unary predicate identifying spaces */ template inline void trim_left_if(SequenceT& Input, PredicateT IsSpace) @@ -158,7 +158,7 @@ namespace boost { \param Output An output iterator to which the result will be copied \param Input An input range - \param IsSpace An unary predicate identifying spaces + \param IsSpace A unary predicate identifying spaces \return An output iterator pointing just after the last inserted character or a copy of the input @@ -228,7 +228,7 @@ namespace boost { The input sequence is modified in-place. \param Input An input sequence - \param IsSpace An unary predicate identifying spaces + \param IsSpace A unary predicate identifying spaces */ template inline void trim_right_if(SequenceT& Input, PredicateT IsSpace) @@ -270,7 +270,7 @@ namespace boost { \param Output An output iterator to which the result will be copied \param Input An input range - \param IsSpace An unary predicate identifying spaces + \param IsSpace A unary predicate identifying spaces \return An output iterator pointing just after the last inserted character or a copy of the input @@ -352,7 +352,7 @@ namespace boost { The input sequence is modified in-place. \param Input An input sequence - \param IsSpace An unary predicate identifying spaces + \param IsSpace A unary predicate identifying spaces */ template inline void trim_if(SequenceT& Input, PredicateT IsSpace) diff --git a/cpp/BoostParts/boost/algorithm/string_regex.hpp b/cpp/BoostParts/boost/algorithm/string_regex.hpp index 6fd8ad9f..791aa184 100644 --- a/cpp/BoostParts/boost/algorithm/string_regex.hpp +++ b/cpp/BoostParts/boost/algorithm/string_regex.hpp @@ -13,7 +13,7 @@ /*! \file Cumulative include for string_algo library. - In addtion to string.hpp contains also regex-related stuff. + In addition to string.hpp contains also regex-related stuff. */ #include diff --git a/cpp/BoostParts/boost/archive/archive_exception.hpp b/cpp/BoostParts/boost/archive/archive_exception.hpp index b5f33f68..e27807bc 100644 --- a/cpp/BoostParts/boost/archive/archive_exception.hpp +++ b/cpp/BoostParts/boost/archive/archive_exception.hpp @@ -43,6 +43,8 @@ namespace archive { class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) archive_exception : public virtual std::exception { +protected: + char m_buffer[128]; public: typedef enum { no_exception, // initialized without code @@ -74,8 +76,6 @@ public: // type has been instantiated in more than one module. output_stream_error // error on input stream } exception_code; -protected: - std::string m_msg; public: exception_code code; archive_exception( @@ -83,9 +83,11 @@ public: const char * e1 = NULL, const char * e2 = NULL ); - ~archive_exception() throw (); - virtual const char *what( ) const throw(); + virtual ~archive_exception() throw(); + virtual const char *what() const throw(); protected: + unsigned int + append(unsigned int l, const char * a); archive_exception(); }; diff --git a/cpp/BoostParts/boost/archive/impl/basic_text_iprimitive.ipp b/cpp/BoostParts/boost/archive/impl/basic_text_iprimitive.ipp index ad6a6d58..16378b84 100644 --- a/cpp/BoostParts/boost/archive/impl/basic_text_iprimitive.ipp +++ b/cpp/BoostParts/boost/archive/impl/basic_text_iprimitive.ipp @@ -86,23 +86,21 @@ basic_text_iprimitive::load_binary( ,CharType > binary; - - binary ti_begin = binary( + + binary i = binary( BOOST_MAKE_PFTO_WRAPPER( iterators::istream_iterator(is) ) ); - + char * caddr = static_cast(address); // take care that we don't increment anymore than necessary - while(--count > 0){ - *caddr++ = static_cast(*ti_begin); - ++ti_begin; + while(count-- > 0){ + *caddr++ = static_cast(*i++); } - *caddr++ = static_cast(*ti_begin); - - iterators::istream_iterator i; + + // skip over any excess input for(;;){ BOOST_DEDUCED_TYPENAME IStream::int_type r; r = is.get(); @@ -112,7 +110,7 @@ basic_text_iprimitive::load_binary( break; } } - + template BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_text_iprimitive::basic_text_iprimitive( diff --git a/cpp/BoostParts/boost/archive/impl/basic_text_oprimitive.ipp b/cpp/BoostParts/boost/archive/impl/basic_text_oprimitive.ipp index cacab617..7e4315c0 100644 --- a/cpp/BoostParts/boost/archive/impl/basic_text_oprimitive.ipp +++ b/cpp/BoostParts/boost/archive/impl/basic_text_oprimitive.ipp @@ -51,7 +51,7 @@ basic_text_oprimitive::save_binary( 8 > > - ,72 + ,76 ,const char // cwpro8 needs this > base64_text; diff --git a/cpp/BoostParts/boost/archive/iterators/binary_from_base64.hpp b/cpp/BoostParts/boost/archive/iterators/binary_from_base64.hpp index 60f23f39..2fe8292f 100644 --- a/cpp/BoostParts/boost/archive/iterators/binary_from_base64.hpp +++ b/cpp/BoostParts/boost/archive/iterators/binary_from_base64.hpp @@ -43,7 +43,7 @@ struct to_6_bit { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63, - 52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1, + 52,53,54,55,56,57,58,59,60,61,-1,-1,-1, 0,-1,-1, // render '=' as 0 -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14, 15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1, -1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40, diff --git a/cpp/BoostParts/boost/archive/iterators/istream_iterator.hpp b/cpp/BoostParts/boost/archive/iterators/istream_iterator.hpp index 1df612dc..478f112f 100644 --- a/cpp/BoostParts/boost/archive/iterators/istream_iterator.hpp +++ b/cpp/BoostParts/boost/archive/iterators/istream_iterator.hpp @@ -49,16 +49,17 @@ class istream_iterator : > super_t; typedef BOOST_DEDUCED_TYPENAME std::basic_istream istream_type; - //Access the value referred to - Elem dereference() const { - return m_current_value; - } - bool equal(const this_t & rhs) const { // note: only works for comparison against end of stream return m_istream == rhs.m_istream; } +/* + //Access the value referred to + Elem dereference() const { + return m_current_value; + } + void increment(){ if(NULL != m_istream){ m_current_value = static_cast(m_istream->get()); @@ -67,6 +68,17 @@ class istream_iterator : } } } +*/ + //Access the value referred to + Elem dereference() const { + return m_istream->peek(); + } + + void increment(){ + if(NULL != m_istream){ + m_istream->ignore(1); + } + } istream_type *m_istream; Elem m_current_value; @@ -74,7 +86,7 @@ public: istream_iterator(istream_type & is) : m_istream(& is) { - increment(); + //increment(); } istream_iterator() : diff --git a/cpp/BoostParts/boost/archive/iterators/transform_width.hpp b/cpp/BoostParts/boost/archive/iterators/transform_width.hpp index 6e2c5266..5a5c7b75 100644 --- a/cpp/BoostParts/boost/archive/iterators/transform_width.hpp +++ b/cpp/BoostParts/boost/archive/iterators/transform_width.hpp @@ -24,8 +24,6 @@ // character and 8 bit bytes. Lowest common multiple is 24 => 4 6 bit characters // or 3 8 bit characters -#include - #include // for BOOST_DEDUCED_TYPENAME & PTFO #include @@ -66,101 +64,105 @@ class transform_width : typedef transform_width this_t; typedef BOOST_DEDUCED_TYPENAME iterator_value::type base_value_type; - CharType fill(); - - CharType dereference_impl(){ - if(! m_full){ - m_current_value = fill(); - m_full = true; - } - return m_current_value; - } + void fill(); CharType dereference() const { - return const_cast(this)->dereference_impl(); + if(!m_buffer_out_full) + const_cast(this)->fill(); + return m_buffer_out; } - // test for iterator equality + bool equal_impl(const this_t & rhs){ + if(BitsIn < BitsOut) // discard any left over bits + return this->base_reference() == rhs.base_reference(); + else{ + // BitsIn > BitsOut // zero fill + if(this->base_reference() == rhs.base_reference()){ + m_end_of_sequence = true; + return 0 == m_remaining_bits; + } + return false; + } + } + + // standard iterator interface bool equal(const this_t & rhs) const { - return - this->base_reference() == rhs.base_reference(); - ; + return const_cast(this)->equal_impl(rhs); } void increment(){ - m_displacement += BitsOut; - - while(m_displacement >= BitsIn){ - m_displacement -= BitsIn; - if(0 == m_displacement) - m_bufferfull = false; - if(! m_bufferfull){ - // note: suspect that this is not invoked for borland - ++(this->base_reference()); - } - } - m_full = false; + m_buffer_out_full = false; } - CharType m_current_value; - // number of bits left in current input character buffer - unsigned int m_displacement; - base_value_type m_buffer; - // flag to current output character is ready - just used to save time - bool m_full; - // flag to indicate that m_buffer has data - bool m_bufferfull; + bool m_buffer_out_full; + CharType m_buffer_out; + + // last read element from input + base_value_type m_buffer_in; + + // number of bits to left in the input buffer. + unsigned int m_remaining_bits; + + // flag to indicate we've reached end of data. + bool m_end_of_sequence; public: // make composible buy using templated constructor template transform_width(BOOST_PFTO_WRAPPER(T) start) : super_t(Base(BOOST_MAKE_PFTO_WRAPPER(static_cast< T >(start)))), - m_displacement(0), - m_full(false), - m_bufferfull(false) + m_buffer_out_full(false), + m_remaining_bits(0), + m_end_of_sequence(false) {} // intel 7.1 doesn't like default copy constructor transform_width(const transform_width & rhs) : super_t(rhs.base_reference()), - m_current_value(rhs.m_current_value), - m_displacement(rhs.m_displacement), - m_buffer(rhs.m_buffer), - m_full(rhs.m_full), - m_bufferfull(rhs.m_bufferfull) + m_buffer_out_full(rhs.m_buffer_out_full), + m_remaining_bits(rhs.m_remaining_bits), + m_buffer_in(rhs.m_buffer_in), + m_end_of_sequence(false) {} }; -template -CharType transform_width::fill(){ - CharType retval = 0; +template< + class Base, + int BitsOut, + int BitsIn, + class CharType +> +void transform_width::fill() { unsigned int missing_bits = BitsOut; - for(;;){ - unsigned int bcount; - if(! m_bufferfull){ - m_buffer = * this->base_reference(); - m_bufferfull = true; - bcount = BitsIn; + m_buffer_out = 0; + do{ + if(0 == m_remaining_bits){ + if(m_end_of_sequence){ + m_buffer_in = 0; + m_remaining_bits = missing_bits; + } + else{ + m_buffer_in = * this->base_reference()++; + m_remaining_bits = BitsIn; + } } - else - bcount = BitsIn - m_displacement; - unsigned int i = (std::min)(bcount, missing_bits); + + // append these bits to the next output + // up to the size of the output + unsigned int i = std::min(missing_bits, m_remaining_bits); // shift interesting bits to least significant position - unsigned int j = m_buffer >> (bcount - i); - // strip off uninteresting bits - // (note presumption of two's complement arithmetic) - j &= ~(-(1 << i)); + base_value_type j = m_buffer_in >> (m_remaining_bits - i); + // and mask off the un interesting higher bits + // note presumption of twos complement notation + j &= (1 << i) - 1; // append then interesting bits to the output value - retval <<= i; - retval |= j; + m_buffer_out <<= i; + m_buffer_out |= j; + + // and update counters missing_bits -= i; - if(0 == missing_bits) - break; - // note: suspect that this is not invoked for borland 5.51 - ++(this->base_reference()); - m_bufferfull = false; - } - return retval; + m_remaining_bits -= i; + }while(0 < missing_bits); + m_buffer_out_full = true; } } // namespace iterators diff --git a/cpp/BoostParts/boost/chrono/config.hpp b/cpp/BoostParts/boost/chrono/config.hpp index 7812dadf..d892ec83 100644 --- a/cpp/BoostParts/boost/chrono/config.hpp +++ b/cpp/BoostParts/boost/chrono/config.hpp @@ -28,7 +28,7 @@ #if ! defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT \ && ! defined BOOST_CHRONO_DONT_PROVIDE_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT -# define BOOST_CHRONO_DONT_PROVIDE_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT +# define BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT #endif @@ -96,6 +96,9 @@ # undef BOOST_CHRONO_HAS_THREAD_CLOCK # undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY # endif +# if defined(__VXWORKS__) +# undef BOOST_CHRONO_HAS_PROCESS_CLOCKS +# endif # endif #if defined(BOOST_CHRONO_THREAD_DISABLED) && defined(BOOST_CHRONO_HAS_THREAD_CLOCK) @@ -130,7 +133,7 @@ #if defined( BOOST_NO_CXX11_NUMERIC_LIMITS ) # define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW throw() #else -#ifdef BOOST_NO_NOEXCEPT +#ifdef BOOST_NO_CXX11_NOEXCEPT # define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW throw() #else # define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW noexcept diff --git a/cpp/BoostParts/boost/chrono/detail/inlined/win/chrono.hpp b/cpp/BoostParts/boost/chrono/detail/inlined/win/chrono.hpp index 75160dba..17dae964 100644 --- a/cpp/BoostParts/boost/chrono/detail/inlined/win/chrono.hpp +++ b/cpp/BoostParts/boost/chrono/detail/inlined/win/chrono.hpp @@ -98,8 +98,12 @@ namespace chrono_detail #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)); + return system_clock::time_point( + system_clock::duration( + ((static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime) + -116444736000000000LL + ) + ); } #if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING @@ -129,12 +133,6 @@ namespace chrono_detail { __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( temp ); } @@ -145,12 +143,6 @@ namespace chrono_detail __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)); } diff --git a/cpp/BoostParts/boost/chrono/duration.hpp b/cpp/BoostParts/boost/chrono/duration.hpp index 97fe3d75..f39346c0 100644 --- a/cpp/BoostParts/boost/chrono/duration.hpp +++ b/cpp/BoostParts/boost/chrono/duration.hpp @@ -417,7 +417,7 @@ struct common_type, namespace chrono { template - class duration + class BOOST_SYMBOL_VISIBLE duration { //BOOST_CHRONO_STATIC_ASSERT(boost::is_integral::value, BOOST_CHRONO_A_DURATION_REPRESENTATION_MUST_BE_INTEGRAL, ()); BOOST_CHRONO_STATIC_ASSERT(!boost::chrono::detail::is_duration::value, @@ -436,7 +436,7 @@ namespace chrono { BOOST_CONSTEXPR duration() : rep_(duration_values::zero()) { } template - BOOST_CONSTEXPR + BOOST_SYMBOL_VISIBLE inline BOOST_CONSTEXPR explicit duration(const Rep2& r , typename boost::enable_if < mpl::and_ < @@ -452,8 +452,7 @@ namespace chrono { >::type* = 0 ) : rep_(r) { } //~duration() {} //= default; - //BOOST_CONSTEXPR - //duration(const duration& rhs) : rep_(rhs.rep_) {} // = default; +// BOOST_CONSTEXPR duration(const duration& rhs) : rep_(rhs.rep_) {} // = default; duration& operator=(const duration& rhs) // = default; { if (&rhs != this) rep_= rhs.rep_; diff --git a/cpp/BoostParts/boost/config/auto_link.hpp b/cpp/BoostParts/boost/config/auto_link.hpp index ad021f40..e36d06a0 100644 --- a/cpp/BoostParts/boost/config/auto_link.hpp +++ b/cpp/BoostParts/boost/config/auto_link.hpp @@ -60,14 +60,14 @@ BOOST_LIB_THREAD_OPT: "-mt" for multithread builds, otherwise nothing. BOOST_LIB_RT_OPT: A suffix that indicates the runtime library used, contains one or more of the following letters after - a hiphen: + a hyphen: s static runtime (dynamic if not present). g debug/diagnostic runtime (release if not present). y Python debug/diagnostic runtime (release if not present). d debug build (release if not present). - g debug/diagnostic runtime (release if not present). - p STLPort Build. + p STLport build. + n STLport build without its IOStreams. BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. @@ -114,68 +114,69 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. // select toolset if not defined already: // #ifndef BOOST_LIB_TOOLSET -// Note: no compilers before 1200 are supported -#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300) +# if defined(BOOST_MSVC) && (BOOST_MSVC < 1200) + // Note: no compilers before 1200 are supported +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1300) + +# ifdef UNDER_CE + // eVC4: +# define BOOST_LIB_TOOLSET "evc4" +# else + // vc6: +# define BOOST_LIB_TOOLSET "vc6" +# endif + +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1310) + + // vc7: +# define BOOST_LIB_TOOLSET "vc7" + +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1400) + + // vc71: +# define BOOST_LIB_TOOLSET "vc71" + +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1500) + + // vc80: +# define BOOST_LIB_TOOLSET "vc80" + +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1600) + + // vc90: +# define BOOST_LIB_TOOLSET "vc90" + +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1700) + + // vc10: +# define BOOST_LIB_TOOLSET "vc100" + +# elif defined(BOOST_MSVC) + + // vc11: +# define BOOST_LIB_TOOLSET "vc110" + +# elif defined(__BORLANDC__) + + // CBuilder 6: +# define BOOST_LIB_TOOLSET "bcb" + +# elif defined(__ICL) + + // Intel C++, no version number: +# define BOOST_LIB_TOOLSET "iw" + +# elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF ) + + // Metrowerks CodeWarrior 8.x +# define BOOST_LIB_TOOLSET "cw8" + +# elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF ) + + // Metrowerks CodeWarrior 9.x +# define BOOST_LIB_TOOLSET "cw9" -# ifdef UNDER_CE - // vc6: -# define BOOST_LIB_TOOLSET "evc4" -# else - // vc6: -# define BOOST_LIB_TOOLSET "vc6" # endif - -#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1300) - - // vc7: -# define BOOST_LIB_TOOLSET "vc7" - -#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1310) - - // vc71: -# define BOOST_LIB_TOOLSET "vc71" - -#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1400) - - // vc80: -# define BOOST_LIB_TOOLSET "vc80" - -#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1500) - - // vc90: -# define BOOST_LIB_TOOLSET "vc90" - -#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1600) - - // vc10: -# define BOOST_LIB_TOOLSET "vc100" - -#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1700) - - // vc11: -# define BOOST_LIB_TOOLSET "vc110" - -#elif defined(__BORLANDC__) - - // CBuilder 6: -# define BOOST_LIB_TOOLSET "bcb" - -#elif defined(__ICL) - - // Intel C++, no version number: -# define BOOST_LIB_TOOLSET "iw" - -#elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF ) - - // Metrowerks CodeWarrior 8.x -# define BOOST_LIB_TOOLSET "cw8" - -#elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF ) - - // Metrowerks CodeWarrior 9.x -# define BOOST_LIB_TOOLSET "cw9" - -#endif #endif // BOOST_LIB_TOOLSET // @@ -201,11 +202,11 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. # elif defined(_DEBUG)\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-gydp" -# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1") +# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") # error "Build options aren't compatible with pre-built libraries" # elif defined(_DEBUG) # define BOOST_LIB_RT_OPT "-gdp" -# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1") +# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") # error "Build options aren't compatible with pre-built libraries" # else # define BOOST_LIB_RT_OPT "-p" @@ -221,11 +222,11 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. # elif defined(_DEBUG)\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-gydpn" -# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1") +# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") # error "Build options aren't compatible with pre-built libraries" # elif defined(_DEBUG) # define BOOST_LIB_RT_OPT "-gdpn" -# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1") +# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") # error "Build options aren't compatible with pre-built libraries" # else # define BOOST_LIB_RT_OPT "-pn" @@ -255,11 +256,11 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. # elif defined(_DEBUG)\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-sgydp" -# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1") +# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") # error "Build options aren't compatible with pre-built libraries" # elif defined(_DEBUG) # define BOOST_LIB_RT_OPT "-sgdp" -# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1") +# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") # error "Build options aren't compatible with pre-built libraries" # else # define BOOST_LIB_RT_OPT "-sp" @@ -275,11 +276,11 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. # elif defined(_DEBUG)\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-sgydpn" -# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1") +# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") # error "Build options aren't compatible with pre-built libraries" # elif defined(_DEBUG) # define BOOST_LIB_RT_OPT "-sgdpn" -# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1") +# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") # error "Build options aren't compatible with pre-built libraries" # else # define BOOST_LIB_RT_OPT "-spn" @@ -312,7 +313,7 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. // sanity check: // #if defined(__STL_DEBUG) || defined(_STLP_DEBUG) -#error "Pre-built versions of the Boost libraries are not provided in STLPort-debug form" +#error "Pre-built versions of the Boost libraries are not provided in STLport-debug form" #endif # ifdef _RTLDLL diff --git a/cpp/BoostParts/boost/config/compiler/clang.hpp b/cpp/BoostParts/boost/config/compiler/clang.hpp index aab3c610..18d6e546 100644 --- a/cpp/BoostParts/boost/config/compiler/clang.hpp +++ b/cpp/BoostParts/boost/config/compiler/clang.hpp @@ -29,6 +29,15 @@ // Clang supports "long long" in all compilation modes. #define BOOST_HAS_LONG_LONG +// +// Dynamic shared object (DSO) and dynamic-link library (DLL) support +// +#if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32) +# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default"))) +# define BOOST_SYMBOL_IMPORT +# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) +#endif + #if !__has_feature(cxx_auto_type) # define BOOST_NO_CXX11_AUTO_DECLARATIONS # define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS diff --git a/cpp/BoostParts/boost/config/compiler/gcc.hpp b/cpp/BoostParts/boost/config/compiler/gcc.hpp index de8875cd..c0ac30af 100644 --- a/cpp/BoostParts/boost/config/compiler/gcc.hpp +++ b/cpp/BoostParts/boost/config/compiler/gcc.hpp @@ -146,6 +146,12 @@ # endif #endif +// +// Recent GCC versions have __int128 when in 64-bit mode: +// +#if defined(__SIZEOF_INT128__) +# define BOOST_HAS_INT128 +#endif // C++0x features in 4.3.n and later // diff --git a/cpp/BoostParts/boost/config/compiler/visualc.hpp b/cpp/BoostParts/boost/config/compiler/visualc.hpp index 0b11faaf..aa4584df 100644 --- a/cpp/BoostParts/boost/config/compiler/visualc.hpp +++ b/cpp/BoostParts/boost/config/compiler/visualc.hpp @@ -183,6 +183,16 @@ # define BOOST_NO_RTTI #endif +// +// TR1 features: +// +#if _MSC_VER >= 1700 +// # define BOOST_HAS_TR1_HASH // don't know if this is true yet. +// # define BOOST_HAS_TR1_TYPE_TRAITS // don't know if this is true yet. +# define BOOST_HAS_TR1_UNORDERED_MAP +# define BOOST_HAS_TR1_UNORDERED_SET +#endif + // // C++0x features // diff --git a/cpp/BoostParts/boost/config/stdlib/dinkumware.hpp b/cpp/BoostParts/boost/config/stdlib/dinkumware.hpp index e0032b9d..30588517 100644 --- a/cpp/BoostParts/boost/config/stdlib/dinkumware.hpp +++ b/cpp/BoostParts/boost/config/stdlib/dinkumware.hpp @@ -113,9 +113,10 @@ #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 implemented in 540 (as shipped by Microsoft) // -// C++0x headers not yet (fully) implemented: -// +#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 540 # define BOOST_NO_CXX11_HDR_TYPE_TRAITS # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE @@ -125,6 +126,12 @@ # define BOOST_NO_CXX11_HDR_THREAD # define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ATOMIC_SMART_PTR +#endif + +// +// C++0x headers not yet (fully) implemented: +// +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #ifdef _CPPLIB_VER # define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER diff --git a/cpp/BoostParts/boost/config/suffix.hpp b/cpp/BoostParts/boost/config/suffix.hpp index 2d248132..8ee88d90 100644 --- a/cpp/BoostParts/boost/config/suffix.hpp +++ b/cpp/BoostParts/boost/config/suffix.hpp @@ -1,4 +1,5 @@ // Boost config.hpp configuration header file ------------------------------// +// boostinspect:ndprecated_macros -- tell the inspect tool to ignore this file // Copyright (c) 2001-2003 John Maddock // Copyright (c) 2001 Darin Adler @@ -488,6 +489,18 @@ namespace boost{ # endif } #endif +// same again for __int128: +#if defined(BOOST_HAS_INT128) && defined(__cplusplus) +namespace boost{ +# ifdef __GNUC__ + __extension__ typedef __int128 int128_type; + __extension__ typedef unsigned __int128 uint128_type; +# else + typedef __int128 int128_type; + typedef unsigned __int128 uint128_type; +# endif +} +#endif // BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------// // @@ -647,8 +660,8 @@ namespace std{ using ::type_info; } // Use BOOST_NO_CXX11_HDR_UNORDERED_SET or BOOST_NO_CXX11_HDR_UNORDERED_MAP // instead of BOOST_NO_STD_UNORDERED #if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) || defined (BOOST_NO_CXX11_HDR_UNORDERED_SET) -# ifndef BOOST_NO_STD_UNORDERED -# define BOOST_NO_STD_UNORDERED +# ifndef BOOST_NO_CXX11_STD_UNORDERED +# define BOOST_NO_CXX11_STD_UNORDERED # endif #endif @@ -827,9 +840,9 @@ namespace std{ using ::type_info; } #if defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_NO_STATIC_ASSERT) # define BOOST_NO_STATIC_ASSERT #endif -// Use BOOST_NO_CXX11_STD_UNORDERD instead of BOOST_NO_STD_UNORDERD -#if defined(BOOST_NO_CXX11_STD_UNORDERD) && !defined(BOOST_NO_STD_UNORDERD) -# define BOOST_NO_STD_UNORDERD +// Use BOOST_NO_CXX11_STD_UNORDERED instead of BOOST_NO_STD_UNORDERED +#if defined(BOOST_NO_CXX11_STD_UNORDERED) && !defined(BOOST_NO_STD_UNORDERED) +# define BOOST_NO_STD_UNORDERED #endif // Use BOOST_NO_CXX11_UNICODE_LITERALS instead of BOOST_NO_UNICODE_LITERALS #if defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(BOOST_NO_UNICODE_LITERALS) @@ -859,7 +872,7 @@ namespace std{ using ::type_info; } // Helper macros BOOST_NOEXCEPT, BOOST_NOEXCEPT_IF, BOOST_NOEXCEPT_EXPR // These aid the transition to C++11 while still supporting C++03 compilers // -#ifdef BOOST_NO_NOEXCEPT +#ifdef BOOST_NO_CXX11_NOEXCEPT # define BOOST_NOEXCEPT # define BOOST_NOEXCEPT_IF(Predicate) # define BOOST_NOEXCEPT_EXPR(Expression) false @@ -869,17 +882,10 @@ namespace std{ using ::type_info; } # define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression)) #endif -// -// Normalize BOOST_NO_STATIC_ASSERT and (depricated) BOOST_HAS_STATIC_ASSERT: -// -#if !defined(BOOST_NO_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT) -# define BOOST_HAS_STATIC_ASSERT -#endif - // // constexpr workarounds // -#if defined(BOOST_NO_CONSTEXPR) +#if defined(BOOST_NO_CXX11_CONSTEXPR) #define BOOST_CONSTEXPR #define BOOST_CONSTEXPR_OR_CONST const #else @@ -890,16 +896,23 @@ namespace std{ using ::type_info; } #define BOOST_STATIC_CONSTEXPR static BOOST_CONSTEXPR_OR_CONST // -// Set BOOST_HAS_RVALUE_REFS when BOOST_NO_RVALUE_REFERENCES is not defined +// Set BOOST_HAS_STATIC_ASSERT when BOOST_NO_CXX11_STATIC_ASSERT is not defined // -#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS) +#if !defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT) +# define BOOST_HAS_STATIC_ASSERT +#endif + +// +// Set BOOST_HAS_RVALUE_REFS when BOOST_NO_CXX11_RVALUE_REFERENCES is not defined +// +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS) #define BOOST_HAS_RVALUE_REFS #endif // -// Set BOOST_HAS_VARIADIC_TMPL when BOOST_NO_VARIADIC_TEMPLATES is not defined +// Set BOOST_HAS_VARIADIC_TMPL when BOOST_NO_CXX11_VARIADIC_TEMPLATES is not defined // -#if !defined(BOOST_NO_VARIADIC_TEMPLATES) && !defined(BOOST_HAS_VARIADIC_TMPL) +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_HAS_VARIADIC_TMPL) #define BOOST_HAS_VARIADIC_TMPL #endif diff --git a/cpp/BoostParts/boost/container/allocator_traits.hpp b/cpp/BoostParts/boost/container/allocator_traits.hpp index 11d948bf..828d664d 100644 --- a/cpp/BoostParts/boost/container/allocator_traits.hpp +++ b/cpp/BoostParts/boost/container/allocator_traits.hpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include //numeric_limits<>::max() #include //placement new #include //std::allocator @@ -165,22 +165,22 @@ struct allocator_traits propagate_on_container_swap, boost::false_type) propagate_on_container_swap; - #if !defined(BOOST_NO_TEMPLATE_ALIASES) + #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) //C++11 template using rebind_alloc = typename boost::intrusive::detail::type_rebinder::type; template using rebind_traits = allocator_traits< rebind_alloc >; - #else // #if !defined(BOOST_NO_TEMPLATE_ALIASES) + #else // #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) //Some workaround for C++03 or C++11 compilers with no template aliases template struct rebind_alloc : boost::intrusive::detail::type_rebinder::type { typedef typename boost::intrusive::detail::type_rebinder::type Base; - #if !defined(BOOST_NO_VARIADIC_TEMPLATES) + #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template rebind_alloc(BOOST_FWD_REF(Args)... args) : Base(boost::forward(args)...) {} - #else // #if !defined(BOOST_NO_VARIADIC_TEMPLATES) + #else // #if !defined(BOOST_NO_CXX11_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, _)) \ @@ -189,14 +189,14 @@ struct allocator_traits // #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_NO_CXX11_VARIADIC_TEMPLATES) }; template struct rebind_traits : allocator_traits::type> {}; - #endif // #if !defined(BOOST_NO_TEMPLATE_ALIASES) + #endif // #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) template struct portable_rebind_alloc { typedef typename boost::intrusive::detail::type_rebinder::type type; }; @@ -259,7 +259,7 @@ struct allocator_traits return allocator_traits::priv_select_on_container_copy_construction(flag, a); } - #if !defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) + #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) //! Effects: calls `a.construct(p, std::forward(args)...)` if that call is well-formed; //! otherwise, invokes `::new (static_cast(p)) T(std::forward(args)...)` template @@ -298,7 +298,7 @@ struct allocator_traits static Alloc priv_select_on_container_copy_construction(boost::false_type, const Alloc &a) { return a; } - #if !defined(BOOST_NO_VARIADIC_TEMPLATES) + #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template static void priv_construct(boost::false_type, Alloc &a, T *p, BOOST_FWD_REF(Args) ...args) { @@ -322,7 +322,7 @@ struct allocator_traits template static void priv_construct_dispatch2(boost::false_type, Alloc &, T *p, BOOST_FWD_REF(Args) ...args) { ::new((void*)p) T(::boost::forward(args)...); } - #else // #if !defined(BOOST_NO_VARIADIC_TEMPLATES) + #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) public: #define BOOST_PP_LOCAL_MACRO(n) \ template \ @@ -371,7 +371,7 @@ struct allocator_traits // #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_NO_CXX11_VARIADIC_TEMPLATES) #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) ///@endcond diff --git a/cpp/BoostParts/boost/container/detail/pair.hpp b/cpp/BoostParts/boost/container/detail/pair.hpp index 2a20ed13..79753a86 100644 --- a/cpp/BoostParts/boost/container/detail/pair.hpp +++ b/cpp/BoostParts/boost/container/detail/pair.hpp @@ -26,8 +26,9 @@ #include #include //std::pair +#include //std::swap -#include +#include #include #ifndef BOOST_CONTAINER_PERFECT_FORWARDING @@ -336,7 +337,7 @@ struct is_class< ::boost::container::container_detail::pair > : public ::boost::true_type {}; -#ifdef BOOST_NO_RVALUE_REFERENCES +#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES template struct has_move_emulation_enabled< ::boost::container::container_detail::pair > diff --git a/cpp/BoostParts/boost/container/detail/preprocessor.hpp b/cpp/BoostParts/boost/container/detail/preprocessor.hpp index 5129ea1e..4e175a82 100644 --- a/cpp/BoostParts/boost/container/detail/preprocessor.hpp +++ b/cpp/BoostParts/boost/container/detail/preprocessor.hpp @@ -17,6 +17,7 @@ #include #include +#include #ifdef BOOST_CONTAINER_PERFECT_FORWARDING //#error "This file is not needed when perfect forwarding is available" @@ -38,6 +39,7 @@ #include #include #include +#include #define BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS 10 @@ -47,7 +49,7 @@ //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 +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_CONTAINER_PP_PARAM_LIST(z, n, data) \ BOOST_PP_CAT(P, n) && BOOST_PP_CAT(p, n) \ //! @@ -55,13 +57,13 @@ #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 +#endif //#ifndef BOOST_NO_CXX11_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 +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_CONTAINER_PP_PARAM(U, u) \ U && u \ //! @@ -69,22 +71,22 @@ const BOOST_PP_CAT(Q, n) & BOOST_PP_CAT(q, n) \ #define BOOST_CONTAINER_PP_PARAM(U, u) \ const U & u \ //! -#endif //#ifndef BOOST_NO_RVALUE_REFERENCES +#endif //#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES #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) )) \ //! -#else //BOOST_NO_RVALUE_REFERENCES +#else //BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_CONTAINER_PP_PARAM_INIT(z, n, data) \ BOOST_PP_CAT(m_p, n) (const_cast(BOOST_PP_CAT(p, n))) \ //! -#endif //#ifndef BOOST_NO_RVALUE_REFERENCES +#endif //#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES #if defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG) @@ -97,7 +99,7 @@ const BOOST_PP_CAT(Q, n) & BOOST_PP_CAT(q, n) \ template struct ref_holder { - ref_holder(T &t) + explicit ref_holder(T &t) : t_(t) {} T &t_; @@ -107,7 +109,7 @@ const BOOST_PP_CAT(Q, n) & BOOST_PP_CAT(q, n) \ template struct ref_holder { - ref_holder(const T &t) + explicit ref_holder(const T &t) : t_(t) {} const T &t_; @@ -117,7 +119,7 @@ const BOOST_PP_CAT(Q, n) & BOOST_PP_CAT(q, n) \ template struct ref_holder { - ref_holder(const T &t) + explicit ref_holder(const T &t) : t_(t) {} const T &t_; @@ -127,7 +129,7 @@ const BOOST_PP_CAT(Q, n) & BOOST_PP_CAT(q, n) \ template struct ref_holder { - ref_holder(T &&t) + explicit ref_holder(T &&t) : t_(t) {} T &t_; @@ -137,10 +139,10 @@ const BOOST_PP_CAT(Q, n) & BOOST_PP_CAT(q, n) \ template struct ref_holder { - ref_holder(T &&t) - : t(t) + explicit ref_holder(T &&t) + : t_(t) {} - T &t; + T &t_; T && get() { return ::boost::move(t_); } }; @@ -160,25 +162,25 @@ const BOOST_PP_CAT(Q, n) & BOOST_PP_CAT(q, n) \ #endif //defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG) -#else //BOOST_NO_RVALUE_REFERENCES +#else //BOOST_NO_CXX11_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 +#endif //#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES -#if !defined(BOOST_NO_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG) #define BOOST_CONTAINER_PP_MEMBER_FORWARD(z, n, data) BOOST_PP_CAT(this->m_p, n).get() \ //! -#else //!defined(BOOST_NO_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG) +#else //!defined(BOOST_NO_CXX11_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) +#endif //!defined(BOOST_NO_CXX11_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) \ diff --git a/cpp/BoostParts/boost/container/detail/type_traits.hpp b/cpp/BoostParts/boost/container/detail/type_traits.hpp index 0e096e54..5020ee9f 100644 --- a/cpp/BoostParts/boost/container/detail/type_traits.hpp +++ b/cpp/BoostParts/boost/container/detail/type_traits.hpp @@ -21,7 +21,7 @@ #include "config_begin.hpp" -#include +#include namespace boost { namespace container { @@ -90,7 +90,7 @@ struct remove_reference typedef T type; }; -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template struct remove_reference diff --git a/cpp/BoostParts/boost/container/detail/utilities.hpp b/cpp/BoostParts/boost/container/detail/utilities.hpp index ece9a2e0..5c294e1c 100644 --- a/cpp/BoostParts/boost/container/detail/utilities.hpp +++ b/cpp/BoostParts/boost/container/detail/utilities.hpp @@ -18,11 +18,14 @@ #include #include #include -#include +#include +#include #include #include #include +#include #include +#include namespace boost { namespace container { @@ -123,16 +126,6 @@ struct ct_rounded_size enum { value = ((OrigSize-1)/RoundTo+1)*RoundTo }; }; -template -struct move_const_ref_type - : if_c -// < ::boost::is_fundamental::value || ::boost::is_pointer::value || ::boost::is_member_pointer::value || ::boost::is_enum::value - < !::boost::is_class::value - ,const T & - ,BOOST_CATCH_CONST_RLVALUE(T) - > -{}; - } //namespace container_detail { ////////////////////////////////////////////////////////////////////////////// @@ -154,13 +147,95 @@ template typename F> // F models ForwardIterator F uninitialized_move_alloc(A &a, I f, I l, F r) { - while (f != l) { - allocator_traits::construct(a, container_detail::to_raw_pointer(&*r), boost::move(*f)); - ++f; ++r; + F back = r; + BOOST_TRY{ + while (f != l) { + allocator_traits::construct(a, container_detail::to_raw_pointer(&*r), boost::move(*f)); + ++f; ++r; + } } + BOOST_CATCH(...){ + for (; back != r; ++back){ + allocator_traits::destroy(a, container_detail::to_raw_pointer(&*back)); + } + BOOST_RETHROW; + } + BOOST_CATCH_END return r; } +////////////////////////////////////////////////////////////////////////////// +// +// uninitialized_move_alloc_n +// +////////////////////////////////////////////////////////////////////////////// + +//! Effects: +//! \code +//! for (; n--; ++result, ++first) +//! allocator_traits::construct(a, &*result, boost::move(*first)); +//! \endcode +//! +//! Returns: result +template + // F models ForwardIterator +F uninitialized_move_alloc_n(A &a, I f, typename std::iterator_traits::difference_type n, F r) +{ + F back = r; + BOOST_TRY{ + while (n--) { + allocator_traits::construct(a, container_detail::to_raw_pointer(&*r), boost::move(*f)); + ++f; ++r; + } + } + BOOST_CATCH(...){ + for (; back != r; ++back){ + allocator_traits::destroy(a, container_detail::to_raw_pointer(&*back)); + } + BOOST_RETHROW; + } + BOOST_CATCH_END + return r; +} + +////////////////////////////////////////////////////////////////////////////// +// +// uninitialized_move_alloc_n_source +// +////////////////////////////////////////////////////////////////////////////// + +//! Effects: +//! \code +//! for (; n--; ++result, ++first) +//! allocator_traits::construct(a, &*result, boost::move(*first)); +//! \endcode +//! +//! Returns: first (after incremented) +template + // F models ForwardIterator +I uninitialized_move_alloc_n_source(A &a, I f, typename std::iterator_traits::difference_type n, F r) +{ + F back = r; + BOOST_TRY{ + while (n--) { + allocator_traits::construct(a, container_detail::to_raw_pointer(&*r), boost::move(*f)); + ++f; ++r; + } + } + BOOST_CATCH(...){ + for (; back != r; ++back){ + allocator_traits::destroy(a, container_detail::to_raw_pointer(&*back)); + } + BOOST_RETHROW; + } + BOOST_CATCH_END + return f; +} + ////////////////////////////////////////////////////////////////////////////// // // uninitialized_copy_alloc @@ -180,13 +255,95 @@ template typename F> // F models ForwardIterator F uninitialized_copy_alloc(A &a, I f, I l, F r) { - while (f != l) { - allocator_traits::construct(a, container_detail::to_raw_pointer(&*r), *f); - ++f; ++r; + F back = r; + BOOST_TRY{ + while (f != l) { + allocator_traits::construct(a, container_detail::to_raw_pointer(&*r), *f); + ++f; ++r; + } } + BOOST_CATCH(...){ + for (; back != r; ++back){ + allocator_traits::destroy(a, container_detail::to_raw_pointer(&*back)); + } + BOOST_RETHROW; + } + BOOST_CATCH_END return r; } +////////////////////////////////////////////////////////////////////////////// +// +// uninitialized_copy_alloc_n +// +////////////////////////////////////////////////////////////////////////////// + +//! Effects: +//! \code +//! for (; n--; ++result, ++first) +//! allocator_traits::construct(a, &*result, *first); +//! \endcode +//! +//! Returns: result +template + // F models ForwardIterator +F uninitialized_copy_alloc_n(A &a, I f, typename std::iterator_traits::difference_type n, F r) +{ + F back = r; + BOOST_TRY{ + while (n--) { + allocator_traits::construct(a, container_detail::to_raw_pointer(&*r), *f); + ++f; ++r; + } + } + BOOST_CATCH(...){ + for (; back != r; ++back){ + allocator_traits::destroy(a, container_detail::to_raw_pointer(&*back)); + } + BOOST_RETHROW; + } + BOOST_CATCH_END + return r; +} + +////////////////////////////////////////////////////////////////////////////// +// +// uninitialized_copy_alloc_n_source +// +////////////////////////////////////////////////////////////////////////////// + +//! Effects: +//! \code +//! for (; n--; ++result, ++first) +//! allocator_traits::construct(a, &*result, *first); +//! \endcode +//! +//! Returns: first (after incremented) +template + // F models ForwardIterator +I uninitialized_copy_alloc_n_source(A &a, I f, typename std::iterator_traits::difference_type n, F r) +{ + F back = r; + BOOST_TRY{ + while (n--) { + allocator_traits::construct(a, container_detail::to_raw_pointer(&*r), *f); + ++f; ++r; + } + } + BOOST_CATCH(...){ + for (; back != r; ++back){ + allocator_traits::destroy(a, container_detail::to_raw_pointer(&*back)); + } + BOOST_RETHROW; + } + BOOST_CATCH_END + return f; +} + ////////////////////////////////////////////////////////////////////////////// // // uninitialized_copy_alloc @@ -206,10 +363,20 @@ template typename T> void uninitialized_fill_alloc(A &a, F f, F l, const T &t) { - while (f != l) { - allocator_traits::construct(a, container_detail::to_raw_pointer(&*f), t); - ++f; + F back = f; + BOOST_TRY{ + while (f != l) { + allocator_traits::construct(a, container_detail::to_raw_pointer(&*f), t); + ++f; + } } + BOOST_CATCH(...){ + for (; back != l; ++back){ + allocator_traits::destroy(a, container_detail::to_raw_pointer(&*back)); + } + BOOST_RETHROW; + } + BOOST_CATCH_END } ////////////////////////////////////////////////////////////////////////////// @@ -242,6 +409,168 @@ F uninitialized_copy_or_move_alloc return ::boost::container::uninitialized_copy_alloc(a, f, l, r); } +////////////////////////////////////////////////////////////////////////////// +// +// uninitialized_copy_or_move_alloc_n +// +////////////////////////////////////////////////////////////////////////////// + +template + // F models ForwardIterator +F uninitialized_copy_or_move_alloc_n + (A &a, I f, typename std::iterator_traits::difference_type n, F r + ,typename boost::container::container_detail::enable_if + < boost::move_detail::is_move_iterator >::type* = 0) +{ + return ::boost::container::uninitialized_move_alloc_n(a, f, n, r); +} + +template + // F models ForwardIterator +F uninitialized_copy_or_move_alloc_n + (A &a, I f, typename std::iterator_traits::difference_type n, F r + ,typename boost::container::container_detail::disable_if + < boost::move_detail::is_move_iterator >::type* = 0) +{ + return ::boost::container::uninitialized_copy_alloc_n(a, f, n, r); +} + + +////////////////////////////////////////////////////////////////////////////// +// +// uninitialized_copy_or_move_alloc_n_source +// +////////////////////////////////////////////////////////////////////////////// + +template + // F models ForwardIterator +I uninitialized_copy_or_move_alloc_n_source + (A &a, I f, typename std::iterator_traits::difference_type n, F r + ,typename boost::container::container_detail::enable_if + < boost::move_detail::is_move_iterator >::type* = 0) +{ + return ::boost::container::uninitialized_move_alloc_n_source(a, f, n, r); +} + +template + // F models ForwardIterator +I uninitialized_copy_or_move_alloc_n_source + (A &a, I f, typename std::iterator_traits::difference_type n, F r + ,typename boost::container::container_detail::disable_if + < boost::move_detail::is_move_iterator >::type* = 0) +{ + return ::boost::container::uninitialized_copy_alloc_n_source(a, f, n, r); +} + +////////////////////////////////////////////////////////////////////////////// +// +// copy_or_move +// +////////////////////////////////////////////////////////////////////////////// + +template + // F models ForwardIterator +inline F copy_or_move(I f, I l, F r + ,typename boost::container::container_detail::enable_if + < boost::move_detail::is_move_iterator >::type* = 0) +{ + while (f != l) { + *r = ::boost::move(*f); + ++f; ++r; + } + return r; +} + +template + // F models ForwardIterator +inline F copy_or_move(I f, I l, F r + ,typename boost::container::container_detail::disable_if + < boost::move_detail::is_move_iterator >::type* = 0) +{ + while (f != l) { + *r = *f; + ++f; ++r; + } + return r; +} + +////////////////////////////////////////////////////////////////////////////// +// +// copy_or_move_n +// +////////////////////////////////////////////////////////////////////////////// + +template + // F models ForwardIterator +inline F copy_or_move_n(I f, typename std::iterator_traits::difference_type n, F r + ,typename boost::container::container_detail::enable_if + < boost::move_detail::is_move_iterator >::type* = 0) +{ + while (n--) { + *r = ::boost::move(*f); + ++f; ++r; + } + return r; +} + +template + // F models ForwardIterator +inline F copy_or_move_n(I f, typename std::iterator_traits::difference_type n, F r + ,typename boost::container::container_detail::disable_if + < boost::move_detail::is_move_iterator >::type* = 0) +{ + while (n--) { + *r = *f; + ++f; ++r; + } + return r; +} + +////////////////////////////////////////////////////////////////////////////// +// +// copy_or_move_n_source +// +////////////////////////////////////////////////////////////////////////////// + +template + // F models ForwardIterator +inline I copy_or_move_n_source(I f, typename std::iterator_traits::difference_type n, F r + ,typename boost::container::container_detail::enable_if + < boost::move_detail::is_move_iterator >::type* = 0) +{ + while (n--) { + *r = ::boost::move(*f); + ++f; ++r; + } + return f; +} + +template + // F models ForwardIterator +inline I copy_or_move_n_source(I f, typename std::iterator_traits::difference_type n, F r + ,typename boost::container::container_detail::disable_if + < boost::move_detail::is_move_iterator >::type* = 0) +{ + while (n--) { + *r = *f; + ++f; ++r; + } + return f; +} } //namespace container { } //namespace boost { diff --git a/cpp/BoostParts/boost/container/detail/workaround.hpp b/cpp/BoostParts/boost/container/detail/workaround.hpp index 7838a5db..06cb7337 100644 --- a/cpp/BoostParts/boost/container/detail/workaround.hpp +++ b/cpp/BoostParts/boost/container/detail/workaround.hpp @@ -13,20 +13,24 @@ #include -#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)\ +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)\ && !defined(BOOST_INTERPROCESS_DISABLE_VARIADIC_TMPL) #define BOOST_CONTAINER_PERFECT_FORWARDING #endif -#if defined(BOOST_NO_NOEXCEPT) - #define BOOST_CONTAINER_NOEXCEPT +#if defined(BOOST_NO_CXX11_NOEXCEPT) + #if defined(BOOST_MSVC) + #define BOOST_CONTAINER_NOEXCEPT throw() + #else + #define BOOST_CONTAINER_NOEXCEPT + #endif #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__)\ +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && defined(__GXX_EXPERIMENTAL_CXX0X__)\ && (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40700) #define BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST #endif diff --git a/cpp/BoostParts/boost/container/scoped_allocator.hpp b/cpp/BoostParts/boost/container/scoped_allocator.hpp index 5111d370..39fd4da9 100644 --- a/cpp/BoostParts/boost/container/scoped_allocator.hpp +++ b/cpp/BoostParts/boost/container/scoped_allocator.hpp @@ -30,8 +30,8 @@ #include #include #include -#include - +#include +#include namespace boost { namespace container { @@ -259,7 +259,7 @@ namespace container_detail { //! Thanks Mathias! //With variadic templates, we need a single class to implement the trait - #if !defined(BOOST_NO_VARIADIC_TEMPLATES) + #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template struct is_constructible_impl @@ -290,7 +290,7 @@ namespace container_detail { : is_constructible {}; - #else // #if !defined(BOOST_NO_VARIADIC_TEMPLATES) + #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) //Without variadic templates, we need to use de preprocessor to generate //some specializations. @@ -382,14 +382,14 @@ namespace container_detail { > {};*/ - #endif // #if !defined(BOOST_NO_VARIADIC_TEMPLATES) + #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #else // #if !defined(BOOST_NO_SFINAE_EXPR) //Without advanced SFINAE expressions, we can't use is_constructible //so backup to constructible_with_allocator_xxx - #if !defined(BOOST_NO_VARIADIC_TEMPLATES) + #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template < class T, class InnerAlloc, class ...Args> struct is_constructible_with_allocator_prefix @@ -401,7 +401,7 @@ namespace container_detail { : constructible_with_allocator_suffix {};*/ - #else // #if !defined(BOOST_NO_VARIADIC_TEMPLATES) + #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template < class T , class InnerAlloc @@ -423,11 +423,11 @@ namespace container_detail { : constructible_with_allocator_suffix {};*/ - #endif // #if !defined(BOOST_NO_VARIADIC_TEMPLATES) + #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #endif // #if !defined(BOOST_NO_SFINAE_EXPR) -#if !defined(BOOST_NO_VARIADIC_TEMPLATES) +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template < typename OutermostAlloc , typename InnerAlloc @@ -489,7 +489,7 @@ inline void dispatch_uses_allocator (outermost_alloc, p, ::boost::forward(args)...); } -#else //#if !defined(BOOST_NO_VARIADIC_TEMPLATES) +#else //#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #define BOOST_PP_LOCAL_MACRO(n) \ template < typename OutermostAlloc \ @@ -564,9 +564,9 @@ inline void dispatch_uses_allocator(boost::false_type uses_allocator #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_NO_CXX11_VARIADIC_TEMPLATES) -#if !defined(BOOST_NO_VARIADIC_TEMPLATES) +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template class scoped_allocator_adaptor_base @@ -679,7 +679,7 @@ class scoped_allocator_adaptor_base inner_allocator_type m_inner; }; -#else //#if !defined(BOOST_NO_VARIADIC_TEMPLATES) +#else //#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) //Let's add a dummy first template parameter to allow creating //specializations up to maximum InnerAlloc count @@ -829,13 +829,13 @@ class scoped_allocator_adaptor_base class scoped_allocator_adaptor_base < OuterAlloc - #if defined(BOOST_NO_VARIADIC_TEMPLATES) + #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) , true BOOST_PP_ENUM_TRAILING(BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS, BOOST_CONTAINER_PP_IDENTITY, nat) #endif @@ -850,7 +850,7 @@ class scoped_allocator_adaptor_base { typedef scoped_allocator_adaptor_base ::template portable_rebind_alloc::type - #if defined(BOOST_NO_VARIADIC_TEMPLATES) + #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) , true BOOST_PP_ENUM_TRAILING(BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS, BOOST_CONTAINER_PP_IDENTITY, container_detail::nat) #endif @@ -887,7 +887,7 @@ class scoped_allocator_adaptor_base scoped_allocator_adaptor_base (const scoped_allocator_adaptor_base< OuterA2 - #if defined(BOOST_NO_VARIADIC_TEMPLATES) + #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) , true BOOST_PP_ENUM_TRAILING(BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS, BOOST_CONTAINER_PP_IDENTITY, container_detail::nat) #endif @@ -899,7 +899,7 @@ class scoped_allocator_adaptor_base scoped_allocator_adaptor_base (BOOST_RV_REF_BEG scoped_allocator_adaptor_base< OuterA2 - #if defined(BOOST_NO_VARIADIC_TEMPLATES) + #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) , true BOOST_PP_ENUM_TRAILING(BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS, BOOST_CONTAINER_PP_IDENTITY, container_detail::nat) #endif @@ -946,7 +946,7 @@ class scoped_allocator_adaptor_base ///@endcond //Scoped allocator -#if !defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) #if !defined(BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST) @@ -992,7 +992,7 @@ class scoped_allocator_adaptor_base #endif // #if !defined(BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST) -#else // #if !defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) +#else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) template ::type - #if !defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) + #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) , InnerAllocs... #else BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS, Q) @@ -1086,7 +1086,7 @@ class scoped_allocator_adaptor : base_type(::boost::move(other.base())) {} - #if !defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) + #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) //! Requires: OuterAlloc shall be constructible from OuterA2. //! @@ -1097,7 +1097,7 @@ class scoped_allocator_adaptor scoped_allocator_adaptor(BOOST_FWD_REF(OuterA2) outerAlloc, const InnerAllocs & ...innerAllocs) : base_type(::boost::forward(outerAlloc), innerAllocs...) {} - #else // #if !defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) + #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) #define BOOST_PP_LOCAL_MACRO(n) \ template \ @@ -1111,14 +1111,14 @@ class scoped_allocator_adaptor #define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS) #include BOOST_PP_LOCAL_ITERATE() - #endif // #if !defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) + #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) //! Requires: OuterAlloc shall be constructible from OuterA2. //! //! Effects: initializes each allocator within the adaptor with the corresponding allocator from other. template scoped_allocator_adaptor(const scoped_allocator_adaptor scoped_allocator_adaptor(BOOST_RV_REF_BEG scoped_allocator_adaptorEffects: //! 1) If `uses_allocator::value` is false calls @@ -1274,7 +1274,7 @@ class scoped_allocator_adaptor , p, ::boost::forward(args)...); } - #else // #if !defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) + #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) //Disable this overload if the first argument is pair as some compilers have //overload selection problems when the first parameter is a pair. @@ -1295,7 +1295,7 @@ class scoped_allocator_adaptor #define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS) #include BOOST_PP_LOCAL_ITERATE() - #endif // #if !defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) + #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) template void construct(std::pair* p) @@ -1338,52 +1338,56 @@ class scoped_allocator_adaptor void construct_pair(Pair* p) { this->construct(container_detail::addressof(p->first)); - try { + BOOST_TRY{ this->construct(container_detail::addressof(p->second)); } - catch (...) { + BOOST_CATCH(...){ this->destroy(container_detail::addressof(p->first)); - throw; + BOOST_RETHROW } + BOOST_CATCH_END } template void construct_pair(Pair* p, BOOST_FWD_REF(U) x, BOOST_FWD_REF(V) y) { this->construct(container_detail::addressof(p->first), ::boost::forward(x)); - try { + BOOST_TRY{ this->construct(container_detail::addressof(p->second), ::boost::forward(y)); } - catch (...) { + BOOST_CATCH(...){ this->destroy(container_detail::addressof(p->first)); - throw; + BOOST_RETHROW } + BOOST_CATCH_END } template void construct_pair(Pair* p, const Pair2& pr) { this->construct(container_detail::addressof(p->first), pr.first); - try { + BOOST_TRY{ this->construct(container_detail::addressof(p->second), pr.second); } - catch (...) { + BOOST_CATCH(...){ this->destroy(container_detail::addressof(p->first)); - throw; + BOOST_RETHROW } + BOOST_CATCH_END } template void construct_pair(Pair* p, BOOST_RV_REF(Pair2) pr) { this->construct(container_detail::addressof(p->first), ::boost::move(pr.first)); - try { + BOOST_TRY{ this->construct(container_detail::addressof(p->second), ::boost::move(pr.second)); } - catch (...) { + BOOST_CATCH(...){ this->destroy(container_detail::addressof(p->first)); - throw; + BOOST_RETHROW } + BOOST_CATCH_END } //template @@ -1399,7 +1403,7 @@ class scoped_allocator_adaptor }; template inline bool operator==( const scoped_allocator_adaptor& a, const scoped_allocator_adaptor& b) { - #if !defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) + #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) const bool has_zero_inner = sizeof...(InnerAllocs) == 0u; #else const bool has_zero_inner = @@ -1434,7 +1438,7 @@ inline bool operator==( } template inline bool operator!=( const scoped_allocator_adaptor& a, const scoped_allocator_adaptor #include -#if defined(BOOST_NO_VARIADIC_TEMPLATES) +#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #include #include #endif @@ -27,7 +27,7 @@ namespace boost { namespace container { ///@cond -#if !defined(BOOST_NO_VARIADIC_TEMPLATES) +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #if !defined(BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST) @@ -45,7 +45,7 @@ namespace boost { namespace container { #endif // #if !defined(BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST) -#else // #if !defined(BOOST_NO_VARIADIC_TEMPLATES) +#else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template struct BOOST_SYMBOL_VISIBLE is_error_code_enum : public true_type { }; #endif use - #ifdef BOOST_NO_SCOPED_ENUMS + #ifdef BOOST_NO_CXX11_SCOPED_ENUMS template <> struct BOOST_SYMBOL_VISIBLE is_error_code_enum : public true_type { }; #endif @@ -130,7 +130,7 @@ Sample usage: namespace boost { -#ifdef BOOST_NO_SCOPED_ENUMS +#ifdef BOOST_NO_CXX11_SCOPED_ENUMS /** * Meta-function to get the underlying type of a scoped enum. * @@ -193,7 +193,7 @@ namespace boost return e.native_value_(); } -#else // BOOST_NO_SCOPED_ENUMS +#else // BOOST_NO_CXX11_SCOPED_ENUMS template struct underlying_type @@ -224,9 +224,9 @@ namespace boost } -#ifdef BOOST_NO_SCOPED_ENUMS +#ifdef BOOST_NO_CXX11_SCOPED_ENUMS -#ifndef BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#ifndef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #define BOOST_SCOPED_ENUM_UT_DECLARE_CONVERSION_OPERATOR \ explicit operator underlying_type() const { return get_underlying_value_(); } @@ -305,7 +305,7 @@ namespace boost */ #define BOOST_SCOPED_ENUM_FORWARD_DECLARE(EnumType) struct EnumType -#else // BOOST_NO_SCOPED_ENUMS +#else // BOOST_NO_CXX11_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 @@ -315,13 +315,13 @@ namespace boost #define BOOST_SCOPED_ENUM_NATIVE(EnumType) EnumType #define BOOST_SCOPED_ENUM_FORWARD_DECLARE(EnumType) enum class EnumType -#endif // BOOST_NO_SCOPED_ENUMS +#endif // BOOST_NO_CXX11_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 +//#ifdef BOOST_NO_CXX11_SCOPED_ENUMS // //# define BOOST_SCOPED_ENUM_START(name) struct name { enum enum_type //# define BOOST_SCOPED_ENUM_END }; diff --git a/cpp/BoostParts/boost/foreach.hpp b/cpp/BoostParts/boost/foreach.hpp index 571b45cc..33b59202 100644 --- a/cpp/BoostParts/boost/foreach.hpp +++ b/cpp/BoostParts/boost/foreach.hpp @@ -31,7 +31,7 @@ #include // Some compilers let us detect even const-qualified rvalues at compile-time -#if !defined(BOOST_NO_RVALUE_REFERENCES) \ +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) \ || BOOST_WORKAROUND(BOOST_MSVC, >= 1310) && !defined(_PREFAST_) \ || (BOOST_WORKAROUND(__GNUC__, == 4) && (__GNUC_MINOR__ <= 5) && !defined(BOOST_INTEL) && \ !defined(BOOST_CLANG)) \ @@ -228,7 +228,7 @@ template inline boost::mpl::true_ *is_const_(T const &) { return 0; } #endif -#ifdef BOOST_NO_RVALUE_REFERENCES +#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES template inline boost::mpl::false_ *is_rvalue_(T &, int) { return 0; } @@ -459,7 +459,7 @@ inline T &derefof(T *t) #endif #if defined(BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION) \ - && !defined(BOOST_NO_RVALUE_REFERENCES) + && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) /////////////////////////////////////////////////////////////////////////////// // Rvalue references makes it drop-dead simple to detect at compile time // whether an expression is an rvalue. @@ -469,7 +469,7 @@ inline T &derefof(T *t) boost::foreach_detail_::is_rvalue_((COL), 0) #elif defined(BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION) \ - && defined(BOOST_NO_RVALUE_REFERENCES) + && defined(BOOST_NO_CXX11_RVALUE_REFERENCES) /////////////////////////////////////////////////////////////////////////////// // Detect at compile-time whether an expression yields an rvalue or // an lvalue. This is rather non-standard, but some popular compilers @@ -959,7 +959,7 @@ rderef(auto_any_t cur, type2type *) (true ? boost::foreach_detail_::make_probe((COL), BOOST_FOREACH_ID(_foreach_is_rvalue)) : (COL)) // The rvalue/lvalue-ness of the collection expression is determined dynamically, unless -// type type is an array or is noncopyable or is non-const, in which case we know it's an lvalue. +// the type is an array or is noncopyable or is non-const, in which case we know it's an lvalue. // If the type happens to be a lightweight proxy, always make a copy. # define BOOST_FOREACH_SHOULD_COPY(COL) \ (boost::foreach_detail_::should_copy_impl( \ diff --git a/cpp/BoostParts/boost/function/function_template.hpp b/cpp/BoostParts/boost/function/function_template.hpp index f9699d05..73ed72ef 100644 --- a/cpp/BoostParts/boost/function/function_template.hpp +++ b/cpp/BoostParts/boost/function/function_template.hpp @@ -677,7 +677,7 @@ namespace boost { vtable_type* get_vtable() const { return reinterpret_cast( - reinterpret_cast(vtable) & ~static_cast(0x01)); + reinterpret_cast(vtable) & ~static_cast(0x01)); } struct clear_type {}; @@ -749,7 +749,7 @@ namespace boost { this->assign_to_own(f); } -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES BOOST_FUNCTION_FUNCTION(BOOST_FUNCTION_FUNCTION&& f) : function_base() { this->move_assign(f); @@ -838,7 +838,7 @@ namespace boost { return *this; } -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES // Move assignment from another BOOST_FUNCTION_FUNCTION BOOST_FUNCTION_FUNCTION& operator=(BOOST_FUNCTION_FUNCTION&& f) { @@ -1090,7 +1090,7 @@ public: function(const base_type& f) : base_type(static_cast(f)){} -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES // Move constructors function(self_type&& f): base_type(static_cast(f)){} function(base_type&& f): base_type(static_cast(f)){} @@ -1102,7 +1102,7 @@ public: return *this; } -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES self_type& operator=(self_type&& f) { self_type(static_cast(f)).swap(*this); @@ -1139,7 +1139,7 @@ public: return *this; } -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES self_type& operator=(base_type&& f) { self_type(static_cast(f)).swap(*this); diff --git a/cpp/BoostParts/boost/functional/hash/detail/container_fwd_0x.hpp b/cpp/BoostParts/boost/functional/hash/detail/container_fwd_0x.hpp deleted file mode 100644 index bed7730f..00000000 --- a/cpp/BoostParts/boost/functional/hash/detail/container_fwd_0x.hpp +++ /dev/null @@ -1,29 +0,0 @@ - -// 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 - -// std::array - -#if !defined(BOOST_NO_CXX11_HDR_ARRAY) -# include -#endif - -// std::tuple - -#if !defined(BOOST_NO_CXX11_HDR_TUPLE) -# include -#endif - -// std::shared_ptr/std::unique_ptr - -#if !defined(BOOST_NO_CXX11_HDR_MEMORY) -# include -#endif - -#endif diff --git a/cpp/BoostParts/boost/functional/hash/detail/float_functions.hpp b/cpp/BoostParts/boost/functional/hash/detail/float_functions.hpp index ae03ff09..4b8374d4 100644 --- a/cpp/BoostParts/boost/functional/hash/detail/float_functions.hpp +++ b/cpp/BoostParts/boost/functional/hash/detail/float_functions.hpp @@ -13,6 +13,94 @@ # pragma once #endif +// Set BOOST_HASH_CONFORMANT_FLOATS to 1 for libraries known to have +// sufficiently good floating point support to not require any +// workarounds. +// +// When set to 0, the library tries to automatically +// use the best available implementation. This normally works well, but +// breaks when ambiguities are created by odd namespacing of the functions. +// +// Note that if this is set to 0, the library should still take full +// advantage of the platform's floating point support. + +#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) +# define BOOST_HASH_CONFORMANT_FLOATS 0 +#elif defined(__LIBCOMO__) +# define BOOST_HASH_CONFORMANT_FLOATS 0 +#elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) +// Rogue Wave library: +# define BOOST_HASH_CONFORMANT_FLOATS 0 +#elif defined(_LIBCPP_VERSION) +// libc++ +# define BOOST_HASH_CONFORMANT_FLOATS 1 +#elif defined(__GLIBCPP__) || defined(__GLIBCXX__) +// GNU libstdc++ 3 +# if defined(__GNUC__) && __GNUC__ >= 4 +# define BOOST_HASH_CONFORMANT_FLOATS 1 +# else +# define BOOST_HASH_CONFORMANT_FLOATS 0 +# endif +#elif defined(__STL_CONFIG_H) +// generic SGI STL +# define BOOST_HASH_CONFORMANT_FLOATS 0 +#elif defined(__MSL_CPP__) +// MSL standard lib: +# define BOOST_HASH_CONFORMANT_FLOATS 0 +#elif defined(__IBMCPP__) +// VACPP std lib (probably conformant for much earlier version). +# if __IBMCPP__ >= 1210 +# define BOOST_HASH_CONFORMANT_FLOATS 1 +# else +# define BOOST_HASH_CONFORMANT_FLOATS 0 +# endif +#elif defined(MSIPL_COMPILE_H) +// Modena C++ standard library +# define BOOST_HASH_CONFORMANT_FLOATS 0 +#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) +// Dinkumware Library (this has to appear after any possible replacement libraries): +# if _CPPLIB_VER >= 405 +# define BOOST_HASH_CONFORMANT_FLOATS 1 +# else +# define BOOST_HASH_CONFORMANT_FLOATS 0 +# endif +#else +# define BOOST_HASH_CONFORMANT_FLOATS 0 +#endif + +#if BOOST_HASH_CONFORMANT_FLOATS + +// The standard library is known to be compliant, so don't use the +// configuration mechanism. + +namespace boost { + namespace hash_detail { + template + struct call_ldexp { + typedef Float float_type; + inline Float operator()(Float x, int y) const { + return std::ldexp(x, y); + } + }; + + template + struct call_frexp { + typedef Float float_type; + inline Float operator()(Float x, int* y) const { + return std::frexp(x, y); + } + }; + + template + struct select_hash_type + { + typedef Float type; + }; + } +} + +#else // BOOST_HASH_CONFORMANT_FLOATS == 0 + // The C++ standard requires that the C float functions are overloarded // for float, double and long double in the std namespace, but some of the older // library implementations don't support this. On some that don't, the C99 @@ -243,4 +331,6 @@ namespace boost } } +#endif // BOOST_HASH_CONFORMANT_FLOATS + #endif diff --git a/cpp/BoostParts/boost/functional/hash/detail/hash_float.hpp b/cpp/BoostParts/boost/functional/hash/detail/hash_float.hpp index 3edc6ab1..a98cd700 100644 --- a/cpp/BoostParts/boost/functional/hash/detail/hash_float.hpp +++ b/cpp/BoostParts/boost/functional/hash/detail/hash_float.hpp @@ -73,7 +73,9 @@ namespace boost ptr += sizeof(std::size_t); while(length >= sizeof(std::size_t)) { - hash_float_combine(seed, *(std::size_t*) ptr); + std::size_t buffer = 0; + std::memcpy(&buffer, ptr, sizeof(std::size_t)); + hash_float_combine(seed, buffer); length -= sizeof(std::size_t); ptr += sizeof(std::size_t); } @@ -210,8 +212,15 @@ namespace boost template inline std::size_t float_hash_value(T v) { +#if defined(fpclassify) + switch (fpclassify(v)) +#elif BOOST_HASH_CONFORMANT_FLOATS + switch (std::fpclassify(v)) +#else using namespace std; - switch (fpclassify(v)) { + switch (fpclassify(v)) +#endif + { case FP_ZERO: return 0; case FP_INFINITE: diff --git a/cpp/BoostParts/boost/functional/hash/extensions.hpp b/cpp/BoostParts/boost/functional/hash/extensions.hpp index 4358736b..998c08e4 100644 --- a/cpp/BoostParts/boost/functional/hash/extensions.hpp +++ b/cpp/BoostParts/boost/functional/hash/extensions.hpp @@ -14,12 +14,24 @@ #define BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP #include -#include +#include #include #include #include #include +#if !defined(BOOST_NO_CXX11_HDR_ARRAY) +# include +#endif + +#if !defined(BOOST_NO_CXX11_HDR_TUPLE) +# include +#endif + +#if !defined(BOOST_NO_CXX11_HDR_MEMORY) +# include +#endif + #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif @@ -149,7 +161,7 @@ namespace boost } } -#if !defined(BOOST_NO_VARIADIC_TEMPLATES) +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template inline std::size_t hash_value(std::tuple const& v) { diff --git a/cpp/BoostParts/boost/functional/hash/hash.hpp b/cpp/BoostParts/boost/functional/hash/hash.hpp index 647fd68b..aa4e49f8 100644 --- a/cpp/BoostParts/boost/functional/hash/hash.hpp +++ b/cpp/BoostParts/boost/functional/hash/hash.hpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) @@ -40,8 +41,8 @@ namespace boost struct enable_hash_value { typedef std::size_t type; }; template struct basic_numbers {}; - template struct long_numbers {}; - template struct ulong_numbers {}; + template struct long_numbers; + template struct ulong_numbers; template struct float_numbers {}; template <> struct basic_numbers : @@ -70,6 +71,14 @@ namespace boost boost::hash_detail::enable_hash_value {}; #endif + // long_numbers is defined like this to allow for separate + // specialization for long_long and int128_type, in case + // they conflict. + template struct long_numbers2 {}; + template struct ulong_numbers2 {}; + template struct long_numbers : long_numbers2 {}; + template struct ulong_numbers : ulong_numbers2 {}; + #if !defined(BOOST_NO_LONG_LONG) template <> struct long_numbers : boost::hash_detail::enable_hash_value {}; @@ -77,6 +86,13 @@ namespace boost boost::hash_detail::enable_hash_value {}; #endif +#if defined(BOOST_HAS_INT128) + template <> struct long_numbers2 : + boost::hash_detail::enable_hash_value {}; + template <> struct ulong_numbers2 : + boost::hash_detail::enable_hash_value {}; +#endif + template <> struct float_numbers : boost::hash_detail::enable_hash_value {}; template <> struct float_numbers : @@ -94,7 +110,7 @@ namespace boost template typename boost::enable_if, std::size_t>::type - hash_value(T); + hash_value(T); #if !BOOST_WORKAROUND(__DMC__, <= 0x848) template std::size_t hash_value(T* const&); @@ -187,9 +203,9 @@ namespace boost template typename boost::enable_if, std::size_t>::type - hash_value(T v) + hash_value(T v) { - return static_cast(v); + return static_cast(v); } // Implementation by Alberto Barbati and Dave Harris. @@ -423,6 +439,11 @@ namespace boost BOOST_HASH_SPECIALIZE(boost::ulong_long_type) #endif +#if defined(BOOST_HAS_INT128) + BOOST_HASH_SPECIALIZE(boost::int128_type) + BOOST_HASH_SPECIALIZE(boost::uint128_type) +#endif + #if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX) BOOST_HASH_SPECIALIZE(std::type_index) #endif diff --git a/cpp/BoostParts/boost/get_pointer.hpp b/cpp/BoostParts/boost/get_pointer.hpp index a0cd5c0b..b27b98a6 100644 --- a/cpp/BoostParts/boost/get_pointer.hpp +++ b/cpp/BoostParts/boost/get_pointer.hpp @@ -3,13 +3,15 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef GET_POINTER_DWA20021219_HPP -# define GET_POINTER_DWA20021219_HPP +#define GET_POINTER_DWA20021219_HPP + +#include // In order to avoid circular dependencies with Boost.TR1 // we make sure that our include of doesn't try to // pull in the TR1 headers: that's why we use this header // rather than including directly: -# include // std::auto_ptr +#include // std::auto_ptr namespace boost { @@ -27,6 +29,19 @@ template T * get_pointer(std::auto_ptr const& p) return p.get(); } +#if !defined( BOOST_NO_CXX11_SMART_PTR ) + +template T * get_pointer( std::unique_ptr const& p ) +{ + return p.get(); +} + +template T * get_pointer( std::shared_ptr const& p ) +{ + return p.get(); +} + +#endif } // namespace boost diff --git a/cpp/BoostParts/boost/graph/adjacency_list.hpp b/cpp/BoostParts/boost/graph/adjacency_list.hpp index 21b7500d..6738fa22 100644 --- a/cpp/BoostParts/boost/graph/adjacency_list.hpp +++ b/cpp/BoostParts/boost/graph/adjacency_list.hpp @@ -188,6 +188,7 @@ namespace boost { } // namespace detail + template struct is_distributed_selector: mpl::false_ {}; //=========================================================================== diff --git a/cpp/BoostParts/boost/graph/detail/adjacency_list.hpp b/cpp/BoostParts/boost/graph/detail/adjacency_list.hpp index fa398989..61959367 100644 --- a/cpp/BoostParts/boost/graph/detail/adjacency_list.hpp +++ b/cpp/BoostParts/boost/graph/detail/adjacency_list.hpp @@ -309,14 +309,16 @@ namespace boost { public: typedef Property property_type; inline stored_ra_edge_iter() { } - inline stored_ra_edge_iter(Vertex v, Iter i = Iter(), - EdgeVec* edge_vec = 0) + inline explicit stored_ra_edge_iter(Vertex v) // Only used for comparisons + : stored_edge(v), m_i(0), m_vec(0){ } + inline stored_ra_edge_iter(Vertex v, Iter i, EdgeVec* edge_vec) : stored_edge(v), m_i(i - edge_vec->begin()), m_vec(edge_vec){ } - inline Property& get_property() { return (*m_vec)[m_i].get_property(); } + inline Property& get_property() { BOOST_ASSERT ((m_vec != 0)); return (*m_vec)[m_i].get_property(); } inline const Property& get_property() const { + BOOST_ASSERT ((m_vec != 0)); return (*m_vec)[m_i].get_property(); } - inline Iter get_iter() const { return m_vec->begin() + m_i; } + inline Iter get_iter() const { BOOST_ASSERT ((m_vec != 0)); return m_vec->begin() + m_i; } protected: std::size_t m_i; EdgeVec* m_vec; diff --git a/cpp/BoostParts/boost/graph/detail/d_ary_heap.hpp b/cpp/BoostParts/boost/graph/detail/d_ary_heap.hpp index 2d921926..cf930fc1 100644 --- a/cpp/BoostParts/boost/graph/detail/d_ary_heap.hpp +++ b/cpp/BoostParts/boost/graph/detail/d_ary_heap.hpp @@ -126,18 +126,21 @@ namespace boost { } Value& top() { + BOOST_ASSERT (!this->empty()); return data[0]; } const Value& top() const { + BOOST_ASSERT (!this->empty()); return data[0]; } void pop() { + BOOST_ASSERT (!this->empty()); put(index_in_heap, data[0], (size_type)(-1)); if (data.size() != 1) { data[0] = data.back(); - put(index_in_heap, data[0], 0); + put(index_in_heap, data[0], (size_type)(0)); data.pop_back(); preserve_heap_property_down(); verify_heap(); diff --git a/cpp/BoostParts/boost/graph/graph_concepts.hpp b/cpp/BoostParts/boost/graph/graph_concepts.hpp index 8cb7cbb2..f03afeea 100644 --- a/cpp/BoostParts/boost/graph/graph_concepts.hpp +++ b/cpp/BoostParts/boost/graph/graph_concepts.hpp @@ -20,6 +20,9 @@ #include #include #include +#include +#include +#include #include #include @@ -55,12 +58,10 @@ typename T::ThereReallyIsNoMemberByThisNameInT vertices(T const&); BOOST_concept(Graph,(G)) { typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::edge_descriptor edge_descriptor; typedef typename graph_traits::directed_category directed_category; - typedef typename graph_traits::edge_parallel_category - edge_parallel_category; - - typedef typename graph_traits::traversal_category - traversal_category; + typedef typename graph_traits::edge_parallel_category edge_parallel_category; + typedef typename graph_traits::traversal_category traversal_category; BOOST_CONCEPT_USAGE(Graph) { @@ -75,11 +76,12 @@ typename T::ThereReallyIsNoMemberByThisNameInT vertices(T const&); : Graph { typedef typename graph_traits::edge_descriptor edge_descriptor; - typedef typename graph_traits::out_edge_iterator - out_edge_iterator; + typedef typename graph_traits::out_edge_iterator out_edge_iterator; + typedef typename graph_traits::degree_size_type degree_size_type; + typedef typename graph_traits::traversal_category traversal_category; - typedef typename graph_traits::traversal_category - traversal_category; + BOOST_STATIC_ASSERT((boost::mpl::not_ >::value)); + BOOST_STATIC_ASSERT((boost::mpl::not_ >::value)); BOOST_CONCEPT_USAGE(IncidenceGraph) { BOOST_CONCEPT_ASSERT((MultiPassInputIterator)); @@ -123,6 +125,8 @@ typename T::ThereReallyIsNoMemberByThisNameInT vertices(T const&); BOOST_CONCEPT_ASSERT((Convertible)); + BOOST_STATIC_ASSERT((boost::mpl::not_ >::value)); + p = in_edges(v, g); n = in_degree(v, g); e = *p.first; @@ -153,6 +157,8 @@ typename T::ThereReallyIsNoMemberByThisNameInT vertices(T const&); BOOST_CONCEPT_ASSERT((Convertible)); + BOOST_STATIC_ASSERT((boost::mpl::not_ >::value)); + p = adjacent_vertices(v, g); v = *p.first; const_constraints(g); @@ -178,6 +184,9 @@ typename T::ThereReallyIsNoMemberByThisNameInT vertices(T const&); BOOST_CONCEPT_ASSERT((Convertible)); + BOOST_STATIC_ASSERT((boost::mpl::not_ >::value)); + BOOST_STATIC_ASSERT((boost::mpl::not_ >::value)); + #ifdef BOOST_VECTOR_AS_GRAPH_GRAPH_ADL_HACK // dwa 2003/7/11 -- This clearly shouldn't be necessary, but if // you want to use vector_as_graph, it is! I'm sure the graph @@ -227,6 +236,9 @@ typename T::ThereReallyIsNoMemberByThisNameInT vertices(T const&); BOOST_CONCEPT_ASSERT((Convertible)); + BOOST_STATIC_ASSERT((boost::mpl::not_ >::value)); + BOOST_STATIC_ASSERT((boost::mpl::not_ >::value)); + p = edges(g); e = *p.first; u = source(e, g); diff --git a/cpp/BoostParts/boost/graph/graph_traits.hpp b/cpp/BoostParts/boost/graph/graph_traits.hpp index 625429e6..ceb0c2ac 100644 --- a/cpp/BoostParts/boost/graph/graph_traits.hpp +++ b/cpp/BoostParts/boost/graph/graph_traits.hpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -28,23 +29,47 @@ namespace boost { + namespace detail { +#define BOOST_GRAPH_MEMBER_OR_VOID(name) \ + BOOST_MPL_HAS_XXX_TRAIT_DEF(name) \ + template struct BOOST_JOIN(get_member_, name) {typedef typename T::name type;}; \ + template struct BOOST_JOIN(get_opt_member_, name): \ + boost::mpl::eval_if_c< \ + BOOST_JOIN(has_, name)::value, \ + BOOST_JOIN(get_member_, name), \ + boost::mpl::identity > \ + {}; + BOOST_GRAPH_MEMBER_OR_VOID(adjacency_iterator) + BOOST_GRAPH_MEMBER_OR_VOID(out_edge_iterator) + BOOST_GRAPH_MEMBER_OR_VOID(in_edge_iterator) + BOOST_GRAPH_MEMBER_OR_VOID(vertex_iterator) + BOOST_GRAPH_MEMBER_OR_VOID(edge_iterator) + BOOST_GRAPH_MEMBER_OR_VOID(vertices_size_type) + BOOST_GRAPH_MEMBER_OR_VOID(edges_size_type) + BOOST_GRAPH_MEMBER_OR_VOID(degree_size_type) + } + template struct graph_traits { +#define BOOST_GRAPH_PULL_OPT_MEMBER(name) \ + typedef typename detail::BOOST_JOIN(get_opt_member_, name)::type name; + typedef typename G::vertex_descriptor vertex_descriptor; typedef typename G::edge_descriptor edge_descriptor; - typedef typename G::adjacency_iterator adjacency_iterator; - typedef typename G::out_edge_iterator out_edge_iterator; - typedef typename G::in_edge_iterator in_edge_iterator; - typedef typename G::vertex_iterator vertex_iterator; - typedef typename G::edge_iterator edge_iterator; + BOOST_GRAPH_PULL_OPT_MEMBER(adjacency_iterator) + BOOST_GRAPH_PULL_OPT_MEMBER(out_edge_iterator) + BOOST_GRAPH_PULL_OPT_MEMBER(in_edge_iterator) + BOOST_GRAPH_PULL_OPT_MEMBER(vertex_iterator) + BOOST_GRAPH_PULL_OPT_MEMBER(edge_iterator) typedef typename G::directed_category directed_category; typedef typename G::edge_parallel_category edge_parallel_category; typedef typename G::traversal_category traversal_category; - typedef typename G::vertices_size_type vertices_size_type; - typedef typename G::edges_size_type edges_size_type; - typedef typename G::degree_size_type degree_size_type; + BOOST_GRAPH_PULL_OPT_MEMBER(vertices_size_type) + BOOST_GRAPH_PULL_OPT_MEMBER(edges_size_type) + BOOST_GRAPH_PULL_OPT_MEMBER(degree_size_type) +#undef BOOST_GRAPH_PULL_OPT_MEMBER static inline vertex_descriptor null_vertex(); }; diff --git a/cpp/BoostParts/boost/graph/named_graph.hpp b/cpp/BoostParts/boost/graph/named_graph.hpp index 77e1a22f..4c687a08 100644 --- a/cpp/BoostParts/boost/graph/named_graph.hpp +++ b/cpp/BoostParts/boost/graph/named_graph.hpp @@ -11,14 +11,23 @@ #define BOOST_GRAPH_NAMED_GRAPH_HPP #include -#include -#include -#include +#include +#include +#include #include #include +#include #include +#include // for boost::lookup_one_property #include +#include // for boost::make_tuple +#include +#include +#include +#include +#include // for std::equal_to #include // for std::runtime_error +#include // for std::pair namespace boost { namespace graph { @@ -352,8 +361,15 @@ find_vertex(typename BGL_NAMED_GRAPH::vertex_name_type const& name, /// Retrieve the vertex associated with the given name, or add a new /// vertex with that name if no such vertex is available. +/// Note: This is enabled only when the vertex property type is different +/// from the vertex name to avoid ambiguous overload problems with +/// the add_vertex() function that takes a vertex property. template -Vertex + typename disable_if, +Vertex>::type add_vertex(typename BGL_NAMED_GRAPH::vertex_name_type const& name, BGL_NAMED_GRAPH& g) { @@ -401,6 +417,35 @@ add_edge(typename BGL_NAMED_GRAPH::vertex_name_type const& u_name, g.derived()); } +// Overloads to support EdgeMutablePropertyGraph graphs +template +std::pair::edge_descriptor, bool> +add_edge(typename BGL_NAMED_GRAPH::vertex_descriptor const& u, + typename BGL_NAMED_GRAPH::vertex_name_type const& v_name, + typename edge_property_type::type const& p, + BGL_NAMED_GRAPH& g) { + return add_edge(u, add_vertex(v_name, g.derived()), p, g.derived()); +} + +template +std::pair::edge_descriptor, bool> +add_edge(typename BGL_NAMED_GRAPH::vertex_name_type const& u_name, + typename BGL_NAMED_GRAPH::vertex_descriptor const& v, + typename edge_property_type::type const& p, + BGL_NAMED_GRAPH& g) { + return add_edge(add_vertex(u_name, g.derived()), v, p, g.derived()); +} + +template +std::pair::edge_descriptor, bool> +add_edge(typename BGL_NAMED_GRAPH::vertex_name_type const& u_name, + typename BGL_NAMED_GRAPH::vertex_name_type const& v_name, + typename edge_property_type::type const& p, + BGL_NAMED_GRAPH& g) { + return add_edge(add_vertex(u_name, g.derived()), + add_vertex(v_name, g.derived()), p, g.derived()); +} + #undef BGL_NAMED_GRAPH #undef BGL_NAMED_GRAPH_PARAMS diff --git a/cpp/BoostParts/boost/graph/properties.hpp b/cpp/BoostParts/boost/graph/properties.hpp index 5cc926bc..d540439e 100644 --- a/cpp/BoostParts/boost/graph/properties.hpp +++ b/cpp/BoostParts/boost/graph/properties.hpp @@ -224,7 +224,7 @@ namespace boost { {}; } // namespace detail - template + template struct property_map: mpl::if_< is_same::type, edge_property_tag>, @@ -248,8 +248,8 @@ namespace boost { >::type type; }; - template class vertex_property: vertex_property_type {}; - template class edge_property: edge_property_type {}; + template struct vertex_property: vertex_property_type {}; + template struct edge_property: edge_property_type {}; template class degree_property_map diff --git a/cpp/BoostParts/boost/graph/property_maps/constant_property_map.hpp b/cpp/BoostParts/boost/graph/property_maps/constant_property_map.hpp index dd2461e7..9d83ea18 100644 --- a/cpp/BoostParts/boost/graph/property_maps/constant_property_map.hpp +++ b/cpp/BoostParts/boost/graph/property_maps/constant_property_map.hpp @@ -54,6 +54,39 @@ inline constant_property_map make_constant_property(const Value& value) { return constant_property_map(value); } +/** + * Same as above, but pretends to be writable as well. + */ +template +struct constant_writable_property_map { + typedef Key key_type; + typedef Value value_type; + typedef Value& reference; + typedef boost::read_write_property_map_tag category; + + constant_writable_property_map() + : m_value() + { } + + constant_writable_property_map(const value_type &value) + : m_value(value) + { } + + constant_writable_property_map(const constant_writable_property_map& copy) + : m_value(copy.m_value) + { } + + friend Value get(const constant_writable_property_map& me, Key) {return me.m_value;} + friend void put(const constant_writable_property_map&, Key, Value) {} + + value_type m_value; +}; + +template +inline constant_writable_property_map +make_constant_writable_property(const Value& value) +{ return constant_writable_property_map(value); } + } /* namespace boost */ #endif diff --git a/cpp/BoostParts/boost/graph/reverse_graph.hpp b/cpp/BoostParts/boost/graph/reverse_graph.hpp index bea975ab..7985e97f 100644 --- a/cpp/BoostParts/boost/graph/reverse_graph.hpp +++ b/cpp/BoostParts/boost/graph/reverse_graph.hpp @@ -433,7 +433,7 @@ namespace detail { { return m[k]; } -}; +} template struct property_traits > { diff --git a/cpp/BoostParts/boost/integer_traits.hpp b/cpp/BoostParts/boost/integer_traits.hpp index 98fdd93b..ddd56095 100644 --- a/cpp/BoostParts/boost/integer_traits.hpp +++ b/cpp/BoostParts/boost/integer_traits.hpp @@ -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 80740 2012-09-28 18:34:12Z jewillco $ + * $Id: integer_traits.hpp 81851 2012-12-11 14:42:26Z marshall $ * * Idea by Beman Dawes, Ed Brey, Steve Cleary, and Nathan Myers */ diff --git a/cpp/BoostParts/boost/intrusive/detail/has_member_function_callable_with.hpp b/cpp/BoostParts/boost/intrusive/detail/has_member_function_callable_with.hpp index 6516e280..5651b4c1 100644 --- a/cpp/BoostParts/boost/intrusive/detail/has_member_function_callable_with.hpp +++ b/cpp/BoostParts/boost/intrusive/detail/has_member_function_callable_with.hpp @@ -18,6 +18,7 @@ #include #include #include + #include #include #include @@ -85,7 +86,7 @@ void BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME(); }; - struct Base : public Type, public BaseMixin { Base(); }; + struct Base : public ::boost::intrusive::detail::remove_cv::type, public BaseMixin { Base(); }; template class Helper{}; template diff --git a/cpp/BoostParts/boost/intrusive/detail/memory_util.hpp b/cpp/BoostParts/boost/intrusive/detail/memory_util.hpp index 1a6431b0..7f69f91a 100644 --- a/cpp/BoostParts/boost/intrusive/detail/memory_util.hpp +++ b/cpp/BoostParts/boost/intrusive/detail/memory_util.hpp @@ -149,7 +149,7 @@ BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(difference_type) template struct first_param { typedef void type; }; -#if !defined(BOOST_NO_VARIADIC_TEMPLATES) +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template