mirror of
https://github.com/yuzu-emu/ext-boost.git
synced 2024-12-22 18:55:42 +00:00
commit
0b920df1c9
|
@ -1,7 +1,7 @@
|
|||
Boost libraries - trimmed down for Citra
|
||||
Boost libraries - trimmed down for yuzu
|
||||
========================================
|
||||
|
||||
This is a subset of Boost v1.64.0 generated using the bcp tool. To get a list of boost modules guaranteed to exist, check the build script.
|
||||
This is a subset of Boost v1.68.0 generated using the bcp tool. To get a list of boost modules guaranteed to exist, check the build script.
|
||||
|
||||
Updating this repo (on Windows)
|
||||
===============================
|
||||
|
|
553
boost/algorithm/minmax_element.hpp
Normal file
553
boost/algorithm/minmax_element.hpp
Normal file
|
@ -0,0 +1,553 @@
|
|||
// (C) Copyright Herve Bronnimann 2004.
|
||||
//
|
||||
// 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)
|
||||
|
||||
/*
|
||||
Revision history:
|
||||
1 July 2004
|
||||
Split the code into two headers to lessen dependence on
|
||||
Boost.tuple. (Herve)
|
||||
26 June 2004
|
||||
Added the code for the boost minmax library. (Herve)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_ALGORITHM_MINMAX_ELEMENT_HPP
|
||||
#define BOOST_ALGORITHM_MINMAX_ELEMENT_HPP
|
||||
|
||||
/* PROPOSED STANDARD EXTENSIONS:
|
||||
*
|
||||
* minmax_element(first, last)
|
||||
* Effect: std::make_pair( std::min_element(first, last),
|
||||
* std::max_element(first, last) );
|
||||
*
|
||||
* minmax_element(first, last, comp)
|
||||
* Effect: std::make_pair( std::min_element(first, last, comp),
|
||||
* std::max_element(first, last, comp) );
|
||||
*/
|
||||
|
||||
#include <utility> // for std::pair and std::make_pair
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace detail { // for obtaining a uniform version of minmax_element
|
||||
// that compiles with VC++ 6.0 -- avoid the iterator_traits by
|
||||
// having comparison object over iterator, not over dereferenced value
|
||||
|
||||
template <typename Iterator>
|
||||
struct less_over_iter {
|
||||
bool operator()(Iterator const& it1,
|
||||
Iterator const& it2) const { return *it1 < *it2; }
|
||||
};
|
||||
|
||||
template <typename Iterator, class BinaryPredicate>
|
||||
struct binary_pred_over_iter {
|
||||
explicit binary_pred_over_iter(BinaryPredicate const& p ) : m_p( p ) {}
|
||||
bool operator()(Iterator const& it1,
|
||||
Iterator const& it2) const { return m_p(*it1, *it2); }
|
||||
private:
|
||||
BinaryPredicate m_p;
|
||||
};
|
||||
|
||||
// common base for the two minmax_element overloads
|
||||
|
||||
template <typename ForwardIter, class Compare >
|
||||
std::pair<ForwardIter,ForwardIter>
|
||||
basic_minmax_element(ForwardIter first, ForwardIter last, Compare comp)
|
||||
{
|
||||
if (first == last)
|
||||
return std::make_pair(last,last);
|
||||
|
||||
ForwardIter min_result = first;
|
||||
ForwardIter max_result = first;
|
||||
|
||||
// if only one element
|
||||
ForwardIter second = first; ++second;
|
||||
if (second == last)
|
||||
return std::make_pair(min_result, max_result);
|
||||
|
||||
// treat first pair separately (only one comparison for first two elements)
|
||||
ForwardIter potential_min_result = last;
|
||||
if (comp(first, second))
|
||||
max_result = second;
|
||||
else {
|
||||
min_result = second;
|
||||
potential_min_result = first;
|
||||
}
|
||||
|
||||
// then each element by pairs, with at most 3 comparisons per pair
|
||||
first = ++second; if (first != last) ++second;
|
||||
while (second != last) {
|
||||
if (comp(first, second)) {
|
||||
if (comp(first, min_result)) {
|
||||
min_result = first;
|
||||
potential_min_result = last;
|
||||
}
|
||||
if (comp(max_result, second))
|
||||
max_result = second;
|
||||
} else {
|
||||
if (comp(second, min_result)) {
|
||||
min_result = second;
|
||||
potential_min_result = first;
|
||||
}
|
||||
if (comp(max_result, first))
|
||||
max_result = first;
|
||||
}
|
||||
first = ++second;
|
||||
if (first != last) ++second;
|
||||
}
|
||||
|
||||
// if odd number of elements, treat last element
|
||||
if (first != last) { // odd number of elements
|
||||
if (comp(first, min_result)) {
|
||||
min_result = first;
|
||||
potential_min_result = last;
|
||||
}
|
||||
else if (comp(max_result, first))
|
||||
max_result = first;
|
||||
}
|
||||
|
||||
// resolve min_result being incorrect with one extra comparison
|
||||
// (in which case potential_min_result is necessarily the correct result)
|
||||
if (potential_min_result != last
|
||||
&& !comp(min_result, potential_min_result))
|
||||
min_result = potential_min_result;
|
||||
|
||||
return std::make_pair(min_result,max_result);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template <typename ForwardIter>
|
||||
std::pair<ForwardIter,ForwardIter>
|
||||
minmax_element(ForwardIter first, ForwardIter last)
|
||||
{
|
||||
return detail::basic_minmax_element(first, last,
|
||||
detail::less_over_iter<ForwardIter>() );
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
std::pair<ForwardIter,ForwardIter>
|
||||
minmax_element(ForwardIter first, ForwardIter last, BinaryPredicate comp)
|
||||
{
|
||||
return detail::basic_minmax_element(first, last,
|
||||
detail::binary_pred_over_iter<ForwardIter,BinaryPredicate>(comp) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* PROPOSED BOOST EXTENSIONS
|
||||
* In the description below, [rfirst,rlast) denotes the reversed range
|
||||
* of [first,last). Even though the iterator type of first and last may
|
||||
* be only a Forward Iterator, it is possible to explain the semantics
|
||||
* by assuming that it is a Bidirectional Iterator. In the sequel,
|
||||
* reverse(ForwardIterator&) returns the reverse_iterator adaptor.
|
||||
* This is not how the functions would be implemented!
|
||||
*
|
||||
* first_min_element(first, last)
|
||||
* Effect: std::min_element(first, last);
|
||||
*
|
||||
* first_min_element(first, last, comp)
|
||||
* Effect: std::min_element(first, last, comp);
|
||||
*
|
||||
* last_min_element(first, last)
|
||||
* Effect: reverse( std::min_element(reverse(last), reverse(first)) );
|
||||
*
|
||||
* last_min_element(first, last, comp)
|
||||
* Effect: reverse( std::min_element(reverse(last), reverse(first), comp) );
|
||||
*
|
||||
* first_max_element(first, last)
|
||||
* Effect: std::max_element(first, last);
|
||||
*
|
||||
* first_max_element(first, last, comp)
|
||||
* Effect: max_element(first, last);
|
||||
*
|
||||
* last_max_element(first, last)
|
||||
* Effect: reverse( std::max_element(reverse(last), reverse(first)) );
|
||||
*
|
||||
* last_max_element(first, last, comp)
|
||||
* Effect: reverse( std::max_element(reverse(last), reverse(first), comp) );
|
||||
*
|
||||
* first_min_first_max_element(first, last)
|
||||
* Effect: std::make_pair( first_min_element(first, last),
|
||||
* first_max_element(first, last) );
|
||||
*
|
||||
* first_min_first_max_element(first, last, comp)
|
||||
* Effect: std::make_pair( first_min_element(first, last, comp),
|
||||
* first_max_element(first, last, comp) );
|
||||
*
|
||||
* first_min_last_max_element(first, last)
|
||||
* Effect: std::make_pair( first_min_element(first, last),
|
||||
* last_max_element(first, last) );
|
||||
*
|
||||
* first_min_last_max_element(first, last, comp)
|
||||
* Effect: std::make_pair( first_min_element(first, last, comp),
|
||||
* last_max_element(first, last, comp) );
|
||||
*
|
||||
* last_min_first_max_element(first, last)
|
||||
* Effect: std::make_pair( last_min_element(first, last),
|
||||
* first_max_element(first, last) );
|
||||
*
|
||||
* last_min_first_max_element(first, last, comp)
|
||||
* Effect: std::make_pair( last_min_element(first, last, comp),
|
||||
* first_max_element(first, last, comp) );
|
||||
*
|
||||
* last_min_last_max_element(first, last)
|
||||
* Effect: std::make_pair( last_min_element(first, last),
|
||||
* last_max_element(first, last) );
|
||||
*
|
||||
* last_min_last_max_element(first, last, comp)
|
||||
* Effect: std::make_pair( last_min_element(first, last, comp),
|
||||
* last_max_element(first, last, comp) );
|
||||
*/
|
||||
|
||||
namespace boost {
|
||||
|
||||
// Min_element and max_element variants
|
||||
|
||||
namespace detail { // common base for the overloads
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
ForwardIter
|
||||
basic_first_min_element(ForwardIter first, ForwardIter last,
|
||||
BinaryPredicate comp)
|
||||
{
|
||||
if (first == last) return last;
|
||||
ForwardIter min_result = first;
|
||||
while (++first != last)
|
||||
if (comp(first, min_result))
|
||||
min_result = first;
|
||||
return min_result;
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
ForwardIter
|
||||
basic_last_min_element(ForwardIter first, ForwardIter last,
|
||||
BinaryPredicate comp)
|
||||
{
|
||||
if (first == last) return last;
|
||||
ForwardIter min_result = first;
|
||||
while (++first != last)
|
||||
if (!comp(min_result, first))
|
||||
min_result = first;
|
||||
return min_result;
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
ForwardIter
|
||||
basic_first_max_element(ForwardIter first, ForwardIter last,
|
||||
BinaryPredicate comp)
|
||||
{
|
||||
if (first == last) return last;
|
||||
ForwardIter max_result = first;
|
||||
while (++first != last)
|
||||
if (comp(max_result, first))
|
||||
max_result = first;
|
||||
return max_result;
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
ForwardIter
|
||||
basic_last_max_element(ForwardIter first, ForwardIter last,
|
||||
BinaryPredicate comp)
|
||||
{
|
||||
if (first == last) return last;
|
||||
ForwardIter max_result = first;
|
||||
while (++first != last)
|
||||
if (!comp(first, max_result))
|
||||
max_result = first;
|
||||
return max_result;
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template <typename ForwardIter>
|
||||
ForwardIter
|
||||
first_min_element(ForwardIter first, ForwardIter last)
|
||||
{
|
||||
return detail::basic_first_min_element(first, last,
|
||||
detail::less_over_iter<ForwardIter>() );
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
ForwardIter
|
||||
first_min_element(ForwardIter first, ForwardIter last, BinaryPredicate comp)
|
||||
{
|
||||
return detail::basic_first_min_element(first, last,
|
||||
detail::binary_pred_over_iter<ForwardIter,BinaryPredicate>(comp) );
|
||||
}
|
||||
|
||||
template <typename ForwardIter>
|
||||
ForwardIter
|
||||
last_min_element(ForwardIter first, ForwardIter last)
|
||||
{
|
||||
return detail::basic_last_min_element(first, last,
|
||||
detail::less_over_iter<ForwardIter>() );
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
ForwardIter
|
||||
last_min_element(ForwardIter first, ForwardIter last, BinaryPredicate comp)
|
||||
{
|
||||
return detail::basic_last_min_element(first, last,
|
||||
detail::binary_pred_over_iter<ForwardIter,BinaryPredicate>(comp) );
|
||||
}
|
||||
|
||||
template <typename ForwardIter>
|
||||
ForwardIter
|
||||
first_max_element(ForwardIter first, ForwardIter last)
|
||||
{
|
||||
return detail::basic_first_max_element(first, last,
|
||||
detail::less_over_iter<ForwardIter>() );
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
ForwardIter
|
||||
first_max_element(ForwardIter first, ForwardIter last, BinaryPredicate comp)
|
||||
{
|
||||
return detail::basic_first_max_element(first, last,
|
||||
detail::binary_pred_over_iter<ForwardIter,BinaryPredicate>(comp) );
|
||||
}
|
||||
|
||||
template <typename ForwardIter>
|
||||
ForwardIter
|
||||
last_max_element(ForwardIter first, ForwardIter last)
|
||||
{
|
||||
return detail::basic_last_max_element(first, last,
|
||||
detail::less_over_iter<ForwardIter>() );
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
ForwardIter
|
||||
last_max_element(ForwardIter first, ForwardIter last, BinaryPredicate comp)
|
||||
{
|
||||
return detail::basic_last_max_element(first, last,
|
||||
detail::binary_pred_over_iter<ForwardIter,BinaryPredicate>(comp) );
|
||||
}
|
||||
|
||||
|
||||
// Minmax_element variants -- comments removed
|
||||
|
||||
namespace detail {
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
std::pair<ForwardIter,ForwardIter>
|
||||
basic_first_min_last_max_element(ForwardIter first, ForwardIter last,
|
||||
BinaryPredicate comp)
|
||||
{
|
||||
if (first == last)
|
||||
return std::make_pair(last,last);
|
||||
|
||||
ForwardIter min_result = first;
|
||||
ForwardIter max_result = first;
|
||||
|
||||
ForwardIter second = ++first;
|
||||
if (second == last)
|
||||
return std::make_pair(min_result, max_result);
|
||||
|
||||
if (comp(second, min_result))
|
||||
min_result = second;
|
||||
else
|
||||
max_result = second;
|
||||
|
||||
first = ++second; if (first != last) ++second;
|
||||
while (second != last) {
|
||||
if (!comp(second, first)) {
|
||||
if (comp(first, min_result))
|
||||
min_result = first;
|
||||
if (!comp(second, max_result))
|
||||
max_result = second;
|
||||
} else {
|
||||
if (comp(second, min_result))
|
||||
min_result = second;
|
||||
if (!comp(first, max_result))
|
||||
max_result = first;
|
||||
}
|
||||
first = ++second; if (first != last) ++second;
|
||||
}
|
||||
|
||||
if (first != last) {
|
||||
if (comp(first, min_result))
|
||||
min_result = first;
|
||||
else if (!comp(first, max_result))
|
||||
max_result = first;
|
||||
}
|
||||
|
||||
return std::make_pair(min_result, max_result);
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
std::pair<ForwardIter,ForwardIter>
|
||||
basic_last_min_first_max_element(ForwardIter first, ForwardIter last,
|
||||
BinaryPredicate comp)
|
||||
{
|
||||
if (first == last) return std::make_pair(last,last);
|
||||
|
||||
ForwardIter min_result = first;
|
||||
ForwardIter max_result = first;
|
||||
|
||||
ForwardIter second = ++first;
|
||||
if (second == last)
|
||||
return std::make_pair(min_result, max_result);
|
||||
|
||||
if (comp(max_result, second))
|
||||
max_result = second;
|
||||
else
|
||||
min_result = second;
|
||||
|
||||
first = ++second; if (first != last) ++second;
|
||||
while (second != last) {
|
||||
if (comp(first, second)) {
|
||||
if (!comp(min_result, first))
|
||||
min_result = first;
|
||||
if (comp(max_result, second))
|
||||
max_result = second;
|
||||
} else {
|
||||
if (!comp(min_result, second))
|
||||
min_result = second;
|
||||
if (comp(max_result, first))
|
||||
max_result = first;
|
||||
}
|
||||
first = ++second; if (first != last) ++second;
|
||||
}
|
||||
|
||||
if (first != last) {
|
||||
if (!comp(min_result, first))
|
||||
min_result = first;
|
||||
else if (comp(max_result, first))
|
||||
max_result = first;
|
||||
}
|
||||
|
||||
return std::make_pair(min_result, max_result);
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
std::pair<ForwardIter,ForwardIter>
|
||||
basic_last_min_last_max_element(ForwardIter first, ForwardIter last,
|
||||
BinaryPredicate comp)
|
||||
{
|
||||
if (first == last) return std::make_pair(last,last);
|
||||
|
||||
ForwardIter min_result = first;
|
||||
ForwardIter max_result = first;
|
||||
|
||||
ForwardIter second = first; ++second;
|
||||
if (second == last)
|
||||
return std::make_pair(min_result,max_result);
|
||||
|
||||
ForwardIter potential_max_result = last;
|
||||
if (comp(first, second))
|
||||
max_result = second;
|
||||
else {
|
||||
min_result = second;
|
||||
potential_max_result = second;
|
||||
}
|
||||
|
||||
first = ++second; if (first != last) ++second;
|
||||
while (second != last) {
|
||||
if (comp(first, second)) {
|
||||
if (!comp(min_result, first))
|
||||
min_result = first;
|
||||
if (!comp(second, max_result)) {
|
||||
max_result = second;
|
||||
potential_max_result = last;
|
||||
}
|
||||
} else {
|
||||
if (!comp(min_result, second))
|
||||
min_result = second;
|
||||
if (!comp(first, max_result)) {
|
||||
max_result = first;
|
||||
potential_max_result = second;
|
||||
}
|
||||
}
|
||||
first = ++second;
|
||||
if (first != last) ++second;
|
||||
}
|
||||
|
||||
if (first != last) {
|
||||
if (!comp(min_result, first))
|
||||
min_result = first;
|
||||
if (!comp(first, max_result)) {
|
||||
max_result = first;
|
||||
potential_max_result = last;
|
||||
}
|
||||
}
|
||||
|
||||
if (potential_max_result != last
|
||||
&& !comp(potential_max_result, max_result))
|
||||
max_result = potential_max_result;
|
||||
|
||||
return std::make_pair(min_result,max_result);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template <typename ForwardIter>
|
||||
inline std::pair<ForwardIter,ForwardIter>
|
||||
first_min_first_max_element(ForwardIter first, ForwardIter last)
|
||||
{
|
||||
return minmax_element(first, last);
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
inline std::pair<ForwardIter,ForwardIter>
|
||||
first_min_first_max_element(ForwardIter first, ForwardIter last,
|
||||
BinaryPredicate comp)
|
||||
{
|
||||
return minmax_element(first, last, comp);
|
||||
}
|
||||
|
||||
template <typename ForwardIter>
|
||||
std::pair<ForwardIter,ForwardIter>
|
||||
first_min_last_max_element(ForwardIter first, ForwardIter last)
|
||||
{
|
||||
return detail::basic_first_min_last_max_element(first, last,
|
||||
detail::less_over_iter<ForwardIter>() );
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
inline std::pair<ForwardIter,ForwardIter>
|
||||
first_min_last_max_element(ForwardIter first, ForwardIter last,
|
||||
BinaryPredicate comp)
|
||||
{
|
||||
return detail::basic_first_min_last_max_element(first, last,
|
||||
detail::binary_pred_over_iter<ForwardIter,BinaryPredicate>(comp) );
|
||||
}
|
||||
|
||||
template <typename ForwardIter>
|
||||
std::pair<ForwardIter,ForwardIter>
|
||||
last_min_first_max_element(ForwardIter first, ForwardIter last)
|
||||
{
|
||||
return detail::basic_last_min_first_max_element(first, last,
|
||||
detail::less_over_iter<ForwardIter>() );
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
inline std::pair<ForwardIter,ForwardIter>
|
||||
last_min_first_max_element(ForwardIter first, ForwardIter last,
|
||||
BinaryPredicate comp)
|
||||
{
|
||||
return detail::basic_last_min_first_max_element(first, last,
|
||||
detail::binary_pred_over_iter<ForwardIter,BinaryPredicate>(comp) );
|
||||
}
|
||||
|
||||
template <typename ForwardIter>
|
||||
std::pair<ForwardIter,ForwardIter>
|
||||
last_min_last_max_element(ForwardIter first, ForwardIter last)
|
||||
{
|
||||
return detail::basic_last_min_last_max_element(first, last,
|
||||
detail::less_over_iter<ForwardIter>() );
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
inline std::pair<ForwardIter,ForwardIter>
|
||||
last_min_last_max_element(ForwardIter first, ForwardIter last,
|
||||
BinaryPredicate comp)
|
||||
{
|
||||
return detail::basic_last_min_last_max_element(first, last,
|
||||
detail::binary_pred_over_iter<ForwardIter,BinaryPredicate>(comp) );
|
||||
}
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_ALGORITHM_MINMAX_ELEMENT_HPP
|
|
@ -2126,7 +2126,7 @@ template<class F, class A1, class A2, class A3, class A4, class A5, class A6, cl
|
|||
|
||||
#include <boost/bind/bind_cc.hpp>
|
||||
|
||||
# ifdef __cpp_noexcept_function_type
|
||||
# if defined( __cpp_noexcept_function_type ) || defined( _NOEXCEPT_TYPES_SUPPORTED )
|
||||
# undef BOOST_BIND_NOEXCEPT
|
||||
# define BOOST_BIND_NOEXCEPT noexcept
|
||||
# include <boost/bind/bind_cc.hpp>
|
||||
|
@ -2187,7 +2187,7 @@ template<class F, class A1, class A2, class A3, class A4, class A5, class A6, cl
|
|||
#include <boost/bind/bind_mf_cc.hpp>
|
||||
#include <boost/bind/bind_mf2_cc.hpp>
|
||||
|
||||
# ifdef __cpp_noexcept_function_type
|
||||
# if defined( __cpp_noexcept_function_type ) || defined( _NOEXCEPT_TYPES_SUPPORTED )
|
||||
# undef BOOST_BIND_MF_NOEXCEPT
|
||||
# define BOOST_BIND_MF_NOEXCEPT noexcept
|
||||
# include <boost/bind/bind_mf_cc.hpp>
|
||||
|
@ -2292,7 +2292,7 @@ template< class R, class T > struct add_cref< R (T::*) () const, 1 >
|
|||
typedef void type;
|
||||
};
|
||||
|
||||
#ifdef __cpp_noexcept_function_type
|
||||
#if defined( __cpp_noexcept_function_type ) || defined( _NOEXCEPT_TYPES_SUPPORTED )
|
||||
|
||||
template< class R, class T > struct add_cref< R (T::*) () const noexcept, 1 >
|
||||
{
|
||||
|
|
|
@ -174,6 +174,7 @@
|
|||
#define BOOST_NO_CXX11_CONSTEXPR
|
||||
#define BOOST_NO_CXX11_DECLTYPE_N3276
|
||||
#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_DEFAULTED_MOVES
|
||||
#define BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
|
@ -238,6 +239,9 @@
|
|||
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
||||
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||
#endif
|
||||
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
#endif
|
||||
|
||||
#if __BORLANDC__ >= 0x590
|
||||
# define BOOST_HAS_TR1_HASH
|
||||
|
|
|
@ -98,11 +98,15 @@
|
|||
//
|
||||
// Dynamic shared object (DSO) and dynamic-link library (DLL) support
|
||||
//
|
||||
#if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)
|
||||
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__)
|
||||
# define BOOST_HAS_DECLSPEC
|
||||
# define BOOST_SYMBOL_EXPORT __attribute__((__dllexport__))
|
||||
# define BOOST_SYMBOL_IMPORT __attribute__((__dllimport__))
|
||||
#else
|
||||
# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default")))
|
||||
# define BOOST_SYMBOL_IMPORT
|
||||
# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default")))
|
||||
#endif
|
||||
#define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default")))
|
||||
|
||||
//
|
||||
// The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through
|
||||
|
@ -290,6 +294,10 @@
|
|||
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
|
||||
#endif
|
||||
|
||||
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
#endif
|
||||
|
||||
// Clang 3.9+ in c++1z
|
||||
#if !__has_cpp_attribute(fallthrough) || __cplusplus < 201406L
|
||||
# define BOOST_NO_CXX17_INLINE_VARIABLES
|
||||
|
|
|
@ -167,6 +167,10 @@
|
|||
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||
#endif
|
||||
|
||||
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
#endif
|
||||
|
||||
//
|
||||
// TR1 macros:
|
||||
//
|
||||
|
|
|
@ -149,6 +149,10 @@
|
|||
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||
#endif
|
||||
|
||||
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
#endif
|
||||
|
||||
#ifdef c_plusplus
|
||||
// EDG has "long long" in non-strict mode
|
||||
// However, some libraries have insufficient "long long" support
|
||||
|
|
|
@ -1,68 +1,227 @@
|
|||
// (C) Copyright John Maddock 2011.
|
||||
// (C) Copyright Cray, Inc. 2013
|
||||
// Copyright 2011 John Maddock
|
||||
// Copyright 2013, 2017-2018 Cray, Inc.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// Greenhills C compiler setup:
|
||||
// Cray C++ compiler setup.
|
||||
//
|
||||
// There are a few parameters that affect the macros defined in this file:
|
||||
//
|
||||
// - What version of CCE (Cray Compiling Environment) are we running? This
|
||||
// comes from the '_RELEASE_MAJOR', '_RELEASE_MINOR', and
|
||||
// '_RELEASE_PATCHLEVEL' macros.
|
||||
// - What C++ standards conformance level are we using (e.g. '-h
|
||||
// std=c++14')? This comes from the '__cplusplus' macro.
|
||||
// - Are we using GCC extensions ('-h gnu' or '-h nognu')? If we have '-h
|
||||
// gnu' then CCE emulates GCC, and the macros '__GNUC__',
|
||||
// '__GNUC_MINOR__', and '__GNUC_PATCHLEVEL__' are defined.
|
||||
//
|
||||
// This file is organized as follows:
|
||||
//
|
||||
// - Verify that the combination of parameters listed above is supported.
|
||||
// If we have an unsupported combination, we abort with '#error'.
|
||||
// - Establish baseline values for all Boost macros.
|
||||
// - Apply changes to the baseline macros based on compiler version. These
|
||||
// changes are cummulative so each version section only describes the
|
||||
// changes since the previous version.
|
||||
// - Within each version section, we may also apply changes based on
|
||||
// other parameters (i.e. C++ standards conformance level and GCC
|
||||
// extensions).
|
||||
//
|
||||
// To test changes to this file:
|
||||
//
|
||||
// ```
|
||||
// module load cce/8.6.5 # Pick the version you want to test.
|
||||
// cd boost/libs/config/test/all
|
||||
// b2 -j 8 toolset=cray cxxstd=03 cxxstd=11 cxxstd=14 cxxstd-dialect=gnu linkflags=-lrt
|
||||
// ```
|
||||
// Note: Using 'cxxstd-dialect=iso' is not supported at this time (the
|
||||
// tests run, but many tests fail).
|
||||
//
|
||||
// Note: 'linkflags=-lrt' is needed in Cray Linux Environment. Otherwise
|
||||
// you get an 'undefined reference to clock_gettime' error.
|
||||
//
|
||||
// Note: If a test '*_fail.cpp' file compiles, but fails to run, then it is
|
||||
// reported as a defect. However, this is not actually a defect. This is an
|
||||
// area where the test system is somewhat broken. Tests that are failing
|
||||
// because of this problem are noted in the comments.
|
||||
//
|
||||
// Pay attention to the macro definitions for the macros you wish to
|
||||
// modify. For example, only macros categorized as compiler macros should
|
||||
// appear in this file; platform macros should not appear in this file.
|
||||
// Also, some macros have to be defined to specific values; it is not
|
||||
// always enough to define or undefine a macro.
|
||||
//
|
||||
// Macro definitions are available in the source code at:
|
||||
//
|
||||
// `boost/libs/config/doc/html/boost_config/boost_macro_reference.html`
|
||||
//
|
||||
// Macro definitions are also available online at:
|
||||
//
|
||||
// http://www.boost.org/doc/libs/master/libs/config/doc/html/boost_config/boost_macro_reference.html
|
||||
//
|
||||
// Typically, if you enable a feature, and the tests pass, then you have
|
||||
// nothing to worry about. However, it's sometimes hard to figure out if a
|
||||
// disabled feature needs to stay disabled. To get a list of disabled
|
||||
// features, run 'b2' in 'boost/libs/config/checks'. These are the macros
|
||||
// you should pay attention to (in addition to macros that cause test
|
||||
// failures).
|
||||
|
||||
#define BOOST_COMPILER "Cray C version " BOOST_STRINGIZE(_RELEASE)
|
||||
////
|
||||
//// Front matter
|
||||
////
|
||||
|
||||
#if _RELEASE_MAJOR < 8
|
||||
// In a developer build of the Cray compiler (i.e. a compiler built by a
|
||||
// Cray employee), the release patch level is reported as "x". This gives
|
||||
// versions that look like e.g. "8.6.x".
|
||||
//
|
||||
// To accomplish this, the the Cray compiler preprocessor inserts:
|
||||
//
|
||||
// #define _RELEASE_PATCHLEVEL x
|
||||
//
|
||||
// If we are using a developer build of the compiler, we want to use the
|
||||
// configuration macros for the most recent patch level of the release. To
|
||||
// accomplish this, we'll pretend that _RELEASE_PATCHLEVEL is 99.
|
||||
//
|
||||
// However, it's difficult to detect if _RELEASE_PATCHLEVEL is x. We must
|
||||
// consider that the x will be expanded if x is defined as a macro
|
||||
// elsewhere. For example, imagine if someone put "-D x=3" on the command
|
||||
// line, and _RELEASE_PATCHLEVEL is x. Then _RELEASE_PATCHLEVEL would
|
||||
// expand to 3, and we could not distinguish it from an actual
|
||||
// _RELEASE_PATCHLEVEL of 3. This problem only affects developer builds; in
|
||||
// production builds, _RELEASE_PATCHLEVEL is always an integer.
|
||||
//
|
||||
// IMPORTANT: In developer builds, if x is defined as a macro, you will get
|
||||
// an incorrect configuration. The behavior in this case is undefined.
|
||||
//
|
||||
// Even if x is not defined, we have to use some trickery to detect if
|
||||
// _RELEASE_PATCHLEVEL is x. First we define BOOST_CRAY_x to some arbitrary
|
||||
// magic value, 9867657. Then we use BOOST_CRAY_APPEND to append the
|
||||
// expanded value of _RELEASE_PATCHLEVEL to the string "BOOST_CRAY_".
|
||||
//
|
||||
// - If _RELEASE_PATCHLEVEL is undefined, we get "BOOST_CRAY_".
|
||||
// - If _RELEASE_PATCHLEVEL is 5, we get "BOOST_CRAY_5".
|
||||
// - If _RELEASE_PATCHLEVEL is x (and x is not defined) we get
|
||||
// "BOOST_CRAY_x":
|
||||
//
|
||||
// Then we check if BOOST_CRAY_x is equal to the output of
|
||||
// BOOST_CRAY_APPEND. In other words, the output of BOOST_CRAY_APPEND is
|
||||
// treated as a macro name, and expanded again. If we can safely assume
|
||||
// that BOOST_CRAY_ is not a macro defined as our magic number, and
|
||||
// BOOST_CRAY_5 is not a macro defined as our magic number, then the only
|
||||
// way the equality test can pass is if _RELEASE_PATCHLEVEL expands to x.
|
||||
//
|
||||
// So, that is how we detect if we are using a developer build of the Cray
|
||||
// compiler.
|
||||
|
||||
#define BOOST_CRAY_x 9867657 // Arbitrary number
|
||||
#define BOOST_CRAY_APPEND(MACRO) BOOST_CRAY_APPEND_INTERNAL(MACRO)
|
||||
#define BOOST_CRAY_APPEND_INTERNAL(MACRO) BOOST_CRAY_##MACRO
|
||||
|
||||
#if BOOST_CRAY_x == BOOST_CRAY_APPEND(_RELEASE_PATCHLEVEL)
|
||||
|
||||
// This is a developer build.
|
||||
//
|
||||
// - _RELEASE_PATCHLEVEL is defined as x, and x is not defined as a macro.
|
||||
|
||||
// Pretend _RELEASE_PATCHLEVEL is 99, so we get the configuration for the
|
||||
// most recent patch level in this release.
|
||||
|
||||
#define BOOST_CRAY_VERSION (_RELEASE_MAJOR * 10000 + _RELEASE_MINOR * 100 + 99)
|
||||
|
||||
#else
|
||||
|
||||
// This is a production build.
|
||||
//
|
||||
// _RELEASE_PATCHLEVEL is not defined as x, or x is defined as a macro.
|
||||
|
||||
#define BOOST_CRAY_VERSION (_RELEASE_MAJOR * 10000 + _RELEASE_MINOR * 100 + _RELEASE_PATCHLEVEL)
|
||||
|
||||
#endif // BOOST_CRAY_x == BOOST_CRAY_APPEND(_RELEASE_PATCHLEVEL)
|
||||
|
||||
#undef BOOST_CRAY_APPEND_INTERNAL
|
||||
#undef BOOST_CRAY_APPEND
|
||||
#undef BOOST_CRAY_x
|
||||
|
||||
|
||||
#ifdef __GNUC__
|
||||
# define BOOST_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_COMPILER
|
||||
# define BOOST_COMPILER "Cray C++ version " BOOST_STRINGIZE(_RELEASE_MAJOR) "." BOOST_STRINGIZE(_RELEASE_MINOR) "." BOOST_STRINGIZE(_RELEASE_PATCHLEVEL)
|
||||
#endif
|
||||
|
||||
// Since the Cray compiler defines '__GNUC__', we have to emulate some
|
||||
// additional GCC macros in order to make everything work.
|
||||
//
|
||||
// FIXME: Perhaps Cray should fix the compiler to define these additional
|
||||
// macros for GCC emulation?
|
||||
|
||||
#if __cplusplus >= 201103L && defined(__GNUC__) && !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
# define __GXX_EXPERIMENTAL_CXX0X__ 1
|
||||
#endif
|
||||
|
||||
////
|
||||
//// Parameter validation
|
||||
////
|
||||
|
||||
// FIXME: Do we really need to support compilers before 8.5? Do they pass
|
||||
// the Boost.Config tests?
|
||||
|
||||
#if BOOST_CRAY_VERSION < 80000
|
||||
# error "Boost is not configured for Cray compilers prior to version 8, please try the configure script."
|
||||
#endif
|
||||
|
||||
//
|
||||
// Check this is a recent EDG based compiler, otherwise we don't support it here:
|
||||
//
|
||||
#ifndef __EDG_VERSION__
|
||||
// We only support recent EDG based compilers.
|
||||
|
||||
#ifndef __EDG__
|
||||
# error "Unsupported Cray compiler, please try running the configure script."
|
||||
#endif
|
||||
|
||||
#if _RELEASE_MINOR < 5 || __cplusplus < 201100
|
||||
////
|
||||
//// Baseline values
|
||||
////
|
||||
|
||||
#include <boost/config/compiler/common_edg.hpp>
|
||||
|
||||
//
|
||||
//
|
||||
#define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#define BOOST_HAS_NRVO
|
||||
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
|
||||
#define BOOST_NO_CXX11_AUTO_DECLARATIONS
|
||||
#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
|
||||
#define BOOST_HAS_NRVO
|
||||
#define BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
#define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#define BOOST_HAS_NRVO
|
||||
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
#define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#define BOOST_NO_CXX11_RANGE_BASED_FOR
|
||||
#define BOOST_NO_CXX11_RAW_LITERALS
|
||||
#define BOOST_NO_CXX11_NULLPTR
|
||||
#define BOOST_NO_CXX11_NOEXCEPT
|
||||
#define BOOST_NO_CXX11_CHAR16_T
|
||||
#define BOOST_NO_CXX11_CHAR32_T
|
||||
#define BOOST_NO_CXX11_CONSTEXPR
|
||||
#define BOOST_NO_CXX11_DECLTYPE
|
||||
#define BOOST_NO_CXX11_DECLTYPE_N3276
|
||||
#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
||||
#define BOOST_NO_CXX11_FINAL
|
||||
#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_CXX11_LAMBDAS
|
||||
#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
||||
#define BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_DECLTYPE_N3276
|
||||
#define BOOST_NO_CXX11_DECLTYPE
|
||||
#define BOOST_NO_CXX11_CONSTEXPR
|
||||
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
||||
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
|
||||
#define BOOST_NO_CXX11_CHAR32_T
|
||||
#define BOOST_NO_CXX11_CHAR16_T
|
||||
#define BOOST_NO_CXX11_NOEXCEPT
|
||||
#define BOOST_NO_CXX11_NULLPTR
|
||||
#define BOOST_NO_CXX11_RANGE_BASED_FOR
|
||||
#define BOOST_NO_CXX11_RAW_LITERALS
|
||||
#define BOOST_NO_CXX11_REF_QUALIFIERS
|
||||
#define BOOST_NO_CXX11_FINAL
|
||||
#define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#define BOOST_NO_CXX11_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
#define BOOST_NO_CXX11_THREAD_LOCAL
|
||||
|
||||
#define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
||||
#define BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
|
||||
//#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
|
||||
#define BOOST_MATH_DISABLE_STD_FPCLASSIFY
|
||||
|
@ -71,15 +230,15 @@
|
|||
#define BOOST_SP_USE_PTHREADS
|
||||
#define BOOST_AC_USE_PTHREADS
|
||||
|
||||
/* everything that follows is working around what are thought to be
|
||||
* compiler shortcomings. Revist all of these regularly.
|
||||
*/
|
||||
//
|
||||
// Everything that follows is working around what are thought to be
|
||||
// compiler shortcomings. Revist all of these regularly.
|
||||
//
|
||||
|
||||
//#define BOOST_USE_ENUM_STATIC_ASSERT
|
||||
//#define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS //(this may be implied by the previous #define
|
||||
|
||||
// These constants should be provided by the
|
||||
// compiler, at least when -hgnu is asserted on the command line.
|
||||
// These constants should be provided by the compiler.
|
||||
|
||||
#ifndef __ATOMIC_RELAXED
|
||||
#define __ATOMIC_RELAXED 0
|
||||
|
@ -90,7 +249,55 @@
|
|||
#define __ATOMIC_SEQ_CST 5
|
||||
#endif
|
||||
|
||||
#else /* _RELEASE_MINOR */
|
||||
////
|
||||
//// Version changes
|
||||
////
|
||||
|
||||
//
|
||||
// 8.5.0
|
||||
//
|
||||
|
||||
#if BOOST_CRAY_VERSION >= 80500
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
|
||||
#undef BOOST_HAS_NRVO
|
||||
#undef BOOST_NO_COMPLETE_VALUE_INITIALIZATION
|
||||
#undef BOOST_NO_CXX11_AUTO_DECLARATIONS
|
||||
#undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
|
||||
#undef BOOST_NO_CXX11_CHAR16_T
|
||||
#undef BOOST_NO_CXX11_CHAR32_T
|
||||
#undef BOOST_NO_CXX11_CONSTEXPR
|
||||
#undef BOOST_NO_CXX11_DECLTYPE
|
||||
#undef BOOST_NO_CXX11_DECLTYPE_N3276
|
||||
#undef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
|
||||
#undef BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
#undef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
||||
#undef BOOST_NO_CXX11_FINAL
|
||||
#undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#undef BOOST_NO_CXX11_LAMBDAS
|
||||
#undef BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#undef BOOST_NO_CXX11_NOEXCEPT
|
||||
#undef BOOST_NO_CXX11_NULLPTR
|
||||
#undef BOOST_NO_CXX11_RANGE_BASED_FOR
|
||||
#undef BOOST_NO_CXX11_RAW_LITERALS
|
||||
#undef BOOST_NO_CXX11_REF_QUALIFIERS
|
||||
#undef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#undef BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#undef BOOST_NO_CXX11_SFINAE_EXPR
|
||||
#undef BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#undef BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
#undef BOOST_NO_CXX11_THREAD_LOCAL
|
||||
#undef BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
#undef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
#undef BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
||||
#undef BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
#undef BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
#undef BOOST_NO_SFINAE_EXPR
|
||||
#undef BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#undef BOOST_MATH_DISABLE_STD_FPCLASSIFY
|
||||
#undef BOOST_SP_USE_PTHREADS
|
||||
#undef BOOST_AC_USE_PTHREADS
|
||||
|
||||
#define BOOST_HAS_VARIADIC_TMPL
|
||||
#define BOOST_HAS_UNISTD_H
|
||||
|
@ -114,11 +321,120 @@
|
|||
#define BOOST_HAS_LONG_LONG
|
||||
#define BOOST_HAS_FLOAT128
|
||||
|
||||
#if __cplusplus < 201400
|
||||
#if __cplusplus < 201402L
|
||||
#define BOOST_NO_CXX11_DECLTYPE_N3276
|
||||
#endif /* __cpluspus */
|
||||
#endif // __cplusplus < 201402L
|
||||
|
||||
#endif /* _RELEASE_MINOR */
|
||||
#endif // __cplusplus >= 201103L
|
||||
|
||||
#endif // BOOST_CRAY_VERSION >= 80500
|
||||
|
||||
//
|
||||
// 8.6.4
|
||||
// (versions prior to 8.6.5 do not define _RELEASE_PATCHLEVEL)
|
||||
//
|
||||
|
||||
#if BOOST_CRAY_VERSION >= 80600
|
||||
|
||||
#if __cplusplus >= 199711L
|
||||
#define BOOST_HAS_FLOAT128
|
||||
#define BOOST_HAS_PTHREAD_YIELD // This is a platform macro, but it improves test results.
|
||||
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION // This is correct. Test compiles, but fails to run.
|
||||
#undef BOOST_NO_CXX11_CHAR16_T
|
||||
#undef BOOST_NO_CXX11_CHAR32_T
|
||||
#undef BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||
#undef BOOST_NO_CXX11_FINAL
|
||||
#undef BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
|
||||
#undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_CXX11_SFINAE_EXPR // This is correct, even though '*_fail.cpp' test fails.
|
||||
#undef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
#undef BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
#undef BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
// 'BOOST_NO_DEDUCED_TYPENAME' test is broken. The test files are enabled /
|
||||
// disabled with an '#ifdef BOOST_DEDUCED_TYPENAME'. However,
|
||||
// 'boost/libs/config/include/boost/config/detail/suffix.hpp' ensures that
|
||||
// 'BOOST_DEDUCED_TYPENAME' is always defined (the value it is defined as
|
||||
// depends on 'BOOST_NO_DEDUCED_TYPENAME'). So, modifying
|
||||
// 'BOOST_NO_DEDUCED_TYPENAME' has no effect on which tests are run.
|
||||
//
|
||||
// The 'no_ded_typename_pass.cpp' test should always compile and run
|
||||
// successfully, because 'BOOST_DEDUCED_TYPENAME' must always have an
|
||||
// appropriate value (it's not just something that you turn on or off).
|
||||
// Therefore, if you wish to test changes to 'BOOST_NO_DEDUCED_TYPENAME',
|
||||
// you have to modify 'no_ded_typename_pass.cpp' to unconditionally include
|
||||
// 'boost_no_ded_typename.ipp'.
|
||||
#undef BOOST_NO_DEDUCED_TYPENAME // This is correct. Test is broken.
|
||||
#undef BOOST_NO_SFINAE_EXPR
|
||||
#undef BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#endif // __cplusplus >= 199711L
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
#undef BOOST_NO_CXX11_ALIGNAS
|
||||
#undef BOOST_NO_CXX11_DECLTYPE_N3276
|
||||
#define BOOST_NO_CXX11_HDR_ATOMIC
|
||||
#undef BOOST_NO_CXX11_HDR_FUNCTIONAL
|
||||
#define BOOST_NO_CXX11_HDR_REGEX // This is correct. Test compiles, but fails to run.
|
||||
#undef BOOST_NO_CXX11_SFINAE_EXPR
|
||||
#undef BOOST_NO_CXX11_SMART_PTR
|
||||
#undef BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||
#endif // __cplusplus >= 201103L
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
#undef BOOST_NO_CXX14_CONSTEXPR
|
||||
#define BOOST_NO_CXX14_DIGIT_SEPARATORS
|
||||
#endif // __cplusplus == 201402L
|
||||
|
||||
#endif // BOOST_CRAY_VERSION >= 80600
|
||||
|
||||
//
|
||||
// 8.6.5
|
||||
// (no change from 8.6.4)
|
||||
//
|
||||
|
||||
//
|
||||
// 8.7.0
|
||||
//
|
||||
|
||||
#if BOOST_CRAY_VERSION >= 80700
|
||||
|
||||
#if __cplusplus >= 199711L
|
||||
#endif // __cplusplus >= 199711L
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
#undef BOOST_NO_CXX11_HDR_ATOMIC
|
||||
#undef BOOST_NO_CXX11_HDR_REGEX
|
||||
#endif // __cplusplus >= 201103L
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
#endif // __cplusplus == 201402L
|
||||
|
||||
#endif // BOOST_CRAY_VERSION >= 80700
|
||||
|
||||
//
|
||||
// Next release
|
||||
//
|
||||
|
||||
#if BOOST_CRAY_VERSION > 80799
|
||||
|
||||
#if __cplusplus >= 199711L
|
||||
#endif // __cplusplus >= 199711L
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
#endif // __cplusplus >= 201103L
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
#endif // __cplusplus == 201402L
|
||||
|
||||
#endif // BOOST_CRAY_VERSION > 80799
|
||||
|
||||
////
|
||||
//// Remove temporary macros
|
||||
////
|
||||
|
||||
// I've commented out some '#undef' statements to signify that we purposely
|
||||
// want to keep certain macros.
|
||||
|
||||
//#undef __GXX_EXPERIMENTAL_CXX0X__
|
||||
//#undef BOOST_COMPILER
|
||||
#undef BOOST_GCC_VERSION
|
||||
#undef BOOST_CRAY_VERSION
|
||||
|
|
|
@ -12,8 +12,15 @@
|
|||
|
||||
#include "boost/config/compiler/common_edg.hpp"
|
||||
|
||||
#define BOOST_HAS_LONG_LONG
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS
|
||||
|
||||
#define BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE
|
||||
#define BOOST_LOG_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
#define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||
|
||||
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_CXX11_HDR_CODECVT
|
||||
#define BOOST_NO_CXX11_NUMERIC_LIMITS
|
||||
|
||||
#define BOOST_COMPILER "Wind River Diab " BOOST_STRINGIZE(__VERSION_NUMBER__)
|
||||
|
|
|
@ -124,6 +124,9 @@
|
|||
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
||||
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||
#endif
|
||||
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
#endif
|
||||
|
||||
#if (__DMC__ <= 0x840)
|
||||
#error "Compiler not supported or configured - please reconfigure"
|
||||
|
|
|
@ -99,10 +99,10 @@
|
|||
// Dynamic shared object (DSO) and dynamic-link library (DLL) support
|
||||
//
|
||||
#if __GNUC__ >= 4
|
||||
# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(__CYGWIN__)
|
||||
# if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__)
|
||||
// All Win32 development environments, including 64-bit Windows and MinGW, define
|
||||
// _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment,
|
||||
// so does not define _WIN32 or its variants.
|
||||
// so does not define _WIN32 or its variants, but still supports dllexport/dllimport.
|
||||
# define BOOST_HAS_DECLSPEC
|
||||
# define BOOST_SYMBOL_EXPORT __attribute__((__dllexport__))
|
||||
# define BOOST_SYMBOL_IMPORT __attribute__((__dllimport__))
|
||||
|
@ -233,6 +233,7 @@
|
|||
//
|
||||
#if (BOOST_GCC_VERSION < 40600) || !defined(BOOST_GCC_CXX11)
|
||||
#define BOOST_NO_CXX11_CONSTEXPR
|
||||
#define BOOST_NO_CXX11_DEFAULTED_MOVES
|
||||
#define BOOST_NO_CXX11_NOEXCEPT
|
||||
#define BOOST_NO_CXX11_NULLPTR
|
||||
#define BOOST_NO_CXX11_RANGE_BASED_FOR
|
||||
|
@ -284,7 +285,7 @@
|
|||
#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
|
||||
# define BOOST_NO_CXX14_CONSTEXPR
|
||||
#endif
|
||||
#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
|
||||
#if (BOOST_GCC_VERSION < 50200) || !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
|
||||
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
|
||||
#endif
|
||||
|
||||
|
@ -298,6 +299,9 @@
|
|||
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
||||
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||
#endif
|
||||
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
#endif
|
||||
|
||||
#if __GNUC__ >= 7
|
||||
# define BOOST_FALLTHROUGH __attribute__((fallthrough))
|
||||
|
|
|
@ -102,6 +102,9 @@
|
|||
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
||||
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||
#endif
|
||||
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
#endif
|
||||
|
||||
#define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
|
||||
#undef BOOST_GCC_VERSION
|
||||
#undef BOOST_GCC_CXX11
|
||||
#undef BOOST_GCC
|
||||
|
||||
// Broken in all versions up to 17 (newer versions not tested)
|
||||
#if (__INTEL_COMPILER <= 1700) && !defined(BOOST_NO_CXX14_CONSTEXPR)
|
||||
|
|
|
@ -167,6 +167,9 @@
|
|||
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
||||
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||
#endif
|
||||
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
#endif
|
||||
|
||||
#define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
|
||||
|
||||
|
|
|
@ -116,6 +116,9 @@
|
|||
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
||||
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||
#endif
|
||||
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
#endif
|
||||
|
||||
//
|
||||
// versions check:
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#endif
|
||||
|
||||
#if defined(__CUDACC_VER_MAJOR__) && defined(__CUDACC_VER_MINOR__) && defined(__CUDACC_VER_BUILD__)
|
||||
# define BOOST_CUDA_VERSION __CUDACC_VER_MAJOR__ * 1000000 + __CUDACC_VER_MINOR__ * 10000 + __CUDACC_VER_BUILD__
|
||||
# define BOOST_CUDA_VERSION (__CUDACC_VER_MAJOR__ * 1000000 + __CUDACC_VER_MINOR__ * 10000 + __CUDACC_VER_BUILD__)
|
||||
#else
|
||||
// We don't really know what the CUDA version is, but it's definitely before 7.5:
|
||||
# define BOOST_CUDA_VERSION 7000000
|
||||
|
@ -33,8 +33,8 @@
|
|||
#if (BOOST_CUDA_VERSION > 8000000) && (BOOST_CUDA_VERSION < 8010000)
|
||||
# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
#endif
|
||||
// Most recent CUDA (8.0) has no constexpr support in msvc mode:
|
||||
#if defined(_MSC_VER)
|
||||
// CUDA (8.0) has no constexpr support in msvc mode:
|
||||
#if defined(_MSC_VER) && (BOOST_CUDA_VERSION < 9000000)
|
||||
# define BOOST_NO_CXX11_CONSTEXPR
|
||||
#endif
|
||||
|
||||
|
|
|
@ -129,4 +129,7 @@
|
|||
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
||||
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||
#endif
|
||||
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -182,6 +182,9 @@
|
|||
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
||||
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||
#endif
|
||||
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
#endif
|
||||
|
||||
// Turn on threading support for Solaris 12.
|
||||
// Ticket #11972
|
||||
|
|
|
@ -178,3 +178,6 @@
|
|||
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
||||
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||
#endif
|
||||
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
#endif
|
||||
|
|
|
@ -167,6 +167,7 @@
|
|||
//
|
||||
#if (_MSC_FULL_VER < 190023026)
|
||||
# define BOOST_NO_CXX11_NOEXCEPT
|
||||
# define BOOST_NO_CXX11_DEFAULTED_MOVES
|
||||
# define BOOST_NO_CXX11_REF_QUALIFIERS
|
||||
# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
||||
# define BOOST_NO_CXX11_ALIGNAS
|
||||
|
@ -200,6 +201,7 @@
|
|||
//
|
||||
#if (_MSC_VER < 1911) || (_MSVC_LANG < 201703)
|
||||
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
|
||||
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
#endif
|
||||
|
||||
// MSVC including version 14 has not yet completely
|
||||
|
@ -217,17 +219,29 @@
|
|||
// https://connect.microsoft.com/VisualStudio/feedback/details/1582233/c-subobjects-still-not-value-initialized-correctly
|
||||
// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
|
||||
// (Niels Dekker, LKEB, May 2010)
|
||||
// Still present in VC15.5, Dec 2017.
|
||||
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
|
||||
//
|
||||
// C++ 11:
|
||||
//
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
// This is supported with /permissive- for 15.5 onwards, unfortunately we appear to have no way to tell
|
||||
// if this is in effect or not, in any case nothing in Boost is currently using this, so we'll just go
|
||||
// on defining it for now:
|
||||
//
|
||||
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
|
||||
#if (_MSC_VER < 1912) || (_MSVC_LANG < 201402)
|
||||
// Supported from msvc-15.5 onwards:
|
||||
#define BOOST_NO_CXX11_SFINAE_EXPR
|
||||
#endif
|
||||
// C++ 14:
|
||||
// Still gives internal compiler error for msvc-15.5:
|
||||
# define BOOST_NO_CXX14_CONSTEXPR
|
||||
// C++ 17:
|
||||
#if (_MSC_VER < 1912) || (_MSVC_LANG < 201703)
|
||||
#define BOOST_NO_CXX17_INLINE_VARIABLES
|
||||
#define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||
#endif
|
||||
|
||||
//
|
||||
// Things that don't work in clr mode:
|
||||
|
@ -325,12 +339,17 @@
|
|||
# define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
|
||||
#endif
|
||||
|
||||
#include <boost/config/pragma_message.hpp>
|
||||
|
||||
//
|
||||
// last known and checked version is 19.11.25547 (VC++ 2017.4):
|
||||
#if (_MSC_VER > 1911)
|
||||
// last known and checked version is 19.12.25830.2 (VC++ 2017.3):
|
||||
#if (_MSC_VER > 1912)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Boost.Config is older than your current compiler version."
|
||||
# elif !defined(BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE)
|
||||
# pragma message("Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an update Boost version. Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message.")
|
||||
//
|
||||
// Disabled as of March 2018 - the pace of VS releases is hard to keep up with
|
||||
// and in any case, we have relatively few defect macros defined now.
|
||||
// BOOST_PRAGMA_MESSAGE("Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an updated Boost version. Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message.")
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -246,6 +246,10 @@
|
|||
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
|
||||
#endif
|
||||
|
||||
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
#endif
|
||||
|
||||
// Clang 3.9+ in c++1z
|
||||
#if !__has_cpp_attribute(fallthrough) || __cplusplus < 201406L
|
||||
# define BOOST_NO_CXX17_INLINE_VARIABLES
|
||||
|
|
|
@ -153,6 +153,7 @@
|
|||
#define BOOST_NO_CXX17_STRUCTURED_BINDINGS
|
||||
#define BOOST_NO_CXX17_INLINE_VARIABLES
|
||||
#define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||
#define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
|
||||
// -------------------------------------
|
||||
|
||||
|
|
|
@ -537,25 +537,10 @@ namespace std{ using ::type_info; }
|
|||
|
||||
// ---------------------------------------------------------------------------//
|
||||
|
||||
//
|
||||
// Helper macro BOOST_STRINGIZE:
|
||||
// Converts the parameter X to a string after macro replacement
|
||||
// on X has been performed.
|
||||
//
|
||||
#define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
|
||||
#define BOOST_DO_STRINGIZE(X) #X
|
||||
|
||||
//
|
||||
// Helper macro BOOST_JOIN:
|
||||
// The following piece of macro magic joins the two
|
||||
// arguments together, even when one of the arguments is
|
||||
// itself a macro (see 16.3.1 in C++ standard). The key
|
||||
// is that macro expansion of macro arguments does not
|
||||
// occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN.
|
||||
//
|
||||
#define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y )
|
||||
#define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y)
|
||||
#define BOOST_DO_JOIN2( X, Y ) X##Y
|
||||
|
||||
#include <boost/config/helper_macros.hpp>
|
||||
|
||||
//
|
||||
// Set some default values for compiler/library/platform names.
|
||||
|
@ -702,6 +687,11 @@ namespace std{ using ::type_info; }
|
|||
# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS
|
||||
#endif
|
||||
|
||||
// Lack of defaulted moves is implied by the lack of either rvalue references or any defaulted functions
|
||||
#if !defined(BOOST_NO_CXX11_DEFAULTED_MOVES) && (defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || defined(BOOST_NO_CXX11_RVALUE_REFERENCES))
|
||||
# define BOOST_NO_CXX11_DEFAULTED_MOVES
|
||||
#endif
|
||||
|
||||
// Defaulted and deleted function declaration helpers
|
||||
// These macros are intended to be inside a class definition.
|
||||
// BOOST_DEFAULTED_FUNCTION accepts the function declaration and its
|
||||
|
|
26
boost/config/header_deprecated.hpp
Normal file
26
boost/config/header_deprecated.hpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
#ifndef BOOST_CONFIG_HEADER_DEPRECATED_HPP_INCLUDED
|
||||
#define BOOST_CONFIG_HEADER_DEPRECATED_HPP_INCLUDED
|
||||
|
||||
// Copyright 2017 Peter Dimov.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
// BOOST_HEADER_DEPRECATED("<alternative>")
|
||||
//
|
||||
// Expands to the equivalent of
|
||||
// BOOST_PRAGMA_MESSAGE("This header is deprecated. Use <alternative> instead.")
|
||||
//
|
||||
// Note that this header is C compatible.
|
||||
|
||||
#include <boost/config/pragma_message.hpp>
|
||||
|
||||
#if defined(BOOST_ALLOW_DEPRECATED_HEADERS)
|
||||
# define BOOST_HEADER_DEPRECATED(a)
|
||||
#else
|
||||
# define BOOST_HEADER_DEPRECATED(a) BOOST_PRAGMA_MESSAGE("This header is deprecated. Use " a " instead.")
|
||||
#endif
|
||||
|
||||
#endif // BOOST_CONFIG_HEADER_DEPRECATED_HPP_INCLUDED
|
37
boost/config/helper_macros.hpp
Normal file
37
boost/config/helper_macros.hpp
Normal file
|
@ -0,0 +1,37 @@
|
|||
#ifndef BOOST_CONFIG_HELPER_MACROS_HPP_INCLUDED
|
||||
#define BOOST_CONFIG_HELPER_MACROS_HPP_INCLUDED
|
||||
|
||||
// Copyright 2001 John Maddock.
|
||||
// Copyright 2017 Peter Dimov.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
// BOOST_STRINGIZE(X)
|
||||
// BOOST_JOIN(X, Y)
|
||||
//
|
||||
// Note that this header is C compatible.
|
||||
|
||||
//
|
||||
// Helper macro BOOST_STRINGIZE:
|
||||
// Converts the parameter X to a string after macro replacement
|
||||
// on X has been performed.
|
||||
//
|
||||
#define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
|
||||
#define BOOST_DO_STRINGIZE(X) #X
|
||||
|
||||
//
|
||||
// Helper macro BOOST_JOIN:
|
||||
// The following piece of macro magic joins the two
|
||||
// arguments together, even when one of the arguments is
|
||||
// itself a macro (see 16.3.1 in C++ standard). The key
|
||||
// is that macro expansion of macro arguments does not
|
||||
// occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN.
|
||||
//
|
||||
#define BOOST_JOIN(X, Y) BOOST_DO_JOIN(X, Y)
|
||||
#define BOOST_DO_JOIN(X, Y) BOOST_DO_JOIN2(X,Y)
|
||||
#define BOOST_DO_JOIN2(X, Y) X##Y
|
||||
|
||||
#endif // BOOST_CONFIG_HELPER_MACROS_HPP_INCLUDED
|
|
@ -38,10 +38,21 @@
|
|||
#ifdef _STDINT_H
|
||||
#define BOOST_HAS_STDINT_H
|
||||
#endif
|
||||
#if __GNUC__ > 5 && !defined(BOOST_HAS_STDINT_H)
|
||||
# define BOOST_HAS_STDINT_H
|
||||
#endif
|
||||
|
||||
/// Cygwin has no fenv.h
|
||||
#define BOOST_NO_FENV_H
|
||||
|
||||
// Cygwin has it's own <pthread.h> which breaks <shared_mutex> unless the correct compiler flags are used:
|
||||
#ifndef BOOST_NO_CXX14_HDR_SHARED_MUTEX
|
||||
#include <pthread.h>
|
||||
#if !(__XSI_VISIBLE >= 500 || __POSIX_VISIBLE >= 200112)
|
||||
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// boilerplate code:
|
||||
#include <boost/config/detail/posix_features.hpp>
|
||||
|
||||
|
|
|
@ -1,30 +1,50 @@
|
|||
// (C) Copyright Dustin Spicuzza 2009.
|
||||
// Adapted to vxWorks 6.9 by Peter Brockamp 2012.
|
||||
// Updated for VxWorks 7 by Brian Kuhl 2016
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// Since WRS does not yet properly support boost under vxWorks
|
||||
// and this file was badly outdated, but I was keen on using it,
|
||||
// I patched boost myself to make things work. This has been tested
|
||||
// and adapted by me for vxWorks 6.9 *only*, as I'm lacking access
|
||||
// to earlier 6.X versions! The only thing I know for sure is that
|
||||
// very old versions of vxWorks (namely everything below 6.x) are
|
||||
// absolutely unable to use boost. This is mainly due to the completely
|
||||
// outdated libraries and ancient compiler (GCC 2.96 or worse). Do
|
||||
// not even think of getting this to work, a miserable failure will
|
||||
// be guaranteed!
|
||||
// Old versions of vxWorks (namely everything below 6.x) are
|
||||
// absolutely unable to use boost. Old STLs and compilers
|
||||
// like (GCC 2.96) . Do not even think of getting this to work,
|
||||
// a miserable failure will be guaranteed!
|
||||
//
|
||||
// Equally, this file has been tested for RTPs (Real Time Processes)
|
||||
// only, not for DKMs (Downloadable Kernel Modules). These two types
|
||||
// of executables differ largely in the available functionality of
|
||||
// the C-library, STL, and so on. A DKM uses a library similar to those
|
||||
// of vxWorks 5.X - with all its limitations and incompatibilities
|
||||
// with respect to ANSI C++ and STL. So probably there might be problems
|
||||
// with the usage of boost from DKMs. WRS or any voluteers are free to
|
||||
// prove the opposite!
|
||||
|
||||
// the C-library, STL, and so on. A DKM uses a C89 library with no
|
||||
// wide character support and no guarantee of ANSI C. The same Dinkum
|
||||
// STL library is used in both contexts.
|
||||
//
|
||||
// Similarly the Dinkum abridged STL that supports the loosely specified
|
||||
// embedded C++ standard has not been tested and is unlikely to work
|
||||
// on anything but the simplest library.
|
||||
// ====================================================================
|
||||
//
|
||||
// Additional Configuration
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
// Because of the ordering of include files and other issues the following
|
||||
// additional definitions worked better outside this file.
|
||||
//
|
||||
// When building the log library add the following to the b2 invocation
|
||||
// define=BOOST_LOG_WITHOUT_IPC
|
||||
// and
|
||||
// -DBOOST_LOG_WITHOUT_DEFAULT_FACTORIES
|
||||
// to your compile options.
|
||||
//
|
||||
// When building the test library add
|
||||
// -DBOOST_TEST_LIMITED_SIGNAL_DETAILS
|
||||
// to your compile options
|
||||
//
|
||||
// When building containers library add
|
||||
// -DHAVE_MORECORE=0
|
||||
// to your c compile options so dlmalloc heap library is compiled
|
||||
// without brk() calls
|
||||
//
|
||||
// ====================================================================
|
||||
//
|
||||
// Some important information regarding the usage of POSIX semaphores:
|
||||
|
@ -38,29 +58,14 @@
|
|||
// Now, VxWorks POSIX-semaphores for DKM's default to the usage of
|
||||
// priority inverting semaphores, which is fine. On the other hand,
|
||||
// for RTP's it defaults to using non priority inverting semaphores,
|
||||
// which could easily pose a serious problem for a real time process,
|
||||
// i.e. deadlocks! To overcome this two possibilities do exist:
|
||||
// which could easily pose a serious problem for a real time process.
|
||||
//
|
||||
// a) Patch every piece of boost that uses semaphores to instanciate
|
||||
// the proper type of semaphores. This is non-intrusive with respect
|
||||
// to the OS and could relatively easy been done by giving all
|
||||
// semaphores attributes deviating from the default (for in-depth
|
||||
// information see the POSIX functions pthread_mutexattr_init()
|
||||
// and pthread_mutexattr_setprotocol()). However this breaks all
|
||||
// too easily, as with every new version some boost library could
|
||||
// all in a sudden start using semaphores, resurrecting the very
|
||||
// same, hard to locate problem over and over again!
|
||||
// To change the default properties for POSIX-semaphores in VxWorks 7
|
||||
// enable core > CORE_USER Menu > DEFAULT_PTHREAD_PRIO_INHERIT
|
||||
//
|
||||
// b) We could change the default properties for POSIX-semaphores
|
||||
// that VxWorks uses for RTP's and this is being suggested here,
|
||||
// as it will more or less seamlessly integrate with boost. I got
|
||||
// the following information from WRS how to do this, compare
|
||||
// Wind River TSR# 1209768:
|
||||
//
|
||||
// Instructions for changing the default properties of POSIX-
|
||||
// semaphores for RTP's in VxWorks 6.9:
|
||||
// - Edit the file /vxworks-6.9/target/usr/src/posix/pthreadLib.c
|
||||
// in the root of your Workbench-installation.
|
||||
// In VxWorks 6.x so as to integrate with boost.
|
||||
// - Edit the file
|
||||
// installDir/vxworks-6.x/target/usr/src/posix/pthreadLib.c
|
||||
// - Around line 917 there should be the definition of the default
|
||||
// mutex attributes:
|
||||
//
|
||||
|
@ -81,30 +86,11 @@
|
|||
// pAttr->mutexAttrType = PTHREAD_MUTEX_DEFAULT;
|
||||
//
|
||||
// Here again, replace PTHREAD_PRIO_NONE by PTHREAD_PRIO_INHERIT.
|
||||
// - Finally, rebuild your VSB. This will create a new VxWorks kernel
|
||||
// - Finally, rebuild your VSB. This will rebuild the libraries
|
||||
// with the changed properties. That's it! Now, using boost should
|
||||
// no longer cause any problems with task deadlocks!
|
||||
//
|
||||
// And here's another useful piece of information concerning VxWorks'
|
||||
// POSIX-functionality in general:
|
||||
// VxWorks is not a genuine POSIX-OS in itself, rather it is using a
|
||||
// kind of compatibility layer (sort of a wrapper) to emulate the
|
||||
// POSIX-functionality by using its own resources and functions.
|
||||
// At the time a task (thread) calls it's first POSIX-function during
|
||||
// runtime it is being transformed by the OS into a POSIX-thread.
|
||||
// This transformation does include a call to malloc() to allocate the
|
||||
// memory required for the housekeeping of POSIX-threads. In a high
|
||||
// priority RTP this malloc() call may be highly undesirable, as its
|
||||
// timing is more or less unpredictable (depending on what your actual
|
||||
// heap looks like). You can circumvent this problem by calling the
|
||||
// function thread_self() at a well defined point in the code of the
|
||||
// task, e.g. shortly after the task spawns up. Thereby you are able
|
||||
// to define the time when the task-transformation will take place and
|
||||
// you could shift it to an uncritical point where a malloc() call is
|
||||
// tolerable. So, if this could pose a problem for your code, remember
|
||||
// to call thread_self() from the affected task at an early stage.
|
||||
//
|
||||
// ====================================================================
|
||||
// ====================================================================
|
||||
|
||||
// Block out all versions before vxWorks 6.x, as these don't work:
|
||||
// Include header with the vxWorks version information and query them
|
||||
|
@ -158,11 +144,6 @@
|
|||
#define BOOST_HAS_CLOCK_GETTIME
|
||||
#define BOOST_HAS_MACRO_USE_FACET
|
||||
|
||||
// Generally unavailable functionality, delivered by boost's test function:
|
||||
//#define BOOST_NO_DEDUCED_TYPENAME // Commented this out, boost's test gives an errorneous result!
|
||||
#define BOOST_NO_CXX11_EXTERN_TEMPLATE
|
||||
#define BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
|
||||
// Generally available threading API's:
|
||||
#define BOOST_HAS_PTHREADS
|
||||
#define BOOST_HAS_SCHED_YIELD
|
||||
|
@ -191,14 +172,7 @@
|
|||
# endif
|
||||
#endif
|
||||
|
||||
// vxWorks doesn't work with asio serial ports:
|
||||
#define BOOST_ASIO_DISABLE_SERIAL_PORT
|
||||
// TODO: The problem here seems to bee that vxWorks uses its own, very specific
|
||||
// ways to handle serial ports, incompatible with POSIX or anything...
|
||||
// Maybe a specific implementation would be possible, but until the
|
||||
// straight need arises... This implementation would presumably consist
|
||||
// of some vxWorks specific ioctl-calls, etc. Any voluteers?
|
||||
|
||||
#if (_WRS_VXWORKS_MAJOR < 7)
|
||||
// vxWorks-around: <time.h> #defines CLOCKS_PER_SEC as sysClkRateGet() but
|
||||
// miserably fails to #include the required <sysLib.h> to make
|
||||
// sysClkRateGet() available! So we manually include it here.
|
||||
|
@ -208,11 +182,12 @@
|
|||
#endif
|
||||
|
||||
// vxWorks-around: In <stdint.h> the macros INT32_C(), UINT32_C(), INT64_C() and
|
||||
// UINT64_C() are defined errorneously, yielding not a signed/
|
||||
// UINT64_C() are defined erroneously, yielding not a signed/
|
||||
// unsigned long/long long type, but a signed/unsigned int/long
|
||||
// type. Eventually this leads to compile errors in ratio_fwd.hpp,
|
||||
// when trying to define several constants which do not fit into a
|
||||
// long type! We correct them here by redefining.
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
// Some macro-magic to do the job
|
||||
|
@ -231,12 +206,16 @@
|
|||
#define UINT64_C(x) VX_JOIN(x, ULL)
|
||||
|
||||
// #include Libraries required for the following function adaption
|
||||
#include <sys/time.h>
|
||||
#endif // _WRS_VXWORKS_MAJOR < 7
|
||||
|
||||
#include <ioLib.h>
|
||||
#include <tickLib.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
// Use C-linkage for the following helper functions
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// vxWorks-around: The required functions getrlimit() and getrlimit() are missing.
|
||||
// But we have the similar functions getprlimit() and setprlimit(),
|
||||
|
@ -248,7 +227,7 @@ extern "C" {
|
|||
|
||||
// TODO: getprlimit() and setprlimit() do exist for RTPs only, for whatever reason.
|
||||
// Thus for DKMs there would have to be another implementation.
|
||||
#ifdef __RTP__
|
||||
#if defined ( __RTP__) && (_WRS_VXWORKS_MAJOR < 7)
|
||||
inline int getrlimit(int resource, struct rlimit *rlp){
|
||||
return getprlimit(0, 0, resource, rlp);
|
||||
}
|
||||
|
@ -273,14 +252,20 @@ inline int truncate(const char *p, off_t l){
|
|||
return close(fd);
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define ___unused __attribute__((unused))
|
||||
#else
|
||||
#define ___unused
|
||||
#endif
|
||||
|
||||
// Fake symlink handling by dummy functions:
|
||||
inline int symlink(const char*, const char*){
|
||||
inline int symlink(const char* path1 ___unused, const char* path2 ___unused){
|
||||
// vxWorks has no symlinks -> always return an error!
|
||||
errno = EACCES;
|
||||
return -1;
|
||||
}
|
||||
|
||||
inline ssize_t readlink(const char*, char*, size_t){
|
||||
inline ssize_t readlink(const char* path1 ___unused, char* path2 ___unused, size_t size ___unused){
|
||||
// vxWorks has no symlinks -> always return an error!
|
||||
errno = EACCES;
|
||||
return -1;
|
||||
|
@ -297,8 +282,18 @@ inline int gettimeofday(struct timeval *tv, void * /*tzv*/) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
// vxWorks does provide neither struct tms nor function times()!
|
||||
/*
|
||||
* moved to os/utils/unix/freind_h/times.h in VxWorks 7
|
||||
* to avoid conflict with MPL operator times
|
||||
*/
|
||||
#if (_WRS_VXWORKS_MAJOR < 7)
|
||||
#ifdef __cplusplus
|
||||
|
||||
// vxWorks provides neither struct tms nor function times()!
|
||||
// We implement an empty dummy-function, simply setting the user
|
||||
// and system time to the half of thew actual system ticks-value
|
||||
// and the child user and system time to 0.
|
||||
|
@ -315,7 +310,8 @@ struct tms{
|
|||
clock_t tms_cstime; // System CPU time of terminated child processes
|
||||
};
|
||||
|
||||
inline clock_t times(struct tms *t){
|
||||
|
||||
inline clock_t times(struct tms *t){
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts);
|
||||
clock_t ticks(static_cast<clock_t>(static_cast<double>(ts.tv_sec) * CLOCKS_PER_SEC +
|
||||
|
@ -327,8 +323,16 @@ inline clock_t times(struct tms *t){
|
|||
return ticks;
|
||||
}
|
||||
|
||||
extern void bzero (void *, size_t); // FD_ZERO uses bzero() but doesn't include strings.h
|
||||
} // extern "C"
|
||||
|
||||
namespace std {
|
||||
using ::times;
|
||||
}
|
||||
#endif // __cplusplus
|
||||
#endif // _WRS_VXWORKS_MAJOR < 7
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" void bzero (void *, size_t); // FD_ZERO uses bzero() but doesn't include strings.h
|
||||
|
||||
// Put the selfmade functions into the std-namespace, just in case
|
||||
namespace std {
|
||||
|
@ -339,9 +343,11 @@ namespace std {
|
|||
using ::truncate;
|
||||
using ::symlink;
|
||||
using ::readlink;
|
||||
using ::times;
|
||||
using ::gettimeofday;
|
||||
#if (_WRS_VXWORKS_MAJOR < 7)
|
||||
using ::gettimeofday;
|
||||
#endif
|
||||
}
|
||||
#endif // __cplusplus
|
||||
|
||||
// Some more macro-magic:
|
||||
// vxWorks-around: Some functions are not present or broken in vxWorks
|
||||
|
@ -349,12 +355,13 @@ namespace std {
|
|||
|
||||
// Include signal.h which might contain a typo to be corrected here
|
||||
#include <signal.h>
|
||||
|
||||
inline int getpagesize() { return sysconf(_SC_PAGESIZE); } // getpagesize is deprecated anyway!
|
||||
#if (_WRS_VXWORKS_MAJOR < 7)
|
||||
#define getpagesize() sysconf(_SC_PAGESIZE) // getpagesize is deprecated anyway!
|
||||
inline int lstat(p, b) { return stat(p, b); } // lstat() == stat(), as vxWorks has no symlinks!
|
||||
#endif
|
||||
#ifndef S_ISSOCK
|
||||
# define S_ISSOCK(mode) ((mode & S_IFMT) == S_IFSOCK) // Is file a socket?
|
||||
#endif
|
||||
inline int lstat(p, b) { return stat(p, b); } // lstat() == stat(), as vxWorks has no symlinks!
|
||||
#ifndef FPE_FLTINV
|
||||
# define FPE_FLTINV (FPE_FLTSUB+1) // vxWorks has no FPE_FLTINV, so define one as a dummy
|
||||
#endif
|
||||
|
@ -371,22 +378,56 @@ typedef int locale_t; // locale_t is a POSIX-ex
|
|||
|
||||
// vxWorks 7 adds C++11 support
|
||||
// however it is optional, and does not match exactly the support determined
|
||||
// by examining Dinkum STL version and GCC version (or ICC and DCC)
|
||||
|
||||
// by examining the Dinkum STL version and GCC version (or ICC and DCC)
|
||||
#ifndef _WRS_CONFIG_LANG_LIB_CPLUS_CPLUS_USER_2011
|
||||
# define BOOST_NO_CXX11_ADDRESSOF // C11 addressof operator on memory location
|
||||
# define BOOST_NO_CXX11_ALLOCATOR
|
||||
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
|
||||
# define BOOST_NO_CXX11_NUMERIC_LIMITS // max_digits10 in test/../print_helper.hpp
|
||||
# define BOOST_NO_CXX11_SMART_PTR
|
||||
# define BOOST_NO_CXX11_STD_ALIGN
|
||||
|
||||
|
||||
# define BOOST_NO_CXX11_HDR_ARRAY
|
||||
# define BOOST_NO_CXX11_HDR_ATOMIC
|
||||
# define BOOST_NO_CXX11_HDR_CHRONO
|
||||
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_CXX11_HDR_FORWARD_LIST //serialization/test/test_list.cpp
|
||||
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
|
||||
# define BOOST_NO_CXX11_HDR_FUTURE
|
||||
# define BOOST_NO_CXX11_HDR_MUTEX
|
||||
# define BOOST_NO_CXX11_HDR_RANDOM //math/../test_data.hpp
|
||||
# define BOOST_NO_CXX11_HDR_RATIO
|
||||
# define BOOST_NO_CXX11_HDR_REGEX
|
||||
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
|
||||
# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_CXX11_HDR_THREAD
|
||||
# define BOOST_NO_CXX11_HDR_TYPEINDEX
|
||||
# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_CXX11_HDR_TUPLE
|
||||
# define BOOST_NO_CXX11_ALLOCATOR
|
||||
# define BOOST_NO_CXX11_SMART_PTR
|
||||
# define BOOST_NO_CXX11_STD_ALIGN
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
|
||||
# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
|
||||
# define BOOST_NO_CXX11_HDR_ATOMIC
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
|
||||
#else
|
||||
# define BOOST_NO_CXX11_NULLPTR
|
||||
#ifndef BOOST_SYSTEM_NO_DEPRECATED
|
||||
# define BOOST_SYSTEM_NO_DEPRECATED // workaround link error in spirit
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
// NONE is used in enums in lamda and other libraries
|
||||
#undef NONE
|
||||
// restrict is an iostreams class
|
||||
#undef restrict
|
||||
|
||||
// use fake poll() from Unix layer in ASIO to get full functionality
|
||||
// most libraries will use select() but this define allows 'iostream' functionality
|
||||
// which is based on poll() only
|
||||
#if (_WRS_VXWORKS_MAJOR > 6)
|
||||
# ifndef BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR
|
||||
# define BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR
|
||||
# endif
|
||||
#else
|
||||
# define BOOST_ASIO_DISABLE_SERIAL_PORT
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -1,95 +0,0 @@
|
|||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// All POSIX feature tests go in this file,
|
||||
// Note that we test _POSIX_C_SOURCE and _XOPEN_SOURCE as well
|
||||
// _POSIX_VERSION and _XOPEN_VERSION: on some systems POSIX API's
|
||||
// may be present but none-functional unless _POSIX_C_SOURCE and
|
||||
// _XOPEN_SOURCE have been defined to the right value (it's up
|
||||
// to the user to do this *before* including any header, although
|
||||
// in most cases the compiler will do this for you).
|
||||
|
||||
# if defined(BOOST_HAS_UNISTD_H)
|
||||
# include <unistd.h>
|
||||
|
||||
// XOpen has <nl_types.h>, but is this the correct version check?
|
||||
# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 3)
|
||||
# define BOOST_HAS_NL_TYPES_H
|
||||
# endif
|
||||
|
||||
// POSIX version 6 requires <stdint.h>
|
||||
# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 200100)
|
||||
# define BOOST_HAS_STDINT_H
|
||||
# endif
|
||||
|
||||
// POSIX version 2 requires <dirent.h>
|
||||
# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199009L)
|
||||
# define BOOST_HAS_DIRENT_H
|
||||
# endif
|
||||
|
||||
// POSIX version 3 requires <signal.h> to have sigaction:
|
||||
# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199506L)
|
||||
# define BOOST_HAS_SIGACTION
|
||||
# endif
|
||||
// POSIX defines _POSIX_THREADS > 0 for pthread support,
|
||||
// however some platforms define _POSIX_THREADS without
|
||||
// a value, hence the (_POSIX_THREADS+0 >= 0) check.
|
||||
// Strictly speaking this may catch platforms with a
|
||||
// non-functioning stub <pthreads.h>, but such occurrences should
|
||||
// occur very rarely if at all.
|
||||
# if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_MPTASKS)
|
||||
# define BOOST_HAS_PTHREADS
|
||||
# endif
|
||||
|
||||
// BOOST_HAS_NANOSLEEP:
|
||||
// This is predicated on _POSIX_TIMERS or _XOPEN_REALTIME:
|
||||
# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) \
|
||||
|| (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0))
|
||||
# define BOOST_HAS_NANOSLEEP
|
||||
# endif
|
||||
|
||||
// BOOST_HAS_CLOCK_GETTIME:
|
||||
// This is predicated on _POSIX_TIMERS (also on _XOPEN_REALTIME
|
||||
// but at least one platform - linux - defines that flag without
|
||||
// defining clock_gettime):
|
||||
# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0))
|
||||
# define BOOST_HAS_CLOCK_GETTIME
|
||||
# endif
|
||||
|
||||
// BOOST_HAS_SCHED_YIELD:
|
||||
// This is predicated on _POSIX_PRIORITY_SCHEDULING or
|
||||
// on _POSIX_THREAD_PRIORITY_SCHEDULING or on _XOPEN_REALTIME.
|
||||
# if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING+0 > 0)\
|
||||
|| (defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING+0 > 0))\
|
||||
|| (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0))
|
||||
# define BOOST_HAS_SCHED_YIELD
|
||||
# endif
|
||||
|
||||
// BOOST_HAS_GETTIMEOFDAY:
|
||||
// BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE:
|
||||
// These are predicated on _XOPEN_VERSION, and appears to be first released
|
||||
// in issue 4, version 2 (_XOPEN_VERSION > 500).
|
||||
// Likewise for the functions log1p and expm1.
|
||||
# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION+0 >= 500)
|
||||
# define BOOST_HAS_GETTIMEOFDAY
|
||||
# if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE+0 >= 500)
|
||||
# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
|
||||
# endif
|
||||
# ifndef BOOST_HAS_LOG1P
|
||||
# define BOOST_HAS_LOG1P
|
||||
# endif
|
||||
# ifndef BOOST_HAS_EXPM1
|
||||
# define BOOST_HAS_EXPM1
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
|
||||
|
||||
|
31
boost/config/pragma_message.hpp
Normal file
31
boost/config/pragma_message.hpp
Normal file
|
@ -0,0 +1,31 @@
|
|||
#ifndef BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED
|
||||
#define BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED
|
||||
|
||||
// Copyright 2017 Peter Dimov.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
// BOOST_PRAGMA_MESSAGE("message")
|
||||
//
|
||||
// Expands to the equivalent of #pragma message("message")
|
||||
//
|
||||
// Note that this header is C compatible.
|
||||
|
||||
#include <boost/config/helper_macros.hpp>
|
||||
|
||||
#if defined(BOOST_DISABLE_PRAGMA_MESSAGE)
|
||||
# define BOOST_PRAGMA_MESSAGE(x)
|
||||
#elif defined(__INTEL_COMPILER)
|
||||
# define BOOST_PRAGMA_MESSAGE(x) __pragma(message(__FILE__ "(" BOOST_STRINGIZE(__LINE__) "): note: " x))
|
||||
#elif defined(__GNUC__)
|
||||
# define BOOST_PRAGMA_MESSAGE(x) _Pragma(BOOST_STRINGIZE(message(x)))
|
||||
#elif defined(_MSC_VER)
|
||||
# define BOOST_PRAGMA_MESSAGE(x) __pragma(message(__FILE__ "(" BOOST_STRINGIZE(__LINE__) "): note: " x))
|
||||
#else
|
||||
# define BOOST_PRAGMA_MESSAGE(x)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED
|
|
@ -1,148 +0,0 @@
|
|||
// Boost compiler configuration selection header file
|
||||
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Martin Wille 2003.
|
||||
// (C) Copyright Guillaume Melquiond 2003.
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org/ for most recent version.
|
||||
|
||||
// locate which compiler we are using and define
|
||||
// BOOST_COMPILER_CONFIG as needed:
|
||||
|
||||
#if defined __CUDACC__
|
||||
// NVIDIA CUDA C++ compiler for GPU
|
||||
# include "boost/config/compiler/nvcc.hpp"
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__GCCXML__)
|
||||
// GCC-XML emulates other compilers, it has to appear first here!
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp"
|
||||
|
||||
#elif defined(_CRAYC)
|
||||
// EDG based Cray compiler:
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/cray.hpp"
|
||||
|
||||
#elif defined __COMO__
|
||||
// Comeau C++
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp"
|
||||
|
||||
#elif defined(__PATHSCALE__) && (__PATHCC__ >= 4)
|
||||
// PathScale EKOPath compiler (has to come before clang and gcc)
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/pathscale.hpp"
|
||||
|
||||
#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
|
||||
// Intel
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp"
|
||||
|
||||
#elif defined __clang__ && !defined(__CUDACC__) && !defined(__ibmxl__)
|
||||
// when using clang and cuda at same time, you want to appear as gcc
|
||||
// Clang C++ emulates GCC, so it has to appear early.
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp"
|
||||
|
||||
#elif defined __DMC__
|
||||
// Digital Mars C++
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp"
|
||||
|
||||
# elif defined(__GNUC__) && !defined(__ibmxl__)
|
||||
// GNU C++:
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc.hpp"
|
||||
|
||||
#elif defined __KCC
|
||||
// Kai C++
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/kai.hpp"
|
||||
|
||||
#elif defined __sgi
|
||||
// SGI MIPSpro C++
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/sgi_mipspro.hpp"
|
||||
|
||||
#elif defined __DECCXX
|
||||
// Compaq Tru64 Unix cxx
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/compaq_cxx.hpp"
|
||||
|
||||
#elif defined __ghs
|
||||
// Greenhills C++
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/greenhills.hpp"
|
||||
|
||||
#elif defined __CODEGEARC__
|
||||
// CodeGear - must be checked for before Borland
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/codegear.hpp"
|
||||
|
||||
#elif defined __BORLANDC__
|
||||
// Borland
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/borland.hpp"
|
||||
|
||||
#elif defined __MWERKS__
|
||||
// Metrowerks CodeWarrior
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/metrowerks.hpp"
|
||||
|
||||
#elif defined __SUNPRO_CC
|
||||
// Sun Workshop Compiler C++
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/sunpro_cc.hpp"
|
||||
|
||||
#elif defined __HP_aCC
|
||||
// HP aCC
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/hp_acc.hpp"
|
||||
|
||||
#elif defined(__MRC__) || defined(__SC__)
|
||||
// MPW MrCpp or SCpp
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/mpw.hpp"
|
||||
|
||||
#elif defined(__ibmxl__)
|
||||
// IBM XL C/C++ for Linux (Little Endian)
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/xlcpp.hpp"
|
||||
|
||||
#elif defined(__IBMCPP__)
|
||||
// IBM Visual Age or IBM XL C/C++ for Linux (Big Endian)
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/vacpp.hpp"
|
||||
|
||||
#elif defined(__PGI)
|
||||
// Portland Group Inc.
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/pgi.hpp"
|
||||
|
||||
#elif defined _MSC_VER
|
||||
// Microsoft Visual C++
|
||||
//
|
||||
// Must remain the last #elif since some other vendors (Metrowerks, for
|
||||
// example) also #define _MSC_VER
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/visualc.hpp"
|
||||
|
||||
#elif defined (BOOST_ASSERT_CONFIG)
|
||||
// this must come last - generate an error if we don't
|
||||
// recognise the compiler:
|
||||
# error "Unknown compiler - please configure (http://www.boost.org/libs/config/config.htm#configuring) and report the results to the main boost mailing list (http://www.boost.org/more/mailing_lists.htm#main)"
|
||||
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
//
|
||||
// This section allows dependency scanners to find all the headers we *might* include:
|
||||
//
|
||||
#include <boost/config/compiler/gcc_xml.hpp>
|
||||
#include <boost/config/compiler/cray.hpp>
|
||||
#include <boost/config/compiler/comeau.hpp>
|
||||
#include <boost/config/compiler/pathscale.hpp>
|
||||
#include <boost/config/compiler/intel.hpp>
|
||||
#include <boost/config/compiler/clang.hpp>
|
||||
#include <boost/config/compiler/digitalmars.hpp>
|
||||
#include <boost/config/compiler/gcc.hpp>
|
||||
#include <boost/config/compiler/kai.hpp>
|
||||
#include <boost/config/compiler/sgi_mipspro.hpp>
|
||||
#include <boost/config/compiler/compaq_cxx.hpp>
|
||||
#include <boost/config/compiler/greenhills.hpp>
|
||||
#include <boost/config/compiler/codegear.hpp>
|
||||
#include <boost/config/compiler/borland.hpp>
|
||||
#include <boost/config/compiler/metrowerks.hpp>
|
||||
#include <boost/config/compiler/sunpro_cc.hpp>
|
||||
#include <boost/config/compiler/hp_acc.hpp>
|
||||
#include <boost/config/compiler/mpw.hpp>
|
||||
#include <boost/config/compiler/vacpp.hpp>
|
||||
#include <boost/config/compiler/pgi.hpp>
|
||||
#include <boost/config/compiler/visualc.hpp>
|
||||
|
||||
#endif
|
||||
|
|
@ -1,137 +0,0 @@
|
|||
// Boost compiler configuration selection header file
|
||||
|
||||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// (C) Copyright Jens Maurer 2001.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// locate which platform we are on and define BOOST_PLATFORM_CONFIG as needed.
|
||||
// Note that we define the headers to include using "header_name" not
|
||||
// <header_name> in order to prevent macro expansion within the header
|
||||
// name (for example "linux" is a macro on linux systems).
|
||||
|
||||
#if (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)) && !defined(_CRAYC)
|
||||
// linux, also other platforms (Hurd etc) that use GLIBC, should these really have their own config headers though?
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/linux.hpp"
|
||||
|
||||
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
|
||||
// BSD:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/bsd.hpp"
|
||||
|
||||
#elif defined(sun) || defined(__sun)
|
||||
// solaris:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/solaris.hpp"
|
||||
|
||||
#elif defined(__sgi)
|
||||
// SGI Irix:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/irix.hpp"
|
||||
|
||||
#elif defined(__hpux)
|
||||
// hp unix:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/hpux.hpp"
|
||||
|
||||
#elif defined(__CYGWIN__)
|
||||
// cygwin is not win32:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/cygwin.hpp"
|
||||
|
||||
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
|
||||
// win32:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp"
|
||||
|
||||
#elif defined(__HAIKU__)
|
||||
// Haiku
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/haiku.hpp"
|
||||
|
||||
#elif defined(__BEOS__)
|
||||
// BeOS
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp"
|
||||
|
||||
#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
|
||||
// MacOS
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/macos.hpp"
|
||||
|
||||
#elif defined(__IBMCPP__) || defined(_AIX)
|
||||
// IBM
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/aix.hpp"
|
||||
|
||||
#elif defined(__amigaos__)
|
||||
// AmigaOS
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/amigaos.hpp"
|
||||
|
||||
#elif defined(__QNXNTO__)
|
||||
// QNX:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/qnxnto.hpp"
|
||||
|
||||
#elif defined(__VXWORKS__)
|
||||
// vxWorks:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/vxworks.hpp"
|
||||
|
||||
#elif defined(__SYMBIAN32__)
|
||||
// Symbian:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/symbian.hpp"
|
||||
|
||||
#elif defined(_CRAYC)
|
||||
// Cray:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/cray.hpp"
|
||||
|
||||
#elif defined(__VMS)
|
||||
// VMS:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/vms.hpp"
|
||||
|
||||
#elif defined(__CloudABI__)
|
||||
// Nuxi CloudABI:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/cloudabi.hpp"
|
||||
#else
|
||||
|
||||
# if defined(unix) \
|
||||
|| defined(__unix) \
|
||||
|| defined(_XOPEN_SOURCE) \
|
||||
|| defined(_POSIX_SOURCE)
|
||||
|
||||
// generic unix platform:
|
||||
|
||||
# ifndef BOOST_HAS_UNISTD_H
|
||||
# define BOOST_HAS_UNISTD_H
|
||||
# endif
|
||||
|
||||
# include <boost/config/posix_features.hpp>
|
||||
|
||||
# endif
|
||||
|
||||
# if defined (BOOST_ASSERT_CONFIG)
|
||||
// this must come last - generate an error if we don't
|
||||
// recognise the platform:
|
||||
# error "Unknown platform - please configure and report the results to boost.org"
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
//
|
||||
// This section allows dependency scanners to find all the files we *might* include:
|
||||
//
|
||||
# include "boost/config/platform/linux.hpp"
|
||||
# include "boost/config/platform/bsd.hpp"
|
||||
# include "boost/config/platform/solaris.hpp"
|
||||
# include "boost/config/platform/irix.hpp"
|
||||
# include "boost/config/platform/hpux.hpp"
|
||||
# include "boost/config/platform/cygwin.hpp"
|
||||
# include "boost/config/platform/win32.hpp"
|
||||
# include "boost/config/platform/beos.hpp"
|
||||
# include "boost/config/platform/macos.hpp"
|
||||
# include "boost/config/platform/aix.hpp"
|
||||
# include "boost/config/platform/amigaos.hpp"
|
||||
# include "boost/config/platform/qnxnto.hpp"
|
||||
# include "boost/config/platform/vxworks.hpp"
|
||||
# include "boost/config/platform/symbian.hpp"
|
||||
# include "boost/config/platform/cray.hpp"
|
||||
# include "boost/config/platform/vms.hpp"
|
||||
# include <boost/config/posix_features.hpp>
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -1,105 +0,0 @@
|
|||
// Boost compiler configuration selection header file
|
||||
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Jens Maurer 2001 - 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// locate which std lib we are using and define BOOST_STDLIB_CONFIG as needed:
|
||||
|
||||
// First include <cstddef> to determine if some version of STLport is in use as the std lib
|
||||
// (do not rely on this header being included since users can short-circuit this header
|
||||
// if they know whose std lib they are using.)
|
||||
#ifdef __cplusplus
|
||||
# include <cstddef>
|
||||
#else
|
||||
# include <stddef.h>
|
||||
#endif
|
||||
|
||||
#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
|
||||
// STLPort library; this _must_ come first, otherwise since
|
||||
// STLport typically sits on top of some other library, we
|
||||
// can end up detecting that first rather than STLport:
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/stlport.hpp"
|
||||
|
||||
#else
|
||||
|
||||
// If our std lib was not some version of STLport, and has not otherwise
|
||||
// been detected, then include <utility> as it is about
|
||||
// the smallest of the std lib headers that includes real C++ stuff.
|
||||
// Some std libs do not include their C++-related macros in <cstddef>
|
||||
// so this additional include makes sure we get those definitions.
|
||||
// Note: do not rely on this header being included since users can short-circuit this
|
||||
// #include if they know whose std lib they are using.
|
||||
#if !defined(__LIBCOMO__) && !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)\
|
||||
&& !defined(_LIBCPP_VERSION) && !defined(__GLIBCPP__) && !defined(__GLIBCXX__)\
|
||||
&& !defined(__STL_CONFIG_H) && !defined(__MSL_CPP__) && !defined(__IBMCPP__)\
|
||||
&& !defined(MSIPL_COMPILE_H) && !defined(_YVALS) && !defined(_CPPLIB_VER)
|
||||
#include <utility>
|
||||
#endif
|
||||
|
||||
#if defined(__LIBCOMO__)
|
||||
// Comeau STL:
|
||||
#define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcomo.hpp"
|
||||
|
||||
#elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
|
||||
// Rogue Wave library:
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/roguewave.hpp"
|
||||
|
||||
#elif defined(_LIBCPP_VERSION)
|
||||
// libc++
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcpp.hpp"
|
||||
|
||||
#elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
|
||||
// GNU libstdc++ 3
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libstdcpp3.hpp"
|
||||
|
||||
#elif defined(__STL_CONFIG_H)
|
||||
// generic SGI STL
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/sgi.hpp"
|
||||
|
||||
#elif defined(__MSL_CPP__)
|
||||
// MSL standard lib:
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/msl.hpp"
|
||||
|
||||
#elif defined(__IBMCPP__)
|
||||
// take the default VACPP std lib
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/vacpp.hpp"
|
||||
|
||||
#elif defined(MSIPL_COMPILE_H)
|
||||
// Modena C++ standard library
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/modena.hpp"
|
||||
|
||||
#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
|
||||
// Dinkumware Library (this has to appear after any possible replacement libraries):
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/dinkumware.hpp"
|
||||
|
||||
#elif defined (BOOST_ASSERT_CONFIG)
|
||||
// this must come last - generate an error if we don't
|
||||
// recognise the library:
|
||||
# error "Unknown standard library - please configure and report the results to boost.org"
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
//
|
||||
// This section allows dependency scanners to find all the files we *might* include:
|
||||
//
|
||||
# include "boost/config/stdlib/stlport.hpp"
|
||||
# include "boost/config/stdlib/libcomo.hpp"
|
||||
# include "boost/config/stdlib/roguewave.hpp"
|
||||
# include "boost/config/stdlib/libcpp.hpp"
|
||||
# include "boost/config/stdlib/libstdcpp3.hpp"
|
||||
# include "boost/config/stdlib/sgi.hpp"
|
||||
# include "boost/config/stdlib/msl.hpp"
|
||||
# include "boost/config/stdlib/vacpp.hpp"
|
||||
# include "boost/config/stdlib/modena.hpp"
|
||||
# include "boost/config/stdlib/dinkumware.hpp"
|
||||
#endif
|
||||
|
|
@ -96,7 +96,8 @@
|
|||
#include <exception>
|
||||
#endif
|
||||
#include <typeinfo>
|
||||
#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) && !defined(__TI_COMPILER_VERSION__) && !defined(__VISUALDSPVERSION__)
|
||||
#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (defined(__ghs__) && !_HAS_NAMESPACE) ) && !defined(__TI_COMPILER_VERSION__) && !defined(__VISUALDSPVERSION__) \
|
||||
&& !defined(__VXWORKS__)
|
||||
# define BOOST_NO_STD_TYPEINFO
|
||||
#endif
|
||||
|
||||
|
@ -172,11 +173,16 @@
|
|||
// C++17 features
|
||||
#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) || !defined(BOOST_MSVC) || (BOOST_MSVC < 1910) || !defined(_HAS_CXX17) || (_HAS_CXX17 == 0)
|
||||
# define BOOST_NO_CXX17_STD_APPLY
|
||||
#endif
|
||||
#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650)
|
||||
# define BOOST_NO_CXX17_STD_INVOKE
|
||||
# define BOOST_NO_CXX17_ITERATOR_TRAITS
|
||||
#endif
|
||||
#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) || !defined(_HAS_CXX17) || (_HAS_CXX17 == 0) || !defined(_MSVC_STL_UPDATE) || (_MSVC_STL_UPDATE < 201709)
|
||||
# define BOOST_NO_CXX17_STD_INVOKE
|
||||
#endif
|
||||
|
||||
#if !(!defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) || !defined(BOOST_MSVC) || (BOOST_MSVC < 1912) || !defined(_HAS_CXX17) || (_HAS_CXX17 == 0))
|
||||
// Deprecated std::iterator:
|
||||
# define BOOST_NO_STD_ITERATOR
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_INTEL) && (BOOST_INTEL <= 1400)
|
||||
// Intel's compiler can't handle this header yet:
|
||||
|
|
|
@ -87,9 +87,6 @@
|
|||
#endif
|
||||
|
||||
// C++17 features
|
||||
#if (_LIBCPP_VERSION < 3700) || (__cplusplus <= 201402L)
|
||||
# define BOOST_NO_CXX17_STD_INVOKE
|
||||
#endif
|
||||
#if (_LIBCPP_VERSION < 4000) || (__cplusplus <= 201402L)
|
||||
# define BOOST_NO_CXX17_STD_APPLY
|
||||
#endif
|
||||
|
@ -104,6 +101,7 @@
|
|||
#endif
|
||||
|
||||
#define BOOST_NO_CXX17_ITERATOR_TRAITS
|
||||
#define BOOST_NO_CXX17_STD_INVOKE // Invoke support is incomplete (no invoke_result)
|
||||
|
||||
#if (_LIBCPP_VERSION <= 1101) && !defined(BOOST_NO_CXX11_THREAD_LOCAL)
|
||||
// This is a bit of a sledgehammer, because really it's just libc++abi that has no
|
||||
|
@ -113,6 +111,13 @@
|
|||
# define BOOST_NO_CXX11_THREAD_LOCAL
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) && !defined(BOOST_NO_CXX11_THREAD_LOCAL)
|
||||
// After libc++-dev is installed on Trusty, clang++-libc++ almost works,
|
||||
// except uses of `thread_local` fail with undefined reference to
|
||||
// `__cxa_thread_atexit`.
|
||||
# define BOOST_NO_CXX11_THREAD_LOCAL
|
||||
#endif
|
||||
|
||||
#if defined(__has_include)
|
||||
#if !__has_include(<shared_mutex>)
|
||||
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
|
||||
|
|
|
@ -78,6 +78,7 @@
|
|||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifndef __VXWORKS__ // VxWorks uses Dinkum, not GNU STL with GCC
|
||||
#if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0
|
||||
# define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx
|
||||
# define BOOST_HAS_SLIST
|
||||
|
@ -91,6 +92,7 @@
|
|||
# define BOOST_HASH_MAP_HEADER <backward/hash_map>
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// Decide whether we have C++11 support turned on:
|
||||
|
@ -292,12 +294,10 @@ extern "C" char *gets (char *__s);
|
|||
#endif
|
||||
|
||||
//
|
||||
// C++17 features in GCC 6.1 and later
|
||||
// C++17 features in GCC 7.1 and later
|
||||
//
|
||||
#if (BOOST_LIBSTDCXX_VERSION < 60100) || (__cplusplus <= 201402L)
|
||||
# define BOOST_NO_CXX17_STD_INVOKE
|
||||
#endif
|
||||
#if (BOOST_LIBSTDCXX_VERSION < 70100) || (__cplusplus <= 201402L)
|
||||
# define BOOST_NO_CXX17_STD_INVOKE
|
||||
# define BOOST_NO_CXX17_STD_APPLY
|
||||
#endif
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -87,8 +87,10 @@
|
|||
#endif
|
||||
#ifndef BOOST_GCC
|
||||
#define BOOST_GCC_WORKAROUND_GUARD 1
|
||||
#define BOOST_GCC_VERSION_WORKAROUND_GUARD 1
|
||||
#else
|
||||
#define BOOST_GCC_WORKAROUND_GUARD 0
|
||||
#define BOOST_GCC_VERSION_WORKAROUND_GUARD 0
|
||||
#endif
|
||||
#ifndef BOOST_XLCPP_ZOS
|
||||
#define BOOST_XLCPP_ZOS_WORKAROUND_GUARD 1
|
||||
|
|
|
@ -50,21 +50,21 @@
|
|||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME allocate
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace container_detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 2
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 2
|
||||
#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME destroy
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace container_detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 1
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 1
|
||||
#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME construct
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace container_detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 1
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 9
|
||||
|
@ -87,7 +87,7 @@ BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_select_on_container_copy_co
|
|||
|
||||
} //namespace allocator_traits_detail {
|
||||
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
//workaround needed for C++03 compilers with no construct()
|
||||
//supporting rvalue references
|
||||
|
@ -121,7 +121,7 @@ BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(is_always_equal)
|
|||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(difference_type)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(is_partially_propagable)
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
|
@ -196,59 +196,59 @@ struct allocator_traits
|
|||
{ typedef see_documentation type; };
|
||||
#else
|
||||
//pointer
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
|
||||
pointer, value_type*)
|
||||
pointer;
|
||||
//const_pointer
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::dtl::, Allocator,
|
||||
const_pointer, typename boost::intrusive::pointer_traits<pointer>::template
|
||||
rebind_pointer<const value_type>)
|
||||
const_pointer;
|
||||
//reference
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
reference, typename container_detail::unvoid_ref<value_type>::type)
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
|
||||
reference, typename dtl::unvoid_ref<value_type>::type)
|
||||
reference;
|
||||
//const_reference
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
const_reference, typename container_detail::unvoid_ref<const value_type>::type)
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
|
||||
const_reference, typename dtl::unvoid_ref<const value_type>::type)
|
||||
const_reference;
|
||||
//void_pointer
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::dtl::, Allocator,
|
||||
void_pointer, typename boost::intrusive::pointer_traits<pointer>::template
|
||||
rebind_pointer<void>)
|
||||
void_pointer;
|
||||
//const_void_pointer
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::dtl::, Allocator,
|
||||
const_void_pointer, typename boost::intrusive::pointer_traits<pointer>::template
|
||||
rebind_pointer<const void>)
|
||||
const_void_pointer;
|
||||
//difference_type
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
|
||||
difference_type, std::ptrdiff_t)
|
||||
difference_type;
|
||||
//size_type
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
|
||||
size_type, std::size_t)
|
||||
size_type;
|
||||
//propagate_on_container_copy_assignment
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
propagate_on_container_copy_assignment, container_detail::false_type)
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
|
||||
propagate_on_container_copy_assignment, dtl::false_type)
|
||||
propagate_on_container_copy_assignment;
|
||||
//propagate_on_container_move_assignment
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
propagate_on_container_move_assignment, container_detail::false_type)
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
|
||||
propagate_on_container_move_assignment, dtl::false_type)
|
||||
propagate_on_container_move_assignment;
|
||||
//propagate_on_container_swap
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
propagate_on_container_swap, container_detail::false_type)
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
|
||||
propagate_on_container_swap, dtl::false_type)
|
||||
propagate_on_container_swap;
|
||||
//is_always_equal
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
is_always_equal, container_detail::is_empty<Allocator>)
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
|
||||
is_always_equal, dtl::is_empty<Allocator>)
|
||||
is_always_equal;
|
||||
//is_partially_propagable
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
is_partially_propagable, container_detail::false_type)
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
|
||||
is_partially_propagable, dtl::false_type)
|
||||
is_partially_propagable;
|
||||
|
||||
//rebind_alloc & rebind_traits
|
||||
|
@ -302,10 +302,10 @@ struct allocator_traits
|
|||
//! otherwise, invokes <code>a.allocate(n)</code>
|
||||
BOOST_CONTAINER_FORCEINLINE static pointer allocate(Allocator &a, size_type n, const_void_pointer p)
|
||||
{
|
||||
const bool value = boost::container::container_detail::
|
||||
const bool value = boost::container::dtl::
|
||||
has_member_function_callable_with_allocate
|
||||
<Allocator, const size_type, const const_void_pointer>::value;
|
||||
container_detail::bool_<value> flag;
|
||||
dtl::bool_<value> flag;
|
||||
return allocator_traits::priv_allocate(flag, a, n, p);
|
||||
}
|
||||
|
||||
|
@ -315,10 +315,10 @@ struct allocator_traits
|
|||
BOOST_CONTAINER_FORCEINLINE static void destroy(Allocator &a, T*p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
typedef T* destroy_pointer;
|
||||
const bool value = boost::container::container_detail::
|
||||
const bool value = boost::container::dtl::
|
||||
has_member_function_callable_with_destroy
|
||||
<Allocator, const destroy_pointer>::value;
|
||||
container_detail::bool_<value> flag;
|
||||
dtl::bool_<value> flag;
|
||||
allocator_traits::priv_destroy(flag, a, p);
|
||||
}
|
||||
|
||||
|
@ -327,21 +327,21 @@ struct allocator_traits
|
|||
BOOST_CONTAINER_FORCEINLINE static size_type max_size(const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
const bool value = allocator_traits_detail::has_max_size<Allocator, size_type (Allocator::*)() const>::value;
|
||||
container_detail::bool_<value> flag;
|
||||
dtl::bool_<value> flag;
|
||||
return allocator_traits::priv_max_size(flag, a);
|
||||
}
|
||||
|
||||
//! <b>Returns</b>: <code>a.select_on_container_copy_construction()</code> if that expression is well-formed;
|
||||
//! otherwise, a.
|
||||
BOOST_CONTAINER_FORCEINLINE static BOOST_CONTAINER_DOC1ST(Allocator,
|
||||
typename container_detail::if_c
|
||||
typename dtl::if_c
|
||||
< allocator_traits_detail::has_select_on_container_copy_construction<Allocator BOOST_MOVE_I Allocator (Allocator::*)() const>::value
|
||||
BOOST_MOVE_I Allocator BOOST_MOVE_I const Allocator & >::type)
|
||||
select_on_container_copy_construction(const Allocator &a)
|
||||
{
|
||||
const bool value = allocator_traits_detail::has_select_on_container_copy_construction
|
||||
<Allocator, Allocator (Allocator::*)() const>::value;
|
||||
container_detail::bool_<value> flag;
|
||||
dtl::bool_<value> flag;
|
||||
return allocator_traits::priv_select_on_container_copy_construction(flag, a);
|
||||
}
|
||||
|
||||
|
@ -352,11 +352,11 @@ struct allocator_traits
|
|||
BOOST_CONTAINER_FORCEINLINE static void construct(Allocator & a, T* p, BOOST_FWD_REF(Args)... args)
|
||||
{
|
||||
static const bool value = ::boost::move_detail::and_
|
||||
< container_detail::is_not_std_allocator<Allocator>
|
||||
, boost::container::container_detail::has_member_function_callable_with_construct
|
||||
< dtl::is_not_std_allocator<Allocator>
|
||||
, boost::container::dtl::has_member_function_callable_with_construct
|
||||
< Allocator, T*, Args... >
|
||||
>::value;
|
||||
container_detail::bool_<value> flag;
|
||||
dtl::bool_<value> flag;
|
||||
allocator_traits::priv_construct(flag, a, p, ::boost::forward<Args>(args)...);
|
||||
}
|
||||
#endif
|
||||
|
@ -365,7 +365,7 @@ struct allocator_traits
|
|||
//! <code>false</code>.
|
||||
BOOST_CONTAINER_FORCEINLINE static bool storage_is_unpropagable(const Allocator &a, pointer p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
container_detail::bool_<is_partially_propagable::value> flag;
|
||||
dtl::bool_<is_partially_propagable::value> flag;
|
||||
return allocator_traits::priv_storage_is_unpropagable(flag, a, p);
|
||||
}
|
||||
|
||||
|
@ -373,45 +373,45 @@ struct allocator_traits
|
|||
//! <code>a == b</code>.
|
||||
BOOST_CONTAINER_FORCEINLINE static bool equal(const Allocator &a, const Allocator &b) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
container_detail::bool_<is_always_equal::value> flag;
|
||||
dtl::bool_<is_always_equal::value> flag;
|
||||
return allocator_traits::priv_equal(flag, a, b);
|
||||
}
|
||||
|
||||
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
private:
|
||||
BOOST_CONTAINER_FORCEINLINE static pointer priv_allocate(container_detail::true_type, Allocator &a, size_type n, const_void_pointer p)
|
||||
BOOST_CONTAINER_FORCEINLINE static pointer priv_allocate(dtl::true_type, Allocator &a, size_type n, const_void_pointer p)
|
||||
{ return a.allocate(n, p); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE static pointer priv_allocate(container_detail::false_type, Allocator &a, size_type n, const_void_pointer)
|
||||
BOOST_CONTAINER_FORCEINLINE static pointer priv_allocate(dtl::false_type, Allocator &a, size_type n, const_void_pointer)
|
||||
{ return a.allocate(n); }
|
||||
|
||||
template<class T>
|
||||
BOOST_CONTAINER_FORCEINLINE static void priv_destroy(container_detail::true_type, Allocator &a, T* p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_FORCEINLINE static void priv_destroy(dtl::true_type, Allocator &a, T* p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ a.destroy(p); }
|
||||
|
||||
template<class T>
|
||||
BOOST_CONTAINER_FORCEINLINE static void priv_destroy(container_detail::false_type, Allocator &, T* p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_FORCEINLINE static void priv_destroy(dtl::false_type, Allocator &, T* p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ p->~T(); (void)p; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE static size_type priv_max_size(container_detail::true_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_FORCEINLINE static size_type priv_max_size(dtl::true_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return a.max_size(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE static size_type priv_max_size(container_detail::false_type, const Allocator &) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_FORCEINLINE static size_type priv_max_size(dtl::false_type, const Allocator &) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return size_type(-1)/sizeof(value_type); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE static Allocator priv_select_on_container_copy_construction(container_detail::true_type, const Allocator &a)
|
||||
BOOST_CONTAINER_FORCEINLINE static Allocator priv_select_on_container_copy_construction(dtl::true_type, const Allocator &a)
|
||||
{ return a.select_on_container_copy_construction(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE static const Allocator &priv_select_on_container_copy_construction(container_detail::false_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_FORCEINLINE static const Allocator &priv_select_on_container_copy_construction(dtl::false_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return a; }
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
template<class T, class ...Args>
|
||||
BOOST_CONTAINER_FORCEINLINE static void priv_construct(container_detail::true_type, Allocator &a, T *p, BOOST_FWD_REF(Args) ...args)
|
||||
BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::true_type, Allocator &a, T *p, BOOST_FWD_REF(Args) ...args)
|
||||
{ a.construct( p, ::boost::forward<Args>(args)...); }
|
||||
|
||||
template<class T, class ...Args>
|
||||
BOOST_CONTAINER_FORCEINLINE static void priv_construct(container_detail::false_type, Allocator &, T *p, BOOST_FWD_REF(Args) ...args)
|
||||
BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::false_type, Allocator &, T *p, BOOST_FWD_REF(Args) ...args)
|
||||
{ ::new((void*)p, boost_container_new_t()) T(::boost::forward<Args>(args)...); }
|
||||
#else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
public:
|
||||
|
@ -421,11 +421,11 @@ struct allocator_traits
|
|||
BOOST_CONTAINER_FORCEINLINE static void construct(Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
||||
{\
|
||||
static const bool value = ::boost::move_detail::and_ \
|
||||
< container_detail::is_not_std_allocator<Allocator> \
|
||||
, boost::container::container_detail::has_member_function_callable_with_construct \
|
||||
< dtl::is_not_std_allocator<Allocator> \
|
||||
, boost::container::dtl::has_member_function_callable_with_construct \
|
||||
< Allocator, T* BOOST_MOVE_I##N BOOST_MOVE_FWD_T##N > \
|
||||
>::value; \
|
||||
container_detail::bool_<value> flag;\
|
||||
dtl::bool_<value> flag;\
|
||||
(priv_construct)(flag, a, p BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
|
||||
}\
|
||||
//
|
||||
|
@ -438,11 +438,11 @@ struct allocator_traits
|
|||
/////////////////////////////////
|
||||
#define BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL(N) \
|
||||
template<class T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
|
||||
BOOST_CONTAINER_FORCEINLINE static void priv_construct(container_detail::true_type, Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
||||
BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::true_type, Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
||||
{ a.construct( p BOOST_MOVE_I##N BOOST_MOVE_FWD##N ); }\
|
||||
\
|
||||
template<class T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
|
||||
BOOST_CONTAINER_FORCEINLINE static void priv_construct(container_detail::false_type, Allocator &, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
||||
BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::false_type, Allocator &, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
||||
{ ::new((void*)p, boost_container_new_t()) T(BOOST_MOVE_FWD##N); }\
|
||||
//
|
||||
BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL)
|
||||
|
@ -451,19 +451,19 @@ struct allocator_traits
|
|||
#endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
template<class T>
|
||||
BOOST_CONTAINER_FORCEINLINE static void priv_construct(container_detail::false_type, Allocator &, T *p, const ::boost::container::default_init_t&)
|
||||
BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::false_type, Allocator &, T *p, const ::boost::container::default_init_t&)
|
||||
{ ::new((void*)p, boost_container_new_t()) T; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE static bool priv_storage_is_unpropagable(container_detail::true_type, const Allocator &a, pointer p)
|
||||
BOOST_CONTAINER_FORCEINLINE static bool priv_storage_is_unpropagable(dtl::true_type, const Allocator &a, pointer p)
|
||||
{ return a.storage_is_unpropagable(p); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE static bool priv_storage_is_unpropagable(container_detail::false_type, const Allocator &, pointer)
|
||||
BOOST_CONTAINER_FORCEINLINE static bool priv_storage_is_unpropagable(dtl::false_type, const Allocator &, pointer)
|
||||
{ return false; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE static bool priv_equal(container_detail::true_type, const Allocator &, const Allocator &)
|
||||
BOOST_CONTAINER_FORCEINLINE static bool priv_equal(dtl::true_type, const Allocator &, const Allocator &)
|
||||
{ return true; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE static bool priv_equal(container_detail::false_type, const Allocator &a, const Allocator &b)
|
||||
BOOST_CONTAINER_FORCEINLINE static bool priv_equal(dtl::false_type, const Allocator &a, const Allocator &b)
|
||||
{ return a == b; }
|
||||
|
||||
#endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace detail{
|
|||
//Create namespace to avoid compilation errors
|
||||
}}}
|
||||
|
||||
namespace boost{ namespace container{ namespace container_detail{
|
||||
namespace boost{ namespace container{ namespace dtl{
|
||||
namespace bi = boost::intrusive;
|
||||
namespace bid = boost::intrusive::detail;
|
||||
}}}
|
||||
|
@ -88,23 +88,14 @@ namespace boost{ namespace container{ namespace pmr{
|
|||
namespace boost {
|
||||
namespace container {
|
||||
|
||||
//! Enumeration used to configure ordered associative containers
|
||||
//! with a concrete tree implementation.
|
||||
enum tree_type_enum
|
||||
{
|
||||
red_black_tree,
|
||||
avl_tree,
|
||||
scapegoat_tree,
|
||||
splay_tree
|
||||
};
|
||||
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
template<class T>
|
||||
class new_allocator;
|
||||
|
||||
template <class T
|
||||
,class Allocator = new_allocator<T> >
|
||||
,class Allocator = new_allocator<T>
|
||||
,class Options = void>
|
||||
class vector;
|
||||
|
||||
template <class T
|
||||
|
@ -130,35 +121,30 @@ template <class T
|
|||
,class Allocator = new_allocator<T> >
|
||||
class slist;
|
||||
|
||||
template<tree_type_enum TreeType, bool OptimizeSize>
|
||||
struct tree_opt;
|
||||
|
||||
typedef tree_opt<red_black_tree, true> tree_assoc_defaults;
|
||||
|
||||
template <class Key
|
||||
,class Compare = std::less<Key>
|
||||
,class Allocator = new_allocator<Key>
|
||||
,class Options = tree_assoc_defaults >
|
||||
,class Options = void>
|
||||
class set;
|
||||
|
||||
template <class Key
|
||||
,class Compare = std::less<Key>
|
||||
,class Allocator = new_allocator<Key>
|
||||
,class Options = tree_assoc_defaults >
|
||||
,class Options = void >
|
||||
class multiset;
|
||||
|
||||
template <class Key
|
||||
,class T
|
||||
,class Compare = std::less<Key>
|
||||
,class Allocator = new_allocator<std::pair<const Key, T> >
|
||||
,class Options = tree_assoc_defaults >
|
||||
,class Options = void >
|
||||
class map;
|
||||
|
||||
template <class Key
|
||||
,class T
|
||||
,class Compare = std::less<Key>
|
||||
,class Allocator = new_allocator<std::pair<const Key, T> >
|
||||
,class Options = tree_assoc_defaults >
|
||||
,class Options = void >
|
||||
class multimap;
|
||||
|
||||
template <class Key
|
||||
|
@ -246,13 +232,6 @@ class synchronized_pool_resource;
|
|||
|
||||
} //namespace pmr {
|
||||
|
||||
#else
|
||||
|
||||
//! Default options for tree-based associative containers
|
||||
//! - tree_type<red_black_tree>
|
||||
//! - optimize_size<true>
|
||||
typedef implementation_defined tree_assoc_defaults;
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
//! Type used to tag that the input range is
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template <typename T>
|
||||
BOOST_CONTAINER_FORCEINLINE T* addressof(T& obj)
|
||||
|
@ -34,7 +34,7 @@ BOOST_CONTAINER_FORCEINLINE T* addressof(T& obj)
|
|||
)));
|
||||
}
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include <boost/assert.hpp>
|
||||
#include <boost/core/no_exceptions_support.hpp>
|
||||
|
||||
namespace boost { namespace container { namespace container_detail {
|
||||
namespace boost { namespace container { namespace dtl {
|
||||
|
||||
template<class Allocator, class FwdIt, class Iterator>
|
||||
struct move_insert_range_proxy
|
||||
|
@ -125,8 +125,16 @@ struct insert_value_initialized_n_proxy
|
|||
void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) const
|
||||
{ boost::container::uninitialized_value_init_alloc_n(a, n, p); }
|
||||
|
||||
void copy_n_and_update(Allocator &, Iterator, size_type) const
|
||||
{ BOOST_ASSERT(false); }
|
||||
void copy_n_and_update(Allocator &a, Iterator p, size_type n) const
|
||||
{
|
||||
for (; 0 < n; --n, ++p){
|
||||
typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type stor;
|
||||
value_type &v = *static_cast<value_type *>(static_cast<void *>(stor.data));
|
||||
alloc_traits::construct(a, &v);
|
||||
value_destructor<Allocator> on_exit(a, v); (void)on_exit;
|
||||
*p = ::boost::move(v);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
template<class Allocator, class Iterator>
|
||||
|
@ -139,8 +147,18 @@ struct insert_default_initialized_n_proxy
|
|||
void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) const
|
||||
{ boost::container::uninitialized_default_init_alloc_n(a, n, p); }
|
||||
|
||||
void copy_n_and_update(Allocator &, Iterator, size_type) const
|
||||
{ BOOST_ASSERT(false); }
|
||||
void copy_n_and_update(Allocator &a, Iterator p, size_type n) const
|
||||
{
|
||||
if(!is_pod<value_type>::value){
|
||||
for (; 0 < n; --n, ++p){
|
||||
typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type stor;
|
||||
value_type &v = *static_cast<value_type *>(static_cast<void *>(stor.data));
|
||||
alloc_traits::construct(a, &v, default_init);
|
||||
value_destructor<Allocator> on_exit(a, v); (void)on_exit;
|
||||
*p = ::boost::move(v);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
template<class Allocator, class Iterator>
|
||||
|
@ -208,7 +226,7 @@ insert_copy_proxy<Allocator, It> get_insert_value_proxy(const typename boost::co
|
|||
return insert_copy_proxy<Allocator, It>(v);
|
||||
}
|
||||
|
||||
}}} //namespace boost { namespace container { namespace container_detail {
|
||||
}}} //namespace boost { namespace container { namespace dtl {
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
|
@ -217,7 +235,7 @@ insert_copy_proxy<Allocator, It> get_insert_value_proxy(const typename boost::co
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template<class Allocator, class Iterator, class ...Args>
|
||||
struct insert_nonmovable_emplace_proxy
|
||||
|
@ -271,7 +289,7 @@ struct insert_emplace_proxy
|
|||
{
|
||||
BOOST_ASSERT(n ==1); (void)n;
|
||||
typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type v;
|
||||
value_type *vp = static_cast<value_type *>(static_cast<void *>(&v));
|
||||
value_type *vp = static_cast<value_type *>(static_cast<void *>(v.data));
|
||||
alloc_traits::construct(a, vp,
|
||||
::boost::forward<Args>(get<IdxPack>(this->args_))...);
|
||||
BOOST_TRY{
|
||||
|
@ -301,7 +319,7 @@ struct insert_emplace_proxy<Allocator, Iterator, typename boost::container::allo
|
|||
//Any problem is solvable with an extra layer of indirection? ;-)
|
||||
template<class Allocator, class Iterator>
|
||||
struct insert_emplace_proxy<Allocator, Iterator
|
||||
, typename boost::container::container_detail::add_const<typename boost::container::allocator_traits<Allocator>::value_type>::type
|
||||
, typename boost::container::dtl::add_const<typename boost::container::allocator_traits<Allocator>::value_type>::type
|
||||
>
|
||||
: public insert_copy_proxy<Allocator, Iterator>
|
||||
{
|
||||
|
@ -321,7 +339,7 @@ struct insert_emplace_proxy<Allocator, Iterator, typename boost::container::allo
|
|||
|
||||
template<class Allocator, class Iterator>
|
||||
struct insert_emplace_proxy<Allocator, Iterator
|
||||
, typename boost::container::container_detail::add_const<typename boost::container::allocator_traits<Allocator>::value_type>::type &
|
||||
, typename boost::container::dtl::add_const<typename boost::container::allocator_traits<Allocator>::value_type>::type &
|
||||
>
|
||||
: public insert_copy_proxy<Allocator, Iterator>
|
||||
{
|
||||
|
@ -330,7 +348,7 @@ struct insert_emplace_proxy<Allocator, Iterator
|
|||
{}
|
||||
};
|
||||
|
||||
}}} //namespace boost { namespace container { namespace container_detail {
|
||||
}}} //namespace boost { namespace container { namespace dtl {
|
||||
|
||||
#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
|
@ -338,7 +356,7 @@ struct insert_emplace_proxy<Allocator, Iterator
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
#define BOOST_CONTAINER_ADVANCED_INSERT_INT_CODE(N) \
|
||||
template< class Allocator, class Iterator BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
|
||||
|
@ -382,7 +400,7 @@ struct insert_emplace_proxy_arg##N\
|
|||
BOOST_ASSERT(n == 1); (void)n;\
|
||||
typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type v;\
|
||||
BOOST_ASSERT((((size_type)(&v)) % alignment_of<value_type>::value) == 0);\
|
||||
value_type *vp = static_cast<value_type *>(static_cast<void *>(&v));\
|
||||
value_type *vp = static_cast<value_type *>(static_cast<void *>(v.data));\
|
||||
alloc_traits::construct(a, vp BOOST_MOVE_I##N BOOST_MOVE_MFWD##N);\
|
||||
BOOST_TRY{\
|
||||
*p = ::boost::move(*vp);\
|
||||
|
@ -437,7 +455,7 @@ struct insert_emplace_proxy_arg1<Allocator, Iterator, typename boost::container:
|
|||
//Any problem is solvable with an extra layer of indirection? ;-)
|
||||
template<class Allocator, class Iterator>
|
||||
struct insert_emplace_proxy_arg1<Allocator, Iterator
|
||||
, typename boost::container::container_detail::add_const<typename boost::container::allocator_traits<Allocator>::value_type>::type
|
||||
, typename boost::container::dtl::add_const<typename boost::container::allocator_traits<Allocator>::value_type>::type
|
||||
>
|
||||
: public insert_copy_proxy<Allocator, Iterator>
|
||||
{
|
||||
|
@ -457,7 +475,7 @@ struct insert_emplace_proxy_arg1<Allocator, Iterator, typename boost::container:
|
|||
|
||||
template<class Allocator, class Iterator>
|
||||
struct insert_emplace_proxy_arg1<Allocator, Iterator
|
||||
, typename boost::container::container_detail::add_const<typename boost::container::allocator_traits<Allocator>::value_type>::type &
|
||||
, typename boost::container::dtl::add_const<typename boost::container::allocator_traits<Allocator>::value_type>::type &
|
||||
>
|
||||
: public insert_copy_proxy<Allocator, Iterator>
|
||||
{
|
||||
|
@ -468,7 +486,7 @@ struct insert_emplace_proxy_arg1<Allocator, Iterator
|
|||
|
||||
#endif
|
||||
|
||||
}}} //namespace boost { namespace container { namespace container_detail {
|
||||
}}} //namespace boost { namespace container { namespace dtl {
|
||||
|
||||
#endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
|
|
|
@ -24,36 +24,36 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template<class AllocatorType>
|
||||
inline void swap_alloc(AllocatorType &, AllocatorType &, container_detail::false_type)
|
||||
inline void swap_alloc(AllocatorType &, AllocatorType &, dtl::false_type)
|
||||
BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{}
|
||||
|
||||
template<class AllocatorType>
|
||||
inline void swap_alloc(AllocatorType &l, AllocatorType &r, container_detail::true_type)
|
||||
inline void swap_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type)
|
||||
{ boost::adl_move_swap(l, r); }
|
||||
|
||||
template<class AllocatorType>
|
||||
inline void assign_alloc(AllocatorType &, const AllocatorType &, container_detail::false_type)
|
||||
inline void assign_alloc(AllocatorType &, const AllocatorType &, dtl::false_type)
|
||||
BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{}
|
||||
|
||||
template<class AllocatorType>
|
||||
inline void assign_alloc(AllocatorType &l, const AllocatorType &r, container_detail::true_type)
|
||||
inline void assign_alloc(AllocatorType &l, const AllocatorType &r, dtl::true_type)
|
||||
{ l = r; }
|
||||
|
||||
template<class AllocatorType>
|
||||
inline void move_alloc(AllocatorType &, AllocatorType &, container_detail::false_type)
|
||||
inline void move_alloc(AllocatorType &, AllocatorType &, dtl::false_type)
|
||||
BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{}
|
||||
|
||||
template<class AllocatorType>
|
||||
inline void move_alloc(AllocatorType &l, AllocatorType &r, container_detail::true_type)
|
||||
inline void move_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type)
|
||||
{ l = ::boost::move(r); }
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
@ -33,12 +33,12 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template<class Allocator, unsigned Version = boost::container::container_detail::version<Allocator>::value>
|
||||
template<class Allocator, unsigned Version = boost::container::dtl::version<Allocator>::value>
|
||||
struct allocator_version_traits
|
||||
{
|
||||
typedef ::boost::container::container_detail::integral_constant
|
||||
typedef ::boost::container::dtl::integral_constant
|
||||
<unsigned, Version> alloc_version;
|
||||
|
||||
typedef typename Allocator::multiallocation_chain multiallocation_chain;
|
||||
|
@ -67,7 +67,7 @@ struct allocator_version_traits
|
|||
template<class Allocator>
|
||||
struct allocator_version_traits<Allocator, 1>
|
||||
{
|
||||
typedef ::boost::container::container_detail::integral_constant
|
||||
typedef ::boost::container::dtl::integral_constant
|
||||
<unsigned, 1> alloc_version;
|
||||
|
||||
typedef typename boost::container::allocator_traits<Allocator>::pointer pointer;
|
||||
|
@ -76,9 +76,9 @@ struct allocator_version_traits<Allocator, 1>
|
|||
|
||||
typedef typename boost::intrusive::pointer_traits<pointer>::
|
||||
template rebind_pointer<void>::type void_ptr;
|
||||
typedef container_detail::basic_multiallocation_chain
|
||||
typedef dtl::basic_multiallocation_chain
|
||||
<void_ptr> multialloc_cached_counted;
|
||||
typedef boost::container::container_detail::
|
||||
typedef boost::container::dtl::
|
||||
transform_multiallocation_chain
|
||||
< multialloc_cached_counted, value_type> multiallocation_chain;
|
||||
|
||||
|
@ -153,7 +153,7 @@ struct allocator_version_traits<Allocator, 1>
|
|||
}
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, InpIt source)
|
|||
template<class DstIt, class U, class D>
|
||||
BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, value_init_construct_iterator<U, D>)
|
||||
{
|
||||
container_detail::value_init<U> val;
|
||||
dtl::value_init<U> val;
|
||||
*dest = boost::move(val.get());
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template<class AllocatorOrContainer, class ToType, bool = is_container<AllocatorOrContainer>::value>
|
||||
struct container_or_allocator_rebind_impl
|
||||
|
@ -42,7 +42,7 @@ struct container_or_allocator_rebind
|
|||
: container_or_allocator_rebind_impl<AllocatorOrContainer, ToType>
|
||||
{};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template <class Cont, class U>
|
||||
struct container_rebind;
|
||||
|
@ -251,7 +251,7 @@ namespace container_detail {
|
|||
|
||||
#endif //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
@ -34,11 +34,16 @@
|
|||
// other
|
||||
#include <boost/core/no_exceptions_support.hpp>
|
||||
// std
|
||||
#include <cstring> //for emmove/memcpy
|
||||
#include <cstring> //for memmove/memcpy
|
||||
|
||||
#if defined(BOOST_GCC) && (BOOST_GCC >= 80000)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wclass-memaccess"
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template<class I>
|
||||
struct are_elements_contiguous
|
||||
|
@ -65,17 +70,15 @@ struct are_elements_contiguous< ::boost::move_iterator<It> >
|
|||
: are_elements_contiguous<It>
|
||||
{};
|
||||
|
||||
} //namespace dtl {
|
||||
|
||||
/////////////////////////
|
||||
// predeclarations
|
||||
/////////////////////////
|
||||
|
||||
template<class Pointer>
|
||||
class vector_iterator;
|
||||
template <class Pointer, bool IsConst>
|
||||
class vec_iterator;
|
||||
|
||||
template<class Pointer>
|
||||
class vector_const_iterator;
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace container {
|
||||
|
||||
namespace interprocess {
|
||||
|
@ -87,20 +90,14 @@ class offset_ptr;
|
|||
|
||||
namespace container {
|
||||
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
/////////////////////////
|
||||
//vector_[const_]iterator
|
||||
/////////////////////////
|
||||
|
||||
template<class Pointer>
|
||||
struct are_elements_contiguous<boost::container::container_detail::vector_iterator<Pointer> >
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
template<class Pointer>
|
||||
struct are_elements_contiguous<boost::container::container_detail::vector_const_iterator<Pointer> >
|
||||
template <class Pointer, bool IsConst>
|
||||
struct are_elements_contiguous<boost::container::vec_iterator<Pointer, IsConst> >
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
@ -130,7 +127,7 @@ template <typename I, typename O>
|
|||
struct is_memtransfer_copy_assignable
|
||||
: boost::move_detail::and_
|
||||
< are_contiguous_and_same<I, O>
|
||||
, container_detail::is_trivially_copy_assignable< typename ::boost::container::iterator_traits<I>::value_type >
|
||||
, dtl::is_trivially_copy_assignable< typename ::boost::container::iterator_traits<I>::value_type >
|
||||
>
|
||||
{};
|
||||
|
||||
|
@ -138,28 +135,28 @@ template <typename I, typename O>
|
|||
struct is_memtransfer_copy_constructible
|
||||
: boost::move_detail::and_
|
||||
< are_contiguous_and_same<I, O>
|
||||
, container_detail::is_trivially_copy_constructible< typename ::boost::container::iterator_traits<I>::value_type >
|
||||
, dtl::is_trivially_copy_constructible< typename ::boost::container::iterator_traits<I>::value_type >
|
||||
>
|
||||
{};
|
||||
|
||||
template <typename I, typename O, typename R>
|
||||
struct enable_if_memtransfer_copy_constructible
|
||||
: enable_if<container_detail::is_memtransfer_copy_constructible<I, O>, R>
|
||||
: enable_if<dtl::is_memtransfer_copy_constructible<I, O>, R>
|
||||
{};
|
||||
|
||||
template <typename I, typename O, typename R>
|
||||
struct disable_if_memtransfer_copy_constructible
|
||||
: disable_if<container_detail::is_memtransfer_copy_constructible<I, O>, R>
|
||||
: disable_if<dtl::is_memtransfer_copy_constructible<I, O>, R>
|
||||
{};
|
||||
|
||||
template <typename I, typename O, typename R>
|
||||
struct enable_if_memtransfer_copy_assignable
|
||||
: enable_if<container_detail::is_memtransfer_copy_assignable<I, O>, R>
|
||||
: enable_if<dtl::is_memtransfer_copy_assignable<I, O>, R>
|
||||
{};
|
||||
|
||||
template <typename I, typename O, typename R>
|
||||
struct disable_if_memtransfer_copy_assignable
|
||||
: disable_if<container_detail::is_memtransfer_copy_assignable<I, O>, R>
|
||||
: disable_if<dtl::is_memtransfer_copy_assignable<I, O>, R>
|
||||
{};
|
||||
|
||||
template
|
||||
|
@ -224,44 +221,44 @@ struct is_memzero_initializable
|
|||
{
|
||||
typedef typename ::boost::container::iterator_traits<O>::value_type value_type;
|
||||
static const bool value = are_elements_contiguous<O>::value &&
|
||||
( container_detail::is_integral<value_type>::value || container_detail::is_enum<value_type>::value
|
||||
( dtl::is_integral<value_type>::value || dtl::is_enum<value_type>::value
|
||||
#if defined(BOOST_CONTAINER_MEMZEROED_POINTER_IS_NULL)
|
||||
|| container_detail::is_pointer<value_type>::value
|
||||
|| dtl::is_pointer<value_type>::value
|
||||
#endif
|
||||
#if defined(BOOST_CONTAINER_MEMZEROED_FLOATING_POINT_IS_ZERO)
|
||||
|| container_detail::is_floating_point<value_type>::value
|
||||
|| dtl::is_floating_point<value_type>::value
|
||||
#endif
|
||||
#if defined(BOOST_CONTAINER_MEMZEROED_FLOATING_POINT_IS_ZERO) && defined(BOOST_CONTAINER_MEMZEROED_POINTER_IS_NULL)
|
||||
|| container_detail::is_pod<value_type>::value
|
||||
|| dtl::is_pod<value_type>::value
|
||||
#endif
|
||||
);
|
||||
};
|
||||
|
||||
template <typename O, typename R>
|
||||
struct enable_if_memzero_initializable
|
||||
: enable_if_c<container_detail::is_memzero_initializable<O>::value, R>
|
||||
: enable_if_c<dtl::is_memzero_initializable<O>::value, R>
|
||||
{};
|
||||
|
||||
template <typename O, typename R>
|
||||
struct disable_if_memzero_initializable
|
||||
: enable_if_c<!container_detail::is_memzero_initializable<O>::value, R>
|
||||
: enable_if_c<!dtl::is_memzero_initializable<O>::value, R>
|
||||
{};
|
||||
|
||||
template <typename I, typename R>
|
||||
struct enable_if_trivially_destructible
|
||||
: enable_if_c < container_detail::is_trivially_destructible
|
||||
: enable_if_c < dtl::is_trivially_destructible
|
||||
<typename boost::container::iterator_traits<I>::value_type>::value
|
||||
, R>
|
||||
{};
|
||||
|
||||
template <typename I, typename R>
|
||||
struct disable_if_trivially_destructible
|
||||
: enable_if_c <!container_detail::is_trivially_destructible
|
||||
: enable_if_c <!dtl::is_trivially_destructible
|
||||
<typename boost::container::iterator_traits<I>::value_type>::value
|
||||
, R>
|
||||
{};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -281,7 +278,7 @@ template
|
|||
<typename Allocator,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
uninitialized_move_alloc(Allocator &a, I f, I l, F r)
|
||||
{
|
||||
F back = r;
|
||||
|
@ -305,9 +302,9 @@ template
|
|||
<typename Allocator,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
uninitialized_move_alloc(Allocator &, I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove(f, l, r); }
|
||||
{ return dtl::memmove(f, l, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -326,7 +323,7 @@ template
|
|||
<typename Allocator,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
uninitialized_move_alloc_n(Allocator &a, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
|
||||
{
|
||||
F back = r;
|
||||
|
@ -350,9 +347,9 @@ template
|
|||
<typename Allocator,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
uninitialized_move_alloc_n(Allocator &, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove_n(f, n, r); }
|
||||
{ return dtl::memmove_n(f, n, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -371,7 +368,7 @@ template
|
|||
<typename Allocator,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_constructible<I, F, I>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, I>::type
|
||||
uninitialized_move_alloc_n_source(Allocator &a, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
|
||||
{
|
||||
F back = r;
|
||||
|
@ -395,9 +392,9 @@ template
|
|||
<typename Allocator,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_constructible<I, F, I>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_constructible<I, F, I>::type
|
||||
uninitialized_move_alloc_n_source(Allocator &, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove_n_source(f, n, r); }
|
||||
{ return dtl::memmove_n_source(f, n, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -416,7 +413,7 @@ template
|
|||
<typename Allocator,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
uninitialized_copy_alloc(Allocator &a, I f, I l, F r)
|
||||
{
|
||||
F back = r;
|
||||
|
@ -440,9 +437,9 @@ template
|
|||
<typename Allocator,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
uninitialized_copy_alloc(Allocator &, I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove(f, l, r); }
|
||||
{ return dtl::memmove(f, l, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -461,7 +458,7 @@ template
|
|||
<typename Allocator,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
uninitialized_copy_alloc_n(Allocator &a, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
|
||||
{
|
||||
F back = r;
|
||||
|
@ -485,9 +482,9 @@ template
|
|||
<typename Allocator,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
uninitialized_copy_alloc_n(Allocator &, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove_n(f, n, r); }
|
||||
{ return dtl::memmove_n(f, n, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -506,7 +503,7 @@ template
|
|||
<typename Allocator,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_constructible<I, F, I>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, I>::type
|
||||
uninitialized_copy_alloc_n_source(Allocator &a, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
|
||||
{
|
||||
F back = r;
|
||||
|
@ -530,9 +527,9 @@ template
|
|||
<typename Allocator,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_constructible<I, F, I>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_constructible<I, F, I>::type
|
||||
uninitialized_copy_alloc_n_source(Allocator &, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove_n_source(f, n, r); }
|
||||
{ return dtl::memmove_n_source(f, n, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -550,7 +547,7 @@ inline typename container_detail::enable_if_memtransfer_copy_constructible<I, F,
|
|||
template
|
||||
<typename Allocator,
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memzero_initializable<F, F>::type
|
||||
inline typename dtl::disable_if_memzero_initializable<F, F>::type
|
||||
uninitialized_value_init_alloc_n(Allocator &a, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
|
||||
{
|
||||
F back = r;
|
||||
|
@ -573,7 +570,7 @@ inline typename container_detail::disable_if_memzero_initializable<F, F>::type
|
|||
template
|
||||
<typename Allocator,
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memzero_initializable<F, F>::type
|
||||
inline typename dtl::enable_if_memzero_initializable<F, F>::type
|
||||
uninitialized_value_init_alloc_n(Allocator &, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
|
||||
{
|
||||
typedef typename boost::container::iterator_traits<F>::value_type value_type;
|
||||
|
@ -698,7 +695,7 @@ inline F uninitialized_fill_alloc_n(Allocator &a, const T &v, typename boost::co
|
|||
template
|
||||
<typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
copy(I f, I l, F r)
|
||||
{
|
||||
while (f != l) {
|
||||
|
@ -711,9 +708,9 @@ inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, F
|
|||
template
|
||||
<typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
copy(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove(f, l, r); }
|
||||
{ return dtl::memmove(f, l, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -725,7 +722,7 @@ template
|
|||
<typename I, // I models InputIterator
|
||||
typename U, // U models unsigned integral constant
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
copy_n(I f, U n, F r)
|
||||
{
|
||||
while (n--) {
|
||||
|
@ -739,9 +736,9 @@ template
|
|||
<typename I, // I models InputIterator
|
||||
typename U, // U models unsigned integral constant
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
copy_n(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove_n(f, n, r); }
|
||||
{ return dtl::memmove_n(f, n, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -753,7 +750,7 @@ template
|
|||
<typename I, // I models InputIterator
|
||||
typename U, // U models unsigned integral constant
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
copy_n_source(I f, U n, F r)
|
||||
{
|
||||
while (n--) {
|
||||
|
@ -767,9 +764,9 @@ template
|
|||
<typename I, // I models InputIterator
|
||||
typename U, // U models unsigned integral constant
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
copy_n_source(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove_n_source(f, n, r); }
|
||||
{ return dtl::memmove_n_source(f, n, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -781,7 +778,7 @@ template
|
|||
<typename I, // I models InputIterator
|
||||
typename U, // U models unsigned integral constant
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
copy_n_source_dest(I f, U n, F &r)
|
||||
{
|
||||
while (n--) {
|
||||
|
@ -795,9 +792,9 @@ template
|
|||
<typename I, // I models InputIterator
|
||||
typename U, // U models unsigned integral constant
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
copy_n_source_dest(I f, U n, F &r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove_n_source_dest(f, n, r); }
|
||||
{ return dtl::memmove_n_source_dest(f, n, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -808,7 +805,7 @@ inline typename container_detail::enable_if_memtransfer_copy_assignable<I, F, I>
|
|||
template
|
||||
<typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
move(I f, I l, F r)
|
||||
{
|
||||
while (f != l) {
|
||||
|
@ -821,9 +818,9 @@ inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, F
|
|||
template
|
||||
<typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
move(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove(f, l, r); }
|
||||
{ return dtl::memmove(f, l, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -835,7 +832,7 @@ template
|
|||
<typename I, // I models InputIterator
|
||||
typename U, // U models unsigned integral constant
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
move_n(I f, U n, F r)
|
||||
{
|
||||
while (n--) {
|
||||
|
@ -849,9 +846,9 @@ template
|
|||
<typename I, // I models InputIterator
|
||||
typename U, // U models unsigned integral constant
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
move_n(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove_n(f, n, r); }
|
||||
{ return dtl::memmove_n(f, n, r); }
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -863,7 +860,7 @@ inline typename container_detail::enable_if_memtransfer_copy_assignable<I, F, F>
|
|||
template
|
||||
<typename I, // I models BidirectionalIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
move_backward(I f, I l, F r)
|
||||
{
|
||||
while (f != l) {
|
||||
|
@ -876,7 +873,7 @@ inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, F
|
|||
template
|
||||
<typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
move_backward(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
typedef typename boost::container::iterator_traits<I>::value_type value_type;
|
||||
|
@ -896,7 +893,7 @@ template
|
|||
<typename I // I models InputIterator
|
||||
,typename U // U models unsigned integral constant
|
||||
,typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
move_n_source_dest(I f, U n, F &r)
|
||||
{
|
||||
while (n--) {
|
||||
|
@ -910,9 +907,9 @@ template
|
|||
<typename I // I models InputIterator
|
||||
,typename U // U models unsigned integral constant
|
||||
,typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
move_n_source_dest(I f, U n, F &r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove_n_source_dest(f, n, r); }
|
||||
{ return dtl::memmove_n_source_dest(f, n, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -924,7 +921,7 @@ template
|
|||
<typename I // I models InputIterator
|
||||
,typename U // U models unsigned integral constant
|
||||
,typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
move_n_source(I f, U n, F r)
|
||||
{
|
||||
while (n--) {
|
||||
|
@ -938,9 +935,9 @@ template
|
|||
<typename I // I models InputIterator
|
||||
,typename U // U models unsigned integral constant
|
||||
,typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
move_n_source(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove_n_source(f, n, r); }
|
||||
{ return dtl::memmove_n_source(f, n, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -952,7 +949,7 @@ template
|
|||
<typename Allocator
|
||||
,typename I // I models InputIterator
|
||||
,typename U> // U models unsigned integral constant
|
||||
inline typename container_detail::disable_if_trivially_destructible<I, void>::type
|
||||
inline typename dtl::disable_if_trivially_destructible<I, void>::type
|
||||
destroy_alloc_n(Allocator &a, I f, U n)
|
||||
{
|
||||
while(n){
|
||||
|
@ -966,7 +963,7 @@ template
|
|||
<typename Allocator
|
||||
,typename I // I models InputIterator
|
||||
,typename U> // U models unsigned integral constant
|
||||
inline typename container_detail::enable_if_trivially_destructible<I, void>::type
|
||||
inline typename dtl::enable_if_trivially_destructible<I, void>::type
|
||||
destroy_alloc_n(Allocator &, I, U)
|
||||
{}
|
||||
|
||||
|
@ -982,7 +979,7 @@ template
|
|||
,typename F // F models ForwardIterator
|
||||
,typename G // G models ForwardIterator
|
||||
>
|
||||
inline typename container_detail::disable_if_memtransfer_copy_assignable<F, G, void>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_assignable<F, G, void>::type
|
||||
deep_swap_alloc_n( Allocator &a, F short_range_f, typename allocator_traits<Allocator>::size_type n_i
|
||||
, G large_range_f, typename allocator_traits<Allocator>::size_type n_j)
|
||||
{
|
||||
|
@ -1002,21 +999,21 @@ template
|
|||
,typename F // F models ForwardIterator
|
||||
,typename G // G models ForwardIterator
|
||||
>
|
||||
inline typename container_detail::enable_if_c
|
||||
< container_detail::is_memtransfer_copy_assignable<F, G>::value && (MaxTmpBytes <= DeepSwapAllocNMaxStorage) && false
|
||||
inline typename dtl::enable_if_c
|
||||
< dtl::is_memtransfer_copy_assignable<F, G>::value && (MaxTmpBytes <= DeepSwapAllocNMaxStorage) && false
|
||||
, void>::type
|
||||
deep_swap_alloc_n( Allocator &a, F short_range_f, typename allocator_traits<Allocator>::size_type n_i
|
||||
, G large_range_f, typename allocator_traits<Allocator>::size_type n_j)
|
||||
{
|
||||
typedef typename allocator_traits<Allocator>::value_type value_type;
|
||||
typedef typename container_detail::aligned_storage
|
||||
<MaxTmpBytes, container_detail::alignment_of<value_type>::value>::type storage_type;
|
||||
typedef typename dtl::aligned_storage
|
||||
<MaxTmpBytes, dtl::alignment_of<value_type>::value>::type storage_type;
|
||||
storage_type storage;
|
||||
|
||||
const std::size_t n_i_bytes = sizeof(value_type)*n_i;
|
||||
void *const large_ptr = static_cast<void*>(boost::movelib::iterator_to_raw_pointer(large_range_f));
|
||||
void *const short_ptr = static_cast<void*>(boost::movelib::iterator_to_raw_pointer(short_range_f));
|
||||
void *const stora_ptr = static_cast<void*>(boost::movelib::iterator_to_raw_pointer(storage));
|
||||
void *const stora_ptr = static_cast<void*>(boost::movelib::iterator_to_raw_pointer(storage.data));
|
||||
std::memcpy(stora_ptr, large_ptr, n_i_bytes);
|
||||
std::memcpy(large_ptr, short_ptr, n_i_bytes);
|
||||
std::memcpy(short_ptr, stora_ptr, n_i_bytes);
|
||||
|
@ -1032,22 +1029,22 @@ template
|
|||
,typename F // F models ForwardIterator
|
||||
,typename G // G models ForwardIterator
|
||||
>
|
||||
inline typename container_detail::enable_if_c
|
||||
< container_detail::is_memtransfer_copy_assignable<F, G>::value && true//(MaxTmpBytes > DeepSwapAllocNMaxStorage)
|
||||
inline typename dtl::enable_if_c
|
||||
< dtl::is_memtransfer_copy_assignable<F, G>::value && true//(MaxTmpBytes > DeepSwapAllocNMaxStorage)
|
||||
, void>::type
|
||||
deep_swap_alloc_n( Allocator &a, F short_range_f, typename allocator_traits<Allocator>::size_type n_i
|
||||
, G large_range_f, typename allocator_traits<Allocator>::size_type n_j)
|
||||
{
|
||||
typedef typename allocator_traits<Allocator>::value_type value_type;
|
||||
typedef typename container_detail::aligned_storage
|
||||
<DeepSwapAllocNMaxStorage, container_detail::alignment_of<value_type>::value>::type storage_type;
|
||||
typedef typename dtl::aligned_storage
|
||||
<DeepSwapAllocNMaxStorage, dtl::alignment_of<value_type>::value>::type storage_type;
|
||||
storage_type storage;
|
||||
const std::size_t sizeof_storage = sizeof(storage);
|
||||
|
||||
std::size_t n_i_bytes = sizeof(value_type)*n_i;
|
||||
char *large_ptr = static_cast<char*>(static_cast<void*>(boost::movelib::iterator_to_raw_pointer(large_range_f)));
|
||||
char *short_ptr = static_cast<char*>(static_cast<void*>(boost::movelib::iterator_to_raw_pointer(short_range_f)));
|
||||
char *stora_ptr = static_cast<char*>(static_cast<void*>(&storage));
|
||||
char *stora_ptr = static_cast<char*>(static_cast<void*>(storage.data));
|
||||
|
||||
std::size_t szt_times = n_i_bytes/sizeof_storage;
|
||||
const std::size_t szt_rem = n_i_bytes%sizeof_storage;
|
||||
|
@ -1149,4 +1146,9 @@ void move_assign_range_alloc_n( Allocator &a, I inp_start, typename allocator_tr
|
|||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
#if defined(BOOST_GCC) && (BOOST_GCC >= 80000)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_DETAIL_COPY_MOVE_ALGO_HPP
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
//!A deleter for scoped_ptr that deallocates the memory
|
||||
//!allocated for an object using a STL allocator.
|
||||
|
@ -39,8 +39,8 @@ struct scoped_deallocator
|
|||
{
|
||||
typedef allocator_traits<Allocator> allocator_traits_type;
|
||||
typedef typename allocator_traits_type::pointer pointer;
|
||||
typedef container_detail::integral_constant<unsigned,
|
||||
boost::container::container_detail::
|
||||
typedef dtl::integral_constant<unsigned,
|
||||
boost::container::dtl::
|
||||
version<Allocator>::value> alloc_version;
|
||||
|
||||
private:
|
||||
|
@ -142,8 +142,8 @@ struct scoped_destroy_deallocator
|
|||
typedef boost::container::allocator_traits<Allocator> AllocTraits;
|
||||
typedef typename AllocTraits::pointer pointer;
|
||||
typedef typename AllocTraits::size_type size_type;
|
||||
typedef container_detail::integral_constant<unsigned,
|
||||
boost::container::container_detail::
|
||||
typedef dtl::integral_constant<unsigned,
|
||||
boost::container::dtl::
|
||||
version<Allocator>::value> alloc_version;
|
||||
|
||||
scoped_destroy_deallocator(pointer p, Allocator& a)
|
||||
|
@ -296,8 +296,8 @@ class allocator_destroyer
|
|||
typedef boost::container::allocator_traits<Allocator> AllocTraits;
|
||||
typedef typename AllocTraits::value_type value_type;
|
||||
typedef typename AllocTraits::pointer pointer;
|
||||
typedef container_detail::integral_constant<unsigned,
|
||||
boost::container::container_detail::
|
||||
typedef dtl::integral_constant<unsigned,
|
||||
boost::container::dtl::
|
||||
version<Allocator>::value> alloc_version;
|
||||
|
||||
private:
|
||||
|
@ -369,7 +369,7 @@ class allocator_multialloc_chain_node_deallocator
|
|||
}
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -36,7 +36,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template <class Container>
|
||||
struct is_container
|
||||
|
@ -48,7 +48,7 @@ struct is_container
|
|||
has_member_function_callable_with_empty<const Container>::value;
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template <class Container>
|
||||
struct is_contiguous_container
|
||||
|
@ -40,7 +40,7 @@ struct is_contiguous_container
|
|||
has_member_function_callable_with_data<const Container>::value;
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template <class ForwardIterator, class Pred>
|
||||
bool is_sorted (ForwardIterator first, ForwardIterator last, Pred pred)
|
||||
|
@ -50,7 +50,7 @@ bool is_sorted_and_unique (ForwardIterator first, ForwardIterator last, Pred pre
|
|||
return true;
|
||||
}
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#endif
|
||||
|
||||
#include <boost/intrusive/detail/iterator.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
|
@ -34,6 +35,35 @@ using ::boost::intrusive::iterator_enable_if_tag;
|
|||
using ::boost::intrusive::iterator_disable_if_tag;
|
||||
using ::boost::intrusive::iterator_arrow_result;
|
||||
|
||||
template <class Container>
|
||||
class back_emplacer
|
||||
{
|
||||
private:
|
||||
Container& container;
|
||||
|
||||
public:
|
||||
typedef std::output_iterator_tag iterator_category;
|
||||
typedef void value_type;
|
||||
typedef void difference_type;
|
||||
typedef void pointer;
|
||||
typedef void reference;
|
||||
|
||||
back_emplacer(Container& x)
|
||||
: container(x)
|
||||
{}
|
||||
|
||||
template<class U>
|
||||
back_emplacer& operator=(BOOST_FWD_REF(U) value)
|
||||
{
|
||||
container.emplace_back(boost::forward<U>(value));
|
||||
return *this;
|
||||
}
|
||||
back_emplacer& operator*() { return *this; }
|
||||
back_emplacer& operator++() { return *this; }
|
||||
back_emplacer& operator++(int){ return *this; }
|
||||
};
|
||||
|
||||
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-2015. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef BOOST_CONTAINER_DETAIL_ITERATOR_TO_RAW_POINTER_HPP
|
||||
#define BOOST_CONTAINER_DETAIL_ITERATOR_TO_RAW_POINTER_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/container/detail/iterator.hpp>
|
||||
#include <boost/container/detail/to_raw_pointer.hpp>
|
||||
#include <boost/intrusive/pointer_traits.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
|
||||
template <class T>
|
||||
inline T* iterator_to_pointer(T* i)
|
||||
{ return i; }
|
||||
|
||||
template <class Iterator>
|
||||
inline typename boost::container::iterator_traits<Iterator>::pointer
|
||||
iterator_to_pointer(const Iterator &i)
|
||||
{ return i.operator->(); }
|
||||
|
||||
template <class Iterator>
|
||||
struct iterator_to_element_ptr
|
||||
{
|
||||
typedef typename boost::container::iterator_traits<Iterator>::pointer pointer;
|
||||
typedef typename boost::intrusive::pointer_traits<pointer>::element_type element_type;
|
||||
typedef element_type* type;
|
||||
};
|
||||
|
||||
template <class Iterator>
|
||||
inline typename iterator_to_element_ptr<Iterator>::type
|
||||
iterator_to_raw_pointer(const Iterator &i)
|
||||
{
|
||||
return ::boost::intrusive::detail::to_raw_pointer
|
||||
( ::boost::container::container_detail::iterator_to_pointer(i) );
|
||||
}
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_DETAIL_ITERATOR_TO_RAW_POINTER_HPP
|
|
@ -612,7 +612,7 @@ class emplace_iterator
|
|||
template<class ...Args>
|
||||
struct emplace_functor
|
||||
{
|
||||
typedef typename container_detail::build_number_seq<sizeof...(Args)>::type index_tuple_t;
|
||||
typedef typename dtl::build_number_seq<sizeof...(Args)>::type index_tuple_t;
|
||||
|
||||
emplace_functor(BOOST_FWD_REF(Args)... args)
|
||||
: args_(args...)
|
||||
|
@ -628,21 +628,21 @@ struct emplace_functor
|
|||
|
||||
private:
|
||||
template<class Allocator, class T, std::size_t ...IdxPack>
|
||||
BOOST_CONTAINER_FORCEINLINE void inplace_impl(Allocator &a, T* ptr, const container_detail::index_tuple<IdxPack...>&)
|
||||
BOOST_CONTAINER_FORCEINLINE void inplace_impl(Allocator &a, T* ptr, const dtl::index_tuple<IdxPack...>&)
|
||||
{
|
||||
allocator_traits<Allocator>::construct
|
||||
(a, ptr, ::boost::forward<Args>(container_detail::get<IdxPack>(args_))...);
|
||||
(a, ptr, ::boost::forward<Args>(dtl::get<IdxPack>(args_))...);
|
||||
}
|
||||
|
||||
template<class DestIt, std::size_t ...IdxPack>
|
||||
BOOST_CONTAINER_FORCEINLINE void inplace_impl(DestIt dest, const container_detail::index_tuple<IdxPack...>&)
|
||||
BOOST_CONTAINER_FORCEINLINE void inplace_impl(DestIt dest, const dtl::index_tuple<IdxPack...>&)
|
||||
{
|
||||
typedef typename boost::container::iterator_traits<DestIt>::value_type value_type;
|
||||
value_type && tmp= value_type(::boost::forward<Args>(container_detail::get<IdxPack>(args_))...);
|
||||
value_type && tmp= value_type(::boost::forward<Args>(dtl::get<IdxPack>(args_))...);
|
||||
*dest = ::boost::move(tmp);
|
||||
}
|
||||
|
||||
container_detail::tuple<Args&...> args_;
|
||||
dtl::tuple<Args&...> args_;
|
||||
};
|
||||
|
||||
template<class ...Args>
|
||||
|
@ -672,7 +672,7 @@ struct emplace_functor##N\
|
|||
void operator()(DestIt dest)\
|
||||
{\
|
||||
typedef typename boost::container::iterator_traits<DestIt>::value_type value_type;\
|
||||
BOOST_MOVE_IF(N, value_type tmp(BOOST_MOVE_MFWD##N), container_detail::value_init<value_type> tmp) ;\
|
||||
BOOST_MOVE_IF(N, value_type tmp(BOOST_MOVE_MFWD##N), dtl::value_init<value_type> tmp) ;\
|
||||
*dest = ::boost::move(const_cast<value_type &>(BOOST_MOVE_IF(N, tmp, tmp.get())));\
|
||||
}\
|
||||
\
|
||||
|
@ -692,7 +692,7 @@ BOOST_MOVE_ITERATE_0TO9(BOOST_MOVE_ITERATOR_EMPLACE_FUNCTOR_CODE)
|
|||
|
||||
#endif
|
||||
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template<class T>
|
||||
struct has_iterator_category
|
||||
|
@ -863,7 +863,7 @@ class iterator_from_iiterator
|
|||
IIterator m_iit;
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
|
||||
using ::boost::intrusive::reverse_iterator;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template<class T>
|
||||
const T &max_value(const T &a, const T &b)
|
||||
|
@ -30,7 +30,7 @@ template<class T>
|
|||
const T &min_value(const T &a, const T &b)
|
||||
{ return a < b ? a : b; }
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
using boost::move_detail::integral_constant;
|
||||
using boost::move_detail::true_type;
|
||||
|
@ -76,7 +76,25 @@ struct select1st
|
|||
{ return const_cast<type&>(x.first); }
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
template <class T, class=void>
|
||||
struct is_transparent
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_transparent<T, typename T::is_transparent>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
template <typename C, typename K, typename R>
|
||||
struct enable_if_transparent
|
||||
: boost::move_detail::enable_if_c<dtl::is_transparent<C>::value, R>
|
||||
{};
|
||||
|
||||
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template<class VoidPointer>
|
||||
class basic_multiallocation_chain
|
||||
|
@ -53,7 +53,7 @@ class basic_multiallocation_chain
|
|||
typedef bi::slist< node
|
||||
, bi::linear<true>
|
||||
, bi::cache_last<true>
|
||||
, bi::size_type<typename boost::container::container_detail::make_unsigned<difference_type>::type>
|
||||
, bi::size_type<typename boost::container::dtl::make_unsigned<difference_type>::type>
|
||||
> slist_impl_t;
|
||||
slist_impl_t slist_impl_;
|
||||
|
||||
|
@ -182,7 +182,7 @@ class basic_multiallocation_chain
|
|||
template<class T>
|
||||
struct cast_functor
|
||||
{
|
||||
typedef typename container_detail::add_reference<T>::type result_type;
|
||||
typedef typename dtl::add_reference<T>::type result_type;
|
||||
template<class U>
|
||||
result_type operator()(U &ptr) const
|
||||
{ return *static_cast<T*>(static_cast<void*>(&ptr)); }
|
||||
|
@ -211,7 +211,7 @@ class transform_multiallocation_chain
|
|||
public:
|
||||
typedef transform_iterator
|
||||
< typename MultiallocationChain::iterator
|
||||
, container_detail::cast_functor <T> > iterator;
|
||||
, dtl::cast_functor <T> > iterator;
|
||||
typedef typename MultiallocationChain::size_type size_type;
|
||||
|
||||
transform_multiallocation_chain()
|
||||
|
@ -289,7 +289,7 @@ class transform_multiallocation_chain
|
|||
|
||||
}}}
|
||||
|
||||
// namespace container_detail {
|
||||
// namespace dtl {
|
||||
// namespace container {
|
||||
// namespace boost {
|
||||
|
||||
|
|
|
@ -23,52 +23,54 @@
|
|||
// container/detail
|
||||
#include <boost/container/detail/min_max.hpp>
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
enum NextCapacityOption { NextCapacityDouble, NextCapacity60Percent };
|
||||
|
||||
template<class SizeType, NextCapacityOption Option>
|
||||
struct next_capacity_calculator;
|
||||
|
||||
template<class SizeType>
|
||||
struct next_capacity_calculator<SizeType, NextCapacityDouble>
|
||||
template<unsigned Minimum, unsigned Numerator, unsigned Denominator>
|
||||
struct grow_factor_ratio
|
||||
{
|
||||
static SizeType get(const SizeType max_size
|
||||
,const SizeType capacity
|
||||
,const SizeType n)
|
||||
BOOST_STATIC_ASSERT(Numerator > Denominator);
|
||||
BOOST_STATIC_ASSERT(Numerator < 100);
|
||||
BOOST_STATIC_ASSERT(Denominator < 100);
|
||||
BOOST_STATIC_ASSERT(Denominator == 1 || (0 != Numerator % Denominator));
|
||||
|
||||
template<class SizeType>
|
||||
SizeType operator()(const SizeType cur_cap, const SizeType add_min_cap, const SizeType max_cap) const
|
||||
{
|
||||
const SizeType remaining = max_size - capacity;
|
||||
if ( remaining < n )
|
||||
boost::container::throw_length_error("get_next_capacity, allocator's max_size reached");
|
||||
const SizeType additional = max_value(n, capacity);
|
||||
return ( remaining < additional ) ? max_size : ( capacity + additional );
|
||||
const SizeType overflow_limit = ((SizeType)-1) / Numerator;
|
||||
|
||||
SizeType new_cap = 0;
|
||||
|
||||
if(cur_cap <= overflow_limit){
|
||||
new_cap = cur_cap * Numerator / Denominator;
|
||||
}
|
||||
else if(Denominator == 1 || (SizeType(new_cap = cur_cap) / Denominator) > overflow_limit){
|
||||
new_cap = (SizeType)-1;
|
||||
}
|
||||
else{
|
||||
new_cap *= Numerator;
|
||||
}
|
||||
return max_value(SizeType(Minimum), max_value(cur_cap+add_min_cap, min_value(max_cap, new_cap)));
|
||||
}
|
||||
};
|
||||
|
||||
template<class SizeType>
|
||||
struct next_capacity_calculator<SizeType, NextCapacity60Percent>
|
||||
{
|
||||
static SizeType get(const SizeType max_size
|
||||
,const SizeType capacity
|
||||
,const SizeType n)
|
||||
{
|
||||
const SizeType remaining = max_size - capacity;
|
||||
if ( remaining < n )
|
||||
boost::container::throw_length_error("get_next_capacity, allocator's max_size reached");
|
||||
const SizeType m3 = max_size/3;
|
||||
} //namespace dtl {
|
||||
|
||||
if (capacity < m3)
|
||||
return capacity + max_value(3*(capacity+1)/5, n);
|
||||
struct growth_factor_50
|
||||
: dtl::grow_factor_ratio<0, 3, 2>
|
||||
{};
|
||||
|
||||
if (capacity < m3*2)
|
||||
return capacity + max_value((capacity+1)/2, n);
|
||||
return max_size;
|
||||
}
|
||||
};
|
||||
struct growth_factor_60
|
||||
: dtl::grow_factor_ratio<0, 8, 5>
|
||||
{};
|
||||
|
||||
struct growth_factor_100
|
||||
: dtl::grow_factor_ratio<0, 2, 1>
|
||||
{};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(value_compare)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(predicate_type)
|
||||
|
@ -61,14 +61,14 @@ struct node_alloc_holder
|
|||
//If the intrusive container is an associative container, obtain the predicate, which will
|
||||
//be of type node_compare<>. If not an associative container value_compare will be a "nat" type.
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
|
||||
( boost::container::container_detail::
|
||||
, ICont, value_compare, container_detail::nat) intrusive_value_compare;
|
||||
( boost::container::dtl::
|
||||
, ICont, value_compare, dtl::nat) intrusive_value_compare;
|
||||
//In that case obtain the value predicate from the node predicate via predicate_type
|
||||
//if intrusive_value_compare is node_compare<>, nat otherwise
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
|
||||
( boost::container::container_detail::
|
||||
( boost::container::dtl::
|
||||
, intrusive_value_compare
|
||||
, predicate_type, container_detail::nat) value_compare;
|
||||
, predicate_type, dtl::nat) value_compare;
|
||||
|
||||
typedef allocator_traits<Allocator> allocator_traits_type;
|
||||
typedef typename allocator_traits_type::value_type value_type;
|
||||
|
@ -77,14 +77,14 @@ struct node_alloc_holder
|
|||
typedef typename allocator_traits_type::template
|
||||
portable_rebind_alloc<Node>::type NodeAlloc;
|
||||
typedef allocator_traits<NodeAlloc> node_allocator_traits_type;
|
||||
typedef container_detail::allocator_version_traits<NodeAlloc> node_allocator_version_traits_type;
|
||||
typedef dtl::allocator_version_traits<NodeAlloc> node_allocator_version_traits_type;
|
||||
typedef Allocator ValAlloc;
|
||||
typedef typename node_allocator_traits_type::pointer NodePtr;
|
||||
typedef container_detail::scoped_deallocator<NodeAlloc> Deallocator;
|
||||
typedef dtl::scoped_deallocator<NodeAlloc> Deallocator;
|
||||
typedef typename node_allocator_traits_type::size_type size_type;
|
||||
typedef typename node_allocator_traits_type::difference_type difference_type;
|
||||
typedef container_detail::integral_constant<unsigned,
|
||||
boost::container::container_detail::
|
||||
typedef dtl::integral_constant<unsigned,
|
||||
boost::container::dtl::
|
||||
version<NodeAlloc>::value> alloc_version;
|
||||
typedef typename ICont::iterator icont_iterator;
|
||||
typedef typename ICont::const_iterator icont_citerator;
|
||||
|
@ -134,15 +134,15 @@ struct node_alloc_holder
|
|||
|
||||
void copy_assign_alloc(const node_alloc_holder &x)
|
||||
{
|
||||
container_detail::bool_<allocator_traits_type::propagate_on_container_copy_assignment::value> flag;
|
||||
container_detail::assign_alloc( static_cast<NodeAlloc &>(this->members_)
|
||||
dtl::bool_<allocator_traits_type::propagate_on_container_copy_assignment::value> flag;
|
||||
dtl::assign_alloc( static_cast<NodeAlloc &>(this->members_)
|
||||
, static_cast<const NodeAlloc &>(x.members_), flag);
|
||||
}
|
||||
|
||||
void move_assign_alloc( node_alloc_holder &x)
|
||||
{
|
||||
container_detail::bool_<allocator_traits_type::propagate_on_container_move_assignment::value> flag;
|
||||
container_detail::move_alloc( static_cast<NodeAlloc &>(this->members_)
|
||||
dtl::bool_<allocator_traits_type::propagate_on_container_move_assignment::value> flag;
|
||||
dtl::move_alloc( static_cast<NodeAlloc &>(this->members_)
|
||||
, static_cast<NodeAlloc &>(x.members_), flag);
|
||||
}
|
||||
|
||||
|
@ -167,7 +167,7 @@ struct node_alloc_holder
|
|||
Deallocator node_deallocator(p, this->node_alloc());
|
||||
allocator_traits<NodeAlloc>::construct
|
||||
( this->node_alloc()
|
||||
, container_detail::addressof(p->m_data), boost::forward<Args>(args)...);
|
||||
, dtl::addressof(p->m_data), boost::forward<Args>(args)...);
|
||||
node_deallocator.release();
|
||||
//This does not throw
|
||||
typedef typename Node::hook_type hook_type;
|
||||
|
@ -185,7 +185,7 @@ struct node_alloc_holder
|
|||
Deallocator node_deallocator(p, this->node_alloc());\
|
||||
allocator_traits<NodeAlloc>::construct\
|
||||
( this->node_alloc()\
|
||||
, container_detail::addressof(p->m_data)\
|
||||
, dtl::addressof(p->m_data)\
|
||||
BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
|
||||
node_deallocator.release();\
|
||||
typedef typename Node::hook_type hook_type;\
|
||||
|
@ -203,7 +203,7 @@ struct node_alloc_holder
|
|||
{
|
||||
NodePtr p = this->allocate_one();
|
||||
Deallocator node_deallocator(p, this->node_alloc());
|
||||
::boost::container::construct_in_place(this->node_alloc(), container_detail::addressof(p->m_data), it);
|
||||
::boost::container::construct_in_place(this->node_alloc(), dtl::addressof(p->m_data), it);
|
||||
node_deallocator.release();
|
||||
//This does not throw
|
||||
typedef typename Node::hook_type hook_type;
|
||||
|
@ -218,12 +218,12 @@ struct node_alloc_holder
|
|||
NodeAlloc &na = this->node_alloc();
|
||||
Deallocator node_deallocator(p, this->node_alloc());
|
||||
node_allocator_traits_type::construct
|
||||
(na, container_detail::addressof(p->m_data.first), boost::forward<KeyConvertible>(key));
|
||||
(na, dtl::addressof(p->m_data.first), boost::forward<KeyConvertible>(key));
|
||||
BOOST_TRY{
|
||||
node_allocator_traits_type::construct(na, container_detail::addressof(p->m_data.second));
|
||||
node_allocator_traits_type::construct(na, dtl::addressof(p->m_data.second));
|
||||
}
|
||||
BOOST_CATCH(...){
|
||||
node_allocator_traits_type::destroy(na, container_detail::addressof(p->m_data.first));
|
||||
node_allocator_traits_type::destroy(na, dtl::addressof(p->m_data.first));
|
||||
BOOST_RETHROW;
|
||||
}
|
||||
BOOST_CATCH_END
|
||||
|
@ -243,8 +243,8 @@ struct node_alloc_holder
|
|||
void swap(node_alloc_holder &x)
|
||||
{
|
||||
this->icont().swap(x.icont());
|
||||
container_detail::bool_<allocator_traits_type::propagate_on_container_swap::value> flag;
|
||||
container_detail::swap_alloc(this->node_alloc(), x.node_alloc(), flag);
|
||||
dtl::bool_<allocator_traits_type::propagate_on_container_swap::value> flag;
|
||||
dtl::swap_alloc(this->node_alloc(), x.node_alloc(), flag);
|
||||
}
|
||||
|
||||
template<class FwdIterator, class Inserter>
|
||||
|
@ -264,13 +264,13 @@ struct node_alloc_holder
|
|||
Node *p = 0;
|
||||
BOOST_TRY{
|
||||
Deallocator node_deallocator(NodePtr(), nalloc);
|
||||
container_detail::scoped_destructor<NodeAlloc> sdestructor(nalloc, 0);
|
||||
dtl::scoped_destructor<NodeAlloc> sdestructor(nalloc, 0);
|
||||
while(n--){
|
||||
p = boost::movelib::iterator_to_raw_pointer(itbeg);
|
||||
node_deallocator.set(p);
|
||||
++itbeg;
|
||||
//This can throw
|
||||
boost::container::construct_in_place(nalloc, container_detail::addressof(p->m_data), beg);
|
||||
boost::container::construct_in_place(nalloc, dtl::addressof(p->m_data), beg);
|
||||
sdestructor.set(p);
|
||||
++beg;
|
||||
//This does not throw
|
||||
|
@ -410,7 +410,7 @@ struct node_alloc_holder
|
|||
{ return this->members_.m_icont; }
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ struct is_boost_tuple< boost::tuples::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8,
|
|||
|
||||
template<class Tuple>
|
||||
struct disable_if_boost_tuple
|
||||
: boost::container::container_detail::disable_if< is_boost_tuple<Tuple> >
|
||||
: boost::container::dtl::disable_if< is_boost_tuple<Tuple> >
|
||||
{};
|
||||
|
||||
template<class T>
|
||||
|
@ -133,7 +133,7 @@ static piecewise_construct_t piecewise_construct = BOOST_CONTAINER_DOC1ST(unspec
|
|||
|
||||
///@cond
|
||||
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
struct piecewise_construct_use
|
||||
{
|
||||
|
@ -283,7 +283,7 @@ struct pair
|
|||
pair( piecewise_construct_t\
|
||||
, BoostTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,N),::boost::tuples::null_type)> p\
|
||||
, BoostTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,M),::boost::tuples::null_type)> q\
|
||||
, typename container_detail::enable_if_c\
|
||||
, typename dtl::enable_if_c\
|
||||
< pair_impl::is_boost_tuple< BoostTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,N),::boost::tuples::null_type)> >::value &&\
|
||||
!(pair_impl::is_tuple_null<BOOST_MOVE_LAST_TARG##N>::value || pair_impl::is_tuple_null<BOOST_MOVE_LAST_TARGQ##M>::value) \
|
||||
>::type* = 0\
|
||||
|
@ -381,10 +381,10 @@ struct pair
|
|||
}
|
||||
|
||||
template <class D, class S>
|
||||
typename ::boost::container::container_detail::disable_if_or
|
||||
typename ::boost::container::dtl::disable_if_or
|
||||
< pair &
|
||||
, ::boost::container::container_detail::is_same<T1, D>
|
||||
, ::boost::container::container_detail::is_same<T2, S>
|
||||
, ::boost::container::dtl::is_same<T1, D>
|
||||
, ::boost::container::dtl::is_same<T2, S>
|
||||
>::type
|
||||
operator=(const pair<D, S>&p)
|
||||
{
|
||||
|
@ -394,10 +394,10 @@ struct pair
|
|||
}
|
||||
|
||||
template <class D, class S>
|
||||
typename ::boost::container::container_detail::disable_if_or
|
||||
typename ::boost::container::dtl::disable_if_or
|
||||
< pair &
|
||||
, ::boost::container::container_detail::is_same<T1, D>
|
||||
, ::boost::container::container_detail::is_same<T2, S>
|
||||
, ::boost::container::dtl::is_same<T1, D>
|
||||
, ::boost::container::dtl::is_same<T2, S>
|
||||
>::type
|
||||
operator=(BOOST_RV_REF_BEG pair<D, S> BOOST_RV_REF_END p)
|
||||
{
|
||||
|
@ -478,13 +478,13 @@ template <class T1, class T2>
|
|||
inline void swap(pair<T1, T2>& x, pair<T1, T2>& y)
|
||||
{ x.swap(y); }
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
|
||||
#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
template<class T1, class T2>
|
||||
struct has_move_emulation_enabled< ::boost::container::container_detail::pair<T1, T2> >
|
||||
struct has_move_emulation_enabled< ::boost::container::dtl::pair<T1, T2> >
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
@ -497,7 +497,7 @@ template<class T>
|
|||
struct is_class_or_union;
|
||||
|
||||
template <class T1, class T2>
|
||||
struct is_class_or_union< ::boost::container::container_detail::pair<T1, T2> >
|
||||
struct is_class_or_union< ::boost::container::dtl::pair<T1, T2> >
|
||||
//This specialization is needed to avoid instantiation of pair in
|
||||
//is_class, and allow recursive maps.
|
||||
{
|
||||
|
@ -516,7 +516,7 @@ template<class T>
|
|||
struct is_union;
|
||||
|
||||
template <class T1, class T2>
|
||||
struct is_union< ::boost::container::container_detail::pair<T1, T2> >
|
||||
struct is_union< ::boost::container::dtl::pair<T1, T2> >
|
||||
//This specialization is needed to avoid instantiation of pair in
|
||||
//is_class, and allow recursive maps.
|
||||
{
|
||||
|
@ -535,7 +535,7 @@ template<class T>
|
|||
struct is_class;
|
||||
|
||||
template <class T1, class T2>
|
||||
struct is_class< ::boost::container::container_detail::pair<T1, T2> >
|
||||
struct is_class< ::boost::container::dtl::pair<T1, T2> >
|
||||
//This specialization is needed to avoid instantiation of pair in
|
||||
//is_class, and allow recursive maps.
|
||||
{
|
||||
|
@ -550,6 +550,61 @@ struct is_class< std::pair<T1, T2> >
|
|||
static const bool value = true;
|
||||
};
|
||||
|
||||
|
||||
//Triviality of pair
|
||||
template<class T>
|
||||
struct is_trivially_copy_constructible;
|
||||
|
||||
template<class A, class B>
|
||||
struct is_trivially_copy_assignable
|
||||
<boost::container::dtl::pair<A,B> >
|
||||
{
|
||||
static const bool value = boost::move_detail::is_trivially_copy_assignable<A>::value &&
|
||||
boost::move_detail::is_trivially_copy_assignable<B>::value ;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct is_trivially_move_constructible;
|
||||
|
||||
template<class A, class B>
|
||||
struct is_trivially_move_assignable
|
||||
<boost::container::dtl::pair<A,B> >
|
||||
{
|
||||
static const bool value = boost::move_detail::is_trivially_move_assignable<A>::value &&
|
||||
boost::move_detail::is_trivially_move_assignable<B>::value ;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct is_trivially_copy_assignable;
|
||||
|
||||
template<class A, class B>
|
||||
struct is_trivially_copy_constructible<boost::container::dtl::pair<A,B> >
|
||||
{
|
||||
static const bool value = boost::move_detail::is_trivially_copy_constructible<A>::value &&
|
||||
boost::move_detail::is_trivially_copy_constructible<B>::value ;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct is_trivially_move_assignable;
|
||||
|
||||
template<class A, class B>
|
||||
struct is_trivially_move_constructible<boost::container::dtl::pair<A,B> >
|
||||
{
|
||||
static const bool value = boost::move_detail::is_trivially_move_constructible<A>::value &&
|
||||
boost::move_detail::is_trivially_move_constructible<B>::value ;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct is_trivially_destructible;
|
||||
|
||||
template<class A, class B>
|
||||
struct is_trivially_destructible<boost::container::dtl::pair<A,B> >
|
||||
{
|
||||
static const bool value = boost::move_detail::is_trivially_destructible<A>::value &&
|
||||
boost::move_detail::is_trivially_destructible<B>::value ;
|
||||
};
|
||||
|
||||
|
||||
} //namespace move_detail{
|
||||
|
||||
} //namespace boost {
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-2015. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef BOOST_CONTAINER_DETAIL_TO_RAW_POINTER_HPP
|
||||
#define BOOST_CONTAINER_DETAIL_TO_RAW_POINTER_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/intrusive/detail/to_raw_pointer.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
|
||||
using ::boost::intrusive::detail::to_raw_pointer;
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_DETAIL_TO_RAW_POINTER_HPP
|
|
@ -63,7 +63,7 @@ class transform_iterator
|
|||
: public UnaryFunction
|
||||
, public boost::container::iterator
|
||||
< typename Iterator::iterator_category
|
||||
, typename container_detail::remove_reference<typename UnaryFunction::result_type>::type
|
||||
, typename dtl::remove_reference<typename UnaryFunction::result_type>::type
|
||||
, typename Iterator::difference_type
|
||||
, operator_arrow_proxy<typename UnaryFunction::result_type>
|
||||
, typename UnaryFunction::result_type>
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
using boost::intrusive::tree_value_compare;
|
||||
|
||||
|
@ -71,38 +71,38 @@ struct intrusive_tree_hook;
|
|||
template<class VoidPointer, bool OptimizeSize>
|
||||
struct intrusive_tree_hook<VoidPointer, boost::container::red_black_tree, OptimizeSize>
|
||||
{
|
||||
typedef typename container_detail::bi::make_set_base_hook
|
||||
< container_detail::bi::void_pointer<VoidPointer>
|
||||
, container_detail::bi::link_mode<container_detail::bi::normal_link>
|
||||
, container_detail::bi::optimize_size<OptimizeSize>
|
||||
typedef typename dtl::bi::make_set_base_hook
|
||||
< dtl::bi::void_pointer<VoidPointer>
|
||||
, dtl::bi::link_mode<dtl::bi::normal_link>
|
||||
, dtl::bi::optimize_size<OptimizeSize>
|
||||
>::type type;
|
||||
};
|
||||
|
||||
template<class VoidPointer, bool OptimizeSize>
|
||||
struct intrusive_tree_hook<VoidPointer, boost::container::avl_tree, OptimizeSize>
|
||||
{
|
||||
typedef typename container_detail::bi::make_avl_set_base_hook
|
||||
< container_detail::bi::void_pointer<VoidPointer>
|
||||
, container_detail::bi::link_mode<container_detail::bi::normal_link>
|
||||
, container_detail::bi::optimize_size<OptimizeSize>
|
||||
typedef typename dtl::bi::make_avl_set_base_hook
|
||||
< dtl::bi::void_pointer<VoidPointer>
|
||||
, dtl::bi::link_mode<dtl::bi::normal_link>
|
||||
, dtl::bi::optimize_size<OptimizeSize>
|
||||
>::type type;
|
||||
};
|
||||
|
||||
template<class VoidPointer, bool OptimizeSize>
|
||||
struct intrusive_tree_hook<VoidPointer, boost::container::scapegoat_tree, OptimizeSize>
|
||||
{
|
||||
typedef typename container_detail::bi::make_bs_set_base_hook
|
||||
< container_detail::bi::void_pointer<VoidPointer>
|
||||
, container_detail::bi::link_mode<container_detail::bi::normal_link>
|
||||
typedef typename dtl::bi::make_bs_set_base_hook
|
||||
< dtl::bi::void_pointer<VoidPointer>
|
||||
, dtl::bi::link_mode<dtl::bi::normal_link>
|
||||
>::type type;
|
||||
};
|
||||
|
||||
template<class VoidPointer, bool OptimizeSize>
|
||||
struct intrusive_tree_hook<VoidPointer, boost::container::splay_tree, OptimizeSize>
|
||||
{
|
||||
typedef typename container_detail::bi::make_bs_set_base_hook
|
||||
< container_detail::bi::void_pointer<VoidPointer>
|
||||
, container_detail::bi::link_mode<container_detail::bi::normal_link>
|
||||
typedef typename dtl::bi::make_bs_set_base_hook
|
||||
< dtl::bi::void_pointer<VoidPointer>
|
||||
, dtl::bi::link_mode<dtl::bi::normal_link>
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
@ -222,9 +222,9 @@ class push_back_functor
|
|||
{ this->icont_.push_back(n); }
|
||||
};
|
||||
|
||||
}//namespace container_detail {
|
||||
}//namespace dtl {
|
||||
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template< class NodeType, class NodeCompareType
|
||||
, class SizeType, class HookType
|
||||
|
@ -235,12 +235,12 @@ template<class NodeType, class NodeCompareType, class SizeType, class HookType>
|
|||
struct intrusive_tree_dispatch
|
||||
<NodeType, NodeCompareType, SizeType, HookType, boost::container::red_black_tree>
|
||||
{
|
||||
typedef typename container_detail::bi::make_rbtree
|
||||
typedef typename dtl::bi::make_rbtree
|
||||
<NodeType
|
||||
,container_detail::bi::compare<NodeCompareType>
|
||||
,container_detail::bi::base_hook<HookType>
|
||||
,container_detail::bi::constant_time_size<true>
|
||||
,container_detail::bi::size_type<SizeType>
|
||||
,dtl::bi::compare<NodeCompareType>
|
||||
,dtl::bi::base_hook<HookType>
|
||||
,dtl::bi::constant_time_size<true>
|
||||
,dtl::bi::size_type<SizeType>
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
@ -248,12 +248,12 @@ template<class NodeType, class NodeCompareType, class SizeType, class HookType>
|
|||
struct intrusive_tree_dispatch
|
||||
<NodeType, NodeCompareType, SizeType, HookType, boost::container::avl_tree>
|
||||
{
|
||||
typedef typename container_detail::bi::make_avltree
|
||||
typedef typename dtl::bi::make_avltree
|
||||
<NodeType
|
||||
,container_detail::bi::compare<NodeCompareType>
|
||||
,container_detail::bi::base_hook<HookType>
|
||||
,container_detail::bi::constant_time_size<true>
|
||||
,container_detail::bi::size_type<SizeType>
|
||||
,dtl::bi::compare<NodeCompareType>
|
||||
,dtl::bi::base_hook<HookType>
|
||||
,dtl::bi::constant_time_size<true>
|
||||
,dtl::bi::size_type<SizeType>
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
@ -261,12 +261,12 @@ template<class NodeType, class NodeCompareType, class SizeType, class HookType>
|
|||
struct intrusive_tree_dispatch
|
||||
<NodeType, NodeCompareType, SizeType, HookType, boost::container::scapegoat_tree>
|
||||
{
|
||||
typedef typename container_detail::bi::make_sgtree
|
||||
typedef typename dtl::bi::make_sgtree
|
||||
<NodeType
|
||||
,container_detail::bi::compare<NodeCompareType>
|
||||
,container_detail::bi::base_hook<HookType>
|
||||
,container_detail::bi::floating_point<true>
|
||||
,container_detail::bi::size_type<SizeType>
|
||||
,dtl::bi::compare<NodeCompareType>
|
||||
,dtl::bi::base_hook<HookType>
|
||||
,dtl::bi::floating_point<true>
|
||||
,dtl::bi::size_type<SizeType>
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
@ -274,12 +274,12 @@ template<class NodeType, class NodeCompareType, class SizeType, class HookType>
|
|||
struct intrusive_tree_dispatch
|
||||
<NodeType, NodeCompareType, SizeType, HookType, boost::container::splay_tree>
|
||||
{
|
||||
typedef typename container_detail::bi::make_splaytree
|
||||
typedef typename dtl::bi::make_splaytree
|
||||
<NodeType
|
||||
,container_detail::bi::compare<NodeCompareType>
|
||||
,container_detail::bi::base_hook<HookType>
|
||||
,container_detail::bi::constant_time_size<true>
|
||||
,container_detail::bi::size_type<SizeType>
|
||||
,dtl::bi::compare<NodeCompareType>
|
||||
,dtl::bi::base_hook<HookType>
|
||||
,dtl::bi::constant_time_size<true>
|
||||
,dtl::bi::size_type<SizeType>
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
@ -293,7 +293,7 @@ struct intrusive_tree_type
|
|||
allocator_traits<Allocator>::void_pointer void_pointer;
|
||||
typedef typename boost::container::
|
||||
allocator_traits<Allocator>::size_type size_type;
|
||||
typedef typename container_detail::tree_node
|
||||
typedef typename dtl::tree_node
|
||||
< value_type, void_pointer
|
||||
, tree_type_value, OptimizeSize> node_t;
|
||||
typedef value_to_node_compare
|
||||
|
@ -340,9 +340,9 @@ struct intrusive_tree_proxy<tree_type_value, true>
|
|||
{ c.rebalance(); }
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
//This functor will be used with Intrusive clone functions to obtain
|
||||
//already allocated nodes from a intrusive container instead of
|
||||
|
@ -394,6 +394,7 @@ class RecyclingCloner
|
|||
intrusive_container &m_icont;
|
||||
};
|
||||
|
||||
|
||||
template<class KeyCompare, class KeyOfValue>
|
||||
struct key_node_compare
|
||||
: public boost::intrusive::detail::ebo_functor_holder<KeyCompare>
|
||||
|
@ -407,6 +408,21 @@ struct key_node_compare
|
|||
typedef KeyOfValue key_of_value;
|
||||
typedef typename KeyOfValue::type key_type;
|
||||
|
||||
|
||||
template <class T, class VoidPointer, boost::container::tree_type_enum tree_type_value, bool OptimizeSize>
|
||||
BOOST_CONTAINER_FORCEINLINE static const key_type &
|
||||
key_from(const tree_node<T, VoidPointer, tree_type_value, OptimizeSize> &n)
|
||||
{
|
||||
return key_of_value()(n.get_data());
|
||||
}
|
||||
|
||||
template <class T>
|
||||
BOOST_CONTAINER_FORCEINLINE static const T &
|
||||
key_from(const T &t)
|
||||
{
|
||||
return t;
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const key_compare &key_comp() const
|
||||
{ return static_cast<const key_compare &>(*this); }
|
||||
|
||||
|
@ -418,36 +434,51 @@ struct key_node_compare
|
|||
|
||||
template<class U>
|
||||
BOOST_CONTAINER_FORCEINLINE bool operator()(const key_type &key1, const U &nonkey2) const
|
||||
{ return this->key_comp()(key1, key_of_value()(nonkey2.get_data())); }
|
||||
{ return this->key_comp()(key1, this->key_from(nonkey2)); }
|
||||
|
||||
template<class U>
|
||||
BOOST_CONTAINER_FORCEINLINE bool operator()(const U &nonkey1, const key_type &key2) const
|
||||
{ return this->key_comp()(key_of_value()(nonkey1.get_data()), key2); }
|
||||
{ return this->key_comp()(this->key_from(nonkey1), key2); }
|
||||
|
||||
template<class U, class V>
|
||||
BOOST_CONTAINER_FORCEINLINE bool operator()(const U &nonkey1, const V &nonkey2) const
|
||||
{ return this->key_comp()(key_of_value()(nonkey1.get_data()), key_of_value()(nonkey2.get_data())); }
|
||||
{ return this->key_comp()(this->key_from(nonkey1), this->key_from(nonkey2)); }
|
||||
};
|
||||
|
||||
template <class T, class KeyOfValue,
|
||||
class Compare, class Allocator,
|
||||
class Options = tree_assoc_defaults>
|
||||
template<class Options>
|
||||
struct get_tree_opt
|
||||
{
|
||||
typedef Options type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct get_tree_opt<void>
|
||||
{
|
||||
typedef tree_assoc_defaults type;
|
||||
};
|
||||
|
||||
template <class T, class KeyOfValue, class Compare, class Allocator, class Options>
|
||||
class tree
|
||||
: public container_detail::node_alloc_holder
|
||||
: public dtl::node_alloc_holder
|
||||
< Allocator
|
||||
, typename container_detail::intrusive_tree_type
|
||||
, typename dtl::intrusive_tree_type
|
||||
< Allocator, tree_value_compare
|
||||
<typename allocator_traits<Allocator>::pointer, Compare, KeyOfValue>
|
||||
, Options::tree_type, Options::optimize_size>::type
|
||||
, get_tree_opt<Options>::type::tree_type
|
||||
, get_tree_opt<Options>::type::optimize_size
|
||||
>::type
|
||||
>
|
||||
{
|
||||
typedef tree_value_compare
|
||||
< typename allocator_traits<Allocator>::pointer
|
||||
, Compare, KeyOfValue> ValComp;
|
||||
typedef typename container_detail::intrusive_tree_type
|
||||
< Allocator, ValComp, Options::tree_type
|
||||
, Options::optimize_size>::type Icont;
|
||||
typedef container_detail::node_alloc_holder
|
||||
typedef typename get_tree_opt<Options>::type options_type;
|
||||
typedef typename dtl::intrusive_tree_type
|
||||
< Allocator, ValComp
|
||||
, options_type::tree_type
|
||||
, options_type::optimize_size
|
||||
>::type Icont;
|
||||
typedef dtl::node_alloc_holder
|
||||
<Allocator, Icont> AllocHolder;
|
||||
typedef typename AllocHolder::NodePtr NodePtr;
|
||||
typedef tree < T, KeyOfValue
|
||||
|
@ -459,9 +490,9 @@ class tree
|
|||
typedef typename AllocHolder::Node Node;
|
||||
typedef typename Icont::iterator iiterator;
|
||||
typedef typename Icont::const_iterator iconst_iterator;
|
||||
typedef container_detail::allocator_destroyer<NodeAlloc> Destroyer;
|
||||
typedef dtl::allocator_destroyer<NodeAlloc> Destroyer;
|
||||
typedef typename AllocHolder::alloc_version alloc_version;
|
||||
typedef intrusive_tree_proxy<Options::tree_type> intrusive_tree_proxy_t;
|
||||
typedef intrusive_tree_proxy<options_type::tree_type> intrusive_tree_proxy_t;
|
||||
|
||||
BOOST_COPYABLE_AND_MOVABLE(tree)
|
||||
|
||||
|
@ -484,9 +515,9 @@ class tree
|
|||
allocator_traits<Allocator>::size_type size_type;
|
||||
typedef typename boost::container::
|
||||
allocator_traits<Allocator>::difference_type difference_type;
|
||||
typedef container_detail::iterator_from_iiterator
|
||||
typedef dtl::iterator_from_iiterator
|
||||
<iiterator, false> iterator;
|
||||
typedef container_detail::iterator_from_iiterator
|
||||
typedef dtl::iterator_from_iiterator
|
||||
<iiterator, true > const_iterator;
|
||||
typedef boost::container::reverse_iterator
|
||||
<iterator> reverse_iterator;
|
||||
|
@ -590,10 +621,10 @@ class tree
|
|||
template <class InputIterator>
|
||||
void tree_construct_non_unique(InputIterator first, InputIterator last
|
||||
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
, typename container_detail::enable_if_or
|
||||
, typename dtl::enable_if_or
|
||||
< void
|
||||
, container_detail::is_same<alloc_version, version_1>
|
||||
, container_detail::is_input_iterator<InputIterator>
|
||||
, dtl::is_same<alloc_version, version_1>
|
||||
, dtl::is_input_iterator<InputIterator>
|
||||
>::type * = 0
|
||||
#endif
|
||||
)
|
||||
|
@ -610,10 +641,10 @@ class tree
|
|||
template <class InputIterator>
|
||||
void tree_construct_non_unique(InputIterator first, InputIterator last
|
||||
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
, typename container_detail::disable_if_or
|
||||
, typename dtl::disable_if_or
|
||||
< void
|
||||
, container_detail::is_same<alloc_version, version_1>
|
||||
, container_detail::is_input_iterator<InputIterator>
|
||||
, dtl::is_same<alloc_version, version_1>
|
||||
, dtl::is_input_iterator<InputIterator>
|
||||
>::type * = 0
|
||||
#endif
|
||||
)
|
||||
|
@ -627,10 +658,10 @@ class tree
|
|||
template <class InputIterator>
|
||||
void tree_construct( ordered_range_t, InputIterator first, InputIterator last
|
||||
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
, typename container_detail::disable_if_or
|
||||
, typename dtl::disable_if_or
|
||||
< void
|
||||
, container_detail::is_same<alloc_version, version_1>
|
||||
, container_detail::is_input_iterator<InputIterator>
|
||||
, dtl::is_same<alloc_version, version_1>
|
||||
, dtl::is_input_iterator<InputIterator>
|
||||
>::type * = 0
|
||||
#endif
|
||||
)
|
||||
|
@ -638,17 +669,17 @@ class tree
|
|||
//Optimized allocation and construction
|
||||
this->allocate_many_and_construct
|
||||
( first, boost::container::iterator_distance(first, last)
|
||||
, container_detail::push_back_functor<Node, Icont>(this->icont()));
|
||||
, dtl::push_back_functor<Node, Icont>(this->icont()));
|
||||
//AllocHolder clears in case of exception
|
||||
}
|
||||
|
||||
template <class InputIterator>
|
||||
void tree_construct( ordered_range_t, InputIterator first, InputIterator last
|
||||
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
, typename container_detail::enable_if_or
|
||||
, typename dtl::enable_if_or
|
||||
< void
|
||||
, container_detail::is_same<alloc_version, version_1>
|
||||
, container_detail::is_input_iterator<InputIterator>
|
||||
, dtl::is_same<alloc_version, version_1>
|
||||
, dtl::is_input_iterator<InputIterator>
|
||||
>::type * = 0
|
||||
#endif
|
||||
)
|
||||
|
@ -668,7 +699,7 @@ class tree
|
|||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE tree(BOOST_RV_REF(tree) x)
|
||||
BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
|
||||
BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
|
||||
: AllocHolder(BOOST_MOVE_BASE(AllocHolder, x), x.value_comp())
|
||||
{}
|
||||
|
||||
|
@ -701,7 +732,7 @@ class tree
|
|||
if (&x != this){
|
||||
NodeAlloc &this_alloc = this->get_stored_allocator();
|
||||
const NodeAlloc &x_alloc = x.get_stored_allocator();
|
||||
container_detail::bool_<allocator_traits<NodeAlloc>::
|
||||
dtl::bool_<allocator_traits<NodeAlloc>::
|
||||
propagate_on_container_copy_assignment::value> flag;
|
||||
if(flag && this_alloc != x_alloc){
|
||||
this->clear();
|
||||
|
@ -730,7 +761,7 @@ class tree
|
|||
tree& operator=(BOOST_RV_REF(tree) x)
|
||||
BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
|
||||
allocator_traits_type::is_always_equal::value) &&
|
||||
boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
|
||||
boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
|
||||
{
|
||||
BOOST_ASSERT(this != &x);
|
||||
NodeAlloc &this_alloc = this->node_alloc();
|
||||
|
@ -856,7 +887,7 @@ class tree
|
|||
|
||||
BOOST_CONTAINER_FORCEINLINE void swap(ThisType& x)
|
||||
BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||
&& boost::container::container_detail::is_nothrow_swappable<Compare>::value )
|
||||
&& boost::container::dtl::is_nothrow_swappable<Compare>::value )
|
||||
{ AllocHolder::swap(x); }
|
||||
|
||||
public:
|
||||
|
@ -1245,21 +1276,63 @@ class tree
|
|||
BOOST_CONTAINER_FORCEINLINE const_iterator find(const key_type& k) const
|
||||
{ return const_iterator(this->non_const_icont().find(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, iterator>::type
|
||||
find(const K& k)
|
||||
{ return iterator(this->icont().find(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, const_iterator>::type
|
||||
find(const K& k) const
|
||||
{ return const_iterator(this->non_const_icont().find(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& k) const
|
||||
{ return size_type(this->icont().count(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, size_type>::type
|
||||
count(const K& k) const
|
||||
{ return size_type(this->icont().count(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const key_type& k)
|
||||
{ return iterator(this->icont().lower_bound(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const key_type& k) const
|
||||
{ return const_iterator(this->non_const_icont().lower_bound(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, iterator>::type
|
||||
lower_bound(const K& k)
|
||||
{ return iterator(this->icont().lower_bound(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, const_iterator>::type
|
||||
lower_bound(const K& k) const
|
||||
{ return const_iterator(this->non_const_icont().lower_bound(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const key_type& k)
|
||||
{ return iterator(this->icont().upper_bound(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const key_type& k) const
|
||||
{ return const_iterator(this->non_const_icont().upper_bound(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, iterator>::type
|
||||
upper_bound(const K& k)
|
||||
{ return iterator(this->icont().upper_bound(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, const_iterator>::type
|
||||
upper_bound(const K& k) const
|
||||
{ return const_iterator(this->non_const_icont().upper_bound(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
std::pair<iterator,iterator> equal_range(const key_type& k)
|
||||
{
|
||||
std::pair<iiterator, iiterator> ret =
|
||||
|
@ -1275,6 +1348,27 @@ class tree
|
|||
(const_iterator(ret.first), const_iterator(ret.second));
|
||||
}
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, std::pair<iterator,iterator> >::type
|
||||
equal_range(const K& k)
|
||||
{
|
||||
std::pair<iiterator, iiterator> ret =
|
||||
this->icont().equal_range(k, KeyNodeCompare(key_comp()));
|
||||
return std::pair<iterator,iterator>(iterator(ret.first), iterator(ret.second));
|
||||
}
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, std::pair<const_iterator, const_iterator> >::type
|
||||
equal_range(const K& k) const
|
||||
{
|
||||
std::pair<iiterator, iiterator> ret =
|
||||
this->non_const_icont().equal_range(k, KeyNodeCompare(key_comp()));
|
||||
return std::pair<const_iterator,const_iterator>
|
||||
(const_iterator(ret.first), const_iterator(ret.second));
|
||||
}
|
||||
|
||||
std::pair<iterator,iterator> lower_bound_range(const key_type& k)
|
||||
{
|
||||
std::pair<iiterator, iiterator> ret =
|
||||
|
@ -1290,6 +1384,27 @@ class tree
|
|||
(const_iterator(ret.first), const_iterator(ret.second));
|
||||
}
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, std::pair<iterator,iterator> >::type
|
||||
lower_bound_range(const K& k)
|
||||
{
|
||||
std::pair<iiterator, iiterator> ret =
|
||||
this->icont().lower_bound_range(k, KeyNodeCompare(key_comp()));
|
||||
return std::pair<iterator,iterator>(iterator(ret.first), iterator(ret.second));
|
||||
}
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, std::pair<const_iterator, const_iterator> >::type
|
||||
lower_bound_range(const K& k) const
|
||||
{
|
||||
std::pair<iiterator, iiterator> ret =
|
||||
this->non_const_icont().lower_bound_range(k, KeyNodeCompare(key_comp()));
|
||||
return std::pair<const_iterator,const_iterator>
|
||||
(const_iterator(ret.first), const_iterator(ret.second));
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE void rebalance()
|
||||
{ intrusive_tree_proxy_t::rebalance(this->icont()); }
|
||||
|
||||
|
@ -1315,7 +1430,7 @@ class tree
|
|||
{ x.swap(y); }
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
|
||||
template <class T>
|
||||
|
@ -1326,7 +1441,7 @@ struct has_trivial_destructor_after_move;
|
|||
template <class T, class KeyOfValue, class Compare, class Allocator, class Options>
|
||||
struct has_trivial_destructor_after_move
|
||||
<
|
||||
::boost::container::container_detail::tree
|
||||
::boost::container::dtl::tree
|
||||
<T, KeyOfValue, Compare, Allocator, Options>
|
||||
>
|
||||
{
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
using ::boost::move_detail::enable_if;
|
||||
using ::boost::move_detail::enable_if_and;
|
||||
|
@ -63,7 +63,7 @@ using ::boost::move_detail::aligned_storage;
|
|||
using ::boost::move_detail::nat;
|
||||
using ::boost::move_detail::max_align_t;
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
36
boost/container/detail/value_functors.hpp
Normal file
36
boost/container/detail/value_functors.hpp
Normal file
|
@ -0,0 +1,36 @@
|
|||
#ifndef BOOST_CONTAINER_DETAIL_VALUE_FUNCTORS_HPP
|
||||
#define BOOST_CONTAINER_DETAIL_VALUE_FUNCTORS_HPP
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2017-2017. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/container for documentation.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
//Functors for member algorithm defaults
|
||||
template<class ValueType>
|
||||
struct value_less
|
||||
{
|
||||
bool operator()(const ValueType &a, const ValueType &b) const
|
||||
{ return a < b; }
|
||||
};
|
||||
|
||||
template<class ValueType>
|
||||
struct value_equal
|
||||
{
|
||||
bool operator()(const ValueType &a, const ValueType &b) const
|
||||
{ return a == b; }
|
||||
};
|
||||
|
||||
#endif //BOOST_CONTAINER_DETAIL_VALUE_FUNCTORS_HPP
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template<class T>
|
||||
struct value_init
|
||||
|
@ -42,7 +42,7 @@ struct value_init
|
|||
T m_t;
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template<typename... Values>
|
||||
class tuple;
|
||||
|
@ -78,7 +78,7 @@ class tuple<Head, Tail...>
|
|||
|
||||
|
||||
template<typename... Values>
|
||||
tuple<Values&&...> forward_as_tuple(Values&&... values)
|
||||
tuple<Values&&...> forward_as_tuple_impl(Values&&... values)
|
||||
{ return tuple<Values&&...>(::boost::forward<Values>(values)...); }
|
||||
|
||||
template<int I, typename Tuple>
|
||||
|
@ -156,7 +156,7 @@ struct build_number_seq
|
|||
template<> struct build_number_seq<0> : index_tuple<>{};
|
||||
template<> struct build_number_seq<1> : index_tuple<0>{};
|
||||
|
||||
}}} //namespace boost { namespace container { namespace container_detail {
|
||||
}}} //namespace boost { namespace container { namespace dtl {
|
||||
|
||||
#include <boost/container/detail/config_end.hpp>
|
||||
|
||||
|
|
|
@ -32,11 +32,11 @@
|
|||
|
||||
namespace boost{
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template <class T, unsigned V>
|
||||
struct version_type
|
||||
: public container_detail::integral_constant<unsigned, V>
|
||||
: public dtl::integral_constant<unsigned, V>
|
||||
{
|
||||
typedef T type;
|
||||
|
||||
|
@ -46,7 +46,7 @@ struct version_type
|
|||
namespace impl{
|
||||
|
||||
template <class T,
|
||||
bool = container_detail::is_convertible<version_type<T, 0>, typename T::version>::value>
|
||||
bool = dtl::is_convertible<version_type<T, 0>, typename T::version>::value>
|
||||
struct extract_version
|
||||
{
|
||||
static const unsigned value = 1;
|
||||
|
@ -86,7 +86,7 @@ struct version<T, true>
|
|||
|
||||
template <class T>
|
||||
struct version
|
||||
: public container_detail::integral_constant<unsigned, impl::version<T>::value>
|
||||
: public dtl::integral_constant<unsigned, impl::version<T>::value>
|
||||
{};
|
||||
|
||||
template<class T, unsigned N>
|
||||
|
@ -96,11 +96,11 @@ struct is_version
|
|||
is_same< typename version<T>::type, integral_constant<unsigned, N> >::value;
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
|
||||
typedef container_detail::integral_constant<unsigned, 0> version_0;
|
||||
typedef container_detail::integral_constant<unsigned, 1> version_1;
|
||||
typedef container_detail::integral_constant<unsigned, 2> version_2;
|
||||
typedef dtl::integral_constant<unsigned, 0> version_0;
|
||||
typedef dtl::integral_constant<unsigned, 1> version_1;
|
||||
typedef dtl::integral_constant<unsigned, 2> version_2;
|
||||
|
||||
} //namespace container {
|
||||
} //namespace boost{
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -80,13 +80,13 @@ template <class Key, class Compare, class AllocatorOrContainer>
|
|||
#endif
|
||||
class flat_set
|
||||
///@cond
|
||||
: public container_detail::flat_tree<Key, container_detail::identity<Key>, Compare, AllocatorOrContainer>
|
||||
: public dtl::flat_tree<Key, dtl::identity<Key>, Compare, AllocatorOrContainer>
|
||||
///@endcond
|
||||
{
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
private:
|
||||
BOOST_COPYABLE_AND_MOVABLE(flat_set)
|
||||
typedef container_detail::flat_tree<Key, container_detail::identity<Key>, Compare, AllocatorOrContainer> tree_t;
|
||||
typedef dtl::flat_tree<Key, dtl::identity<Key>, Compare, AllocatorOrContainer> tree_t;
|
||||
|
||||
public:
|
||||
tree_t &tree()
|
||||
|
@ -134,8 +134,8 @@ class flat_set
|
|||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
flat_set() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<AllocatorOrContainer>::value &&
|
||||
container_detail::is_nothrow_default_constructible<Compare>::value)
|
||||
flat_set() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<AllocatorOrContainer>::value &&
|
||||
dtl::is_nothrow_default_constructible<Compare>::value)
|
||||
: tree_t()
|
||||
{}
|
||||
|
||||
|
@ -350,7 +350,7 @@ class flat_set
|
|||
//!
|
||||
//! <b>Postcondition</b>: x is emptied.
|
||||
BOOST_CONTAINER_FORCEINLINE flat_set(BOOST_RV_REF(flat_set) x)
|
||||
BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
|
||||
BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
|
||||
: tree_t(BOOST_MOVE_BASE(tree_t, x))
|
||||
{}
|
||||
|
||||
|
@ -384,7 +384,7 @@ class flat_set
|
|||
BOOST_CONTAINER_FORCEINLINE flat_set& operator=(BOOST_RV_REF(flat_set) x)
|
||||
BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
|
||||
allocator_traits_type::is_always_equal::value) &&
|
||||
boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
|
||||
boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
|
||||
{ return static_cast<flat_set&>(this->tree_t::operator=(BOOST_MOVE_BASE(tree_t, x))); }
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
|
@ -687,8 +687,7 @@ class flat_set
|
|||
//! <b>Effects</b>: inserts each element from the range [first,last) if and only
|
||||
//! if there is no element with key equivalent to the key of that element.
|
||||
//!
|
||||
//! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
|
||||
//! search time plus N*size() insertion time.
|
||||
//! <b>Complexity</b>: N log(N).
|
||||
//!
|
||||
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
||||
template <class InputIterator>
|
||||
|
@ -702,8 +701,7 @@ class flat_set
|
|||
//! <b>Effects</b>: inserts each element from the range [first,last) .This function
|
||||
//! is more efficient than the normal range creation for ordered ranges.
|
||||
//!
|
||||
//! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
|
||||
//! search time plus N*size() insertion time.
|
||||
//! <b>Complexity</b>: Linear.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension. If an element is inserted it might invalidate elements.
|
||||
template <class InputIterator>
|
||||
|
@ -714,8 +712,7 @@ class flat_set
|
|||
//! <b>Effects</b>: inserts each element from the range [il.begin(), il.end()) if and only
|
||||
//! if there is no element with key equivalent to the key of that element.
|
||||
//!
|
||||
//! <b>Complexity</b>: At most N log(size()+N) (N is the distance from il.begin() to il.end())
|
||||
//! search time plus N*size() insertion time.
|
||||
//! <b>Complexity</b>: N log(N).
|
||||
//!
|
||||
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
||||
BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
|
||||
|
@ -727,8 +724,7 @@ class flat_set
|
|||
//! <b>Effects</b>: inserts each element from the range [il.begin(), il.end()) .This function
|
||||
//! is more efficient than the normal range creation for ordered ranges.
|
||||
//!
|
||||
//! <b>Complexity</b>: At most N log(size()+N) (N is the distance from il.begin() to il.end())
|
||||
//! search time plus N*size() insertion time.
|
||||
//! <b>Complexity</b>: Linear.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension. If an element is inserted it might invalidate elements.
|
||||
BOOST_CONTAINER_FORCEINLINE void insert(ordered_unique_range_t, std::initializer_list<value_type> il)
|
||||
|
@ -794,7 +790,7 @@ class flat_set
|
|||
//! <b>Complexity</b>: Constant.
|
||||
void swap(flat_set& x)
|
||||
BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||
&& boost::container::container_detail::is_nothrow_swappable<Compare>::value );
|
||||
&& boost::container::dtl::is_nothrow_swappable<Compare>::value );
|
||||
|
||||
//! <b>Effects</b>: erase(a.begin(),a.end()).
|
||||
//!
|
||||
|
@ -827,6 +823,26 @@ class flat_set
|
|||
//! <b>Complexity</b>: Logarithmic.
|
||||
const_iterator find(const key_type& x) const;
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: An iterator pointing to an element with the key
|
||||
//! equivalent to x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
template<typename K>
|
||||
iterator find(const K& x);
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: A const_iterator pointing to an element with the key
|
||||
//! equivalent to x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
template<typename K>
|
||||
const_iterator find(const K& x) const;
|
||||
|
||||
//! <b>Requires</b>: size() >= n.
|
||||
//!
|
||||
//! <b>Effects</b>: Returns an iterator to the nth element
|
||||
|
@ -885,6 +901,16 @@ class flat_set
|
|||
BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const
|
||||
{ return static_cast<size_type>(this->tree_t::find(x) != this->tree_t::cend()); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: The number of elements with key equivalent to x.
|
||||
//!
|
||||
//! <b>Complexity</b>: log(size())+count(k)
|
||||
template<typename K>
|
||||
BOOST_CONTAINER_FORCEINLINE size_type count(const K& x) const
|
||||
{ return static_cast<size_type>(this->tree_t::find(x) != this->tree_t::cend()); }
|
||||
|
||||
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
//! <b>Returns</b>: An iterator pointing to the first element with key not less
|
||||
//! than k, or a.end() if such an element is not found.
|
||||
|
@ -898,6 +924,26 @@ class flat_set
|
|||
//! <b>Complexity</b>: Logarithmic
|
||||
const_iterator lower_bound(const key_type& x) const;
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: An iterator pointing to the first element with key not less
|
||||
//! than k, or a.end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<typename K>
|
||||
iterator lower_bound(const K& x);
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: A const iterator pointing to the first element with key not
|
||||
//! less than k, or a.end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<typename K>
|
||||
const_iterator lower_bound(const K& x) const;
|
||||
|
||||
//! <b>Returns</b>: An iterator pointing to the first element with key not less
|
||||
//! than x, or end() if such an element is not found.
|
||||
//!
|
||||
|
@ -910,6 +956,26 @@ class flat_set
|
|||
//! <b>Complexity</b>: Logarithmic
|
||||
const_iterator upper_bound(const key_type& x) const;
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: An iterator pointing to the first element with key not less
|
||||
//! than x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<typename K>
|
||||
iterator upper_bound(const K& x);
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: A const iterator pointing to the first element with key not
|
||||
//! less than x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<typename K>
|
||||
const_iterator upper_bound(const K& x) const;
|
||||
|
||||
#endif // #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
||||
//! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
|
||||
|
@ -924,6 +990,26 @@ class flat_set
|
|||
BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type& x)
|
||||
{ return this->tree_t::lower_bound_range(x); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<typename K>
|
||||
std::pair<iterator,iterator> equal_range(const K& x)
|
||||
{ return this->tree_t::lower_bound_range(x); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<typename K>
|
||||
std::pair<const_iterator,const_iterator> equal_range(const K& x) const
|
||||
{ return this->tree_t::lower_bound_range(x); }
|
||||
|
||||
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
||||
//! <b>Effects</b>: Returns true if x and y are equal
|
||||
|
@ -1005,6 +1091,42 @@ class flat_set
|
|||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
};
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
|
||||
template <typename InputIterator>
|
||||
flat_set(InputIterator, InputIterator) ->
|
||||
flat_set<typename iterator_traits<InputIterator>::value_type>;
|
||||
|
||||
template <typename InputIterator, typename Allocator>
|
||||
flat_set(InputIterator, InputIterator, Allocator const&) ->
|
||||
flat_set<typename iterator_traits<InputIterator>::value_type, std::less<typename iterator_traits<InputIterator>::value_type>, Allocator>;
|
||||
|
||||
template <typename InputIterator, typename Compare>
|
||||
flat_set(InputIterator, InputIterator, Compare const&) ->
|
||||
flat_set<typename iterator_traits<InputIterator>::value_type, Compare>;
|
||||
|
||||
template <typename InputIterator, typename Compare, typename Allocator>
|
||||
flat_set(InputIterator, InputIterator, Compare const&, Allocator const&) ->
|
||||
flat_set<typename iterator_traits<InputIterator>::value_type, Compare, Allocator>;
|
||||
|
||||
template <typename InputIterator>
|
||||
flat_set(ordered_unique_range_t, InputIterator, InputIterator) ->
|
||||
flat_set<typename iterator_traits<InputIterator>::value_type>;
|
||||
|
||||
template <typename InputIterator, typename Allocator>
|
||||
flat_set(ordered_unique_range_t, InputIterator, InputIterator, Allocator const&) ->
|
||||
flat_set<typename iterator_traits<InputIterator>::value_type, std::less<typename iterator_traits<InputIterator>::value_type>, Allocator>;
|
||||
|
||||
template <typename InputIterator, typename Compare>
|
||||
flat_set(ordered_unique_range_t, InputIterator, InputIterator, Compare const&) ->
|
||||
flat_set<typename iterator_traits<InputIterator>::value_type, Compare>;
|
||||
|
||||
template <typename InputIterator, typename Compare, typename Allocator>
|
||||
flat_set(ordered_unique_range_t, InputIterator, InputIterator, Compare const&, Allocator const&) ->
|
||||
flat_set<typename iterator_traits<InputIterator>::value_type, Compare, Allocator>;
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
} //namespace container {
|
||||
|
@ -1052,13 +1174,13 @@ template <class Key, class Compare, class AllocatorOrContainer>
|
|||
#endif
|
||||
class flat_multiset
|
||||
///@cond
|
||||
: public container_detail::flat_tree<Key, container_detail::identity<Key>, Compare, AllocatorOrContainer>
|
||||
: public dtl::flat_tree<Key, dtl::identity<Key>, Compare, AllocatorOrContainer>
|
||||
///@endcond
|
||||
{
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
private:
|
||||
BOOST_COPYABLE_AND_MOVABLE(flat_multiset)
|
||||
typedef container_detail::flat_tree<Key, container_detail::identity<Key>, Compare, AllocatorOrContainer> tree_t;
|
||||
typedef dtl::flat_tree<Key, dtl::identity<Key>, Compare, AllocatorOrContainer> tree_t;
|
||||
|
||||
public:
|
||||
tree_t &tree()
|
||||
|
@ -1095,8 +1217,8 @@ class flat_multiset
|
|||
typedef typename sequence_type::const_reverse_iterator const_reverse_iterator;
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::flat_set()
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<AllocatorOrContainer>::value &&
|
||||
container_detail::is_nothrow_default_constructible<Compare>::value)
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<AllocatorOrContainer>::value &&
|
||||
dtl::is_nothrow_default_constructible<Compare>::value)
|
||||
: tree_t()
|
||||
{}
|
||||
|
||||
|
@ -1249,7 +1371,7 @@ class flat_multiset
|
|||
|
||||
//! @copydoc ::boost::container::flat_set::flat_set(flat_set &&)
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset(BOOST_RV_REF(flat_multiset) x)
|
||||
BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
|
||||
BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
|
||||
: tree_t(boost::move(static_cast<tree_t&>(x)))
|
||||
{}
|
||||
|
||||
|
@ -1271,7 +1393,7 @@ class flat_multiset
|
|||
BOOST_CONTAINER_FORCEINLINE flat_multiset& operator=(BOOST_RV_REF(flat_multiset) x)
|
||||
BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
|
||||
allocator_traits_type::is_always_equal::value) &&
|
||||
boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
|
||||
boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
|
||||
{ return static_cast<flat_multiset&>(this->tree_t::operator=(BOOST_MOVE_BASE(tree_t, x))); }
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
|
@ -1456,8 +1578,7 @@ class flat_multiset
|
|||
//!
|
||||
//! <b>Effects</b>: inserts each element from the range [first,last) .
|
||||
//!
|
||||
//! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
|
||||
//! search time plus N*size() insertion time.
|
||||
//! <b>Complexity</b>: N log(N).
|
||||
//!
|
||||
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
||||
template <class InputIterator>
|
||||
|
@ -1470,8 +1591,7 @@ class flat_multiset
|
|||
//! <b>Effects</b>: inserts each element from the range [first,last) .This function
|
||||
//! is more efficient than the normal range creation for ordered ranges.
|
||||
//!
|
||||
//! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
|
||||
//! search time plus N*size() insertion time.
|
||||
//! <b>Complexity</b>: Linear.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension. If an element is inserted it might invalidate elements.
|
||||
template <class InputIterator>
|
||||
|
@ -1481,8 +1601,7 @@ class flat_multiset
|
|||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
//! <b>Effects</b>: inserts each element from the range [il.begin(), il.end()).
|
||||
//!
|
||||
//! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
|
||||
//! search time plus N*size() insertion time.
|
||||
//! <b>Complexity</b>: N log(N).
|
||||
//!
|
||||
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
||||
BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
|
||||
|
@ -1493,8 +1612,7 @@ class flat_multiset
|
|||
//! <b>Effects</b>: inserts each element from the range [il.begin(), il.end()). This function
|
||||
//! is more efficient than the normal range creation for ordered ranges.
|
||||
//!
|
||||
//! <b>Complexity</b>: At most N log(size()+N) (N is the distance from il.begin() to il.end())
|
||||
//! search time plus N*size() insertion time.
|
||||
//! <b>Complexity</b>: Linear.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension. If an element is inserted it might invalidate elements.
|
||||
BOOST_CONTAINER_FORCEINLINE void insert(ordered_range_t, std::initializer_list<value_type> il)
|
||||
|
@ -1535,7 +1653,7 @@ class flat_multiset
|
|||
//! @copydoc ::boost::container::flat_set::swap
|
||||
void swap(flat_multiset& x)
|
||||
BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||
&& boost::container::container_detail::is_nothrow_swappable<Compare>::value );
|
||||
&& boost::container::dtl::is_nothrow_swappable<Compare>::value );
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::clear
|
||||
void clear() BOOST_NOEXCEPT_OR_NOTHROW;
|
||||
|
@ -1663,6 +1781,46 @@ class flat_multiset
|
|||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
};
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
|
||||
template <typename InputIterator>
|
||||
flat_multiset(InputIterator, InputIterator) ->
|
||||
flat_multiset<typename iterator_traits<InputIterator>::value_type>;
|
||||
|
||||
template <typename InputIterator, typename Allocator>
|
||||
flat_multiset(InputIterator, InputIterator, Allocator const&) ->
|
||||
flat_multiset< typename iterator_traits<InputIterator>::value_type
|
||||
, std::less<typename iterator_traits<InputIterator>::value_type>
|
||||
, Allocator>;
|
||||
|
||||
template <typename InputIterator, typename Compare>
|
||||
flat_multiset(InputIterator, InputIterator, Compare const&) ->
|
||||
flat_multiset<typename iterator_traits<InputIterator>::value_type, Compare>;
|
||||
|
||||
template <typename InputIterator, typename Compare, typename Allocator>
|
||||
flat_multiset(InputIterator, InputIterator, Compare const&, Allocator const&) ->
|
||||
flat_multiset<typename iterator_traits<InputIterator>::value_type, Compare, Allocator>;
|
||||
|
||||
template <typename InputIterator>
|
||||
flat_multiset(ordered_range_t, InputIterator, InputIterator) ->
|
||||
flat_multiset<typename iterator_traits<InputIterator>::value_type>;
|
||||
|
||||
template <typename InputIterator, typename Allocator>
|
||||
flat_multiset(ordered_range_t, InputIterator, InputIterator, Allocator const&) ->
|
||||
flat_multiset< typename iterator_traits<InputIterator>::value_type
|
||||
, std::less<typename iterator_traits<InputIterator>::value_type>
|
||||
, Allocator>;
|
||||
|
||||
template <typename InputIterator, typename Compare>
|
||||
flat_multiset(ordered_range_t, InputIterator, InputIterator, Compare const&) ->
|
||||
flat_multiset< typename iterator_traits<InputIterator>::value_type, Compare>;
|
||||
|
||||
template <typename InputIterator, typename Compare, typename Allocator>
|
||||
flat_multiset(ordered_range_t, InputIterator, InputIterator, Compare const&, Allocator const&) ->
|
||||
flat_multiset<typename iterator_traits<InputIterator>::value_type, Compare, Allocator>;
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
} //namespace container {
|
||||
|
|
|
@ -78,9 +78,9 @@ template <class Key, class T, class Compare, class Allocator, class Options>
|
|||
#endif
|
||||
class map
|
||||
///@cond
|
||||
: public container_detail::tree
|
||||
: public dtl::tree
|
||||
< std::pair<const Key, T>
|
||||
, container_detail::select1st<Key>
|
||||
, dtl::select1st<Key>
|
||||
, Compare, Allocator, Options>
|
||||
///@endcond
|
||||
{
|
||||
|
@ -88,11 +88,11 @@ class map
|
|||
private:
|
||||
BOOST_COPYABLE_AND_MOVABLE(map)
|
||||
|
||||
typedef container_detail::select1st<Key> select_1st_t;
|
||||
typedef dtl::select1st<Key> select_1st_t;
|
||||
typedef std::pair<const Key, T> value_type_impl;
|
||||
typedef container_detail::tree
|
||||
typedef dtl::tree
|
||||
<value_type_impl, select_1st_t, Compare, Allocator, Options> base_t;
|
||||
typedef container_detail::pair <Key, T> movable_value_type_impl;
|
||||
typedef dtl::pair <Key, T> movable_value_type_impl;
|
||||
typedef typename base_t::value_compare value_compare_impl;
|
||||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
|
@ -131,7 +131,7 @@ class map
|
|||
(insert_return_type_base<iterator BOOST_MOVE_I node_type>) insert_return_type;
|
||||
|
||||
//allocator_type::value_type type must be std::pair<CONST Key, T>
|
||||
BOOST_STATIC_ASSERT((container_detail::is_same<typename allocator_type::value_type, std::pair<const Key, T> >::value));
|
||||
BOOST_STATIC_ASSERT((dtl::is_same<typename allocator_type::value_type, std::pair<const Key, T> >::value));
|
||||
|
||||
//////////////////////////////////////////////
|
||||
//
|
||||
|
@ -143,8 +143,8 @@ class map
|
|||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
map() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value &&
|
||||
container_detail::is_nothrow_default_constructible<Compare>::value)
|
||||
map() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value &&
|
||||
dtl::is_nothrow_default_constructible<Compare>::value)
|
||||
: base_t()
|
||||
{}
|
||||
|
||||
|
@ -350,7 +350,7 @@ class map
|
|||
//!
|
||||
//! <b>Postcondition</b>: x is emptied.
|
||||
BOOST_CONTAINER_FORCEINLINE map(BOOST_RV_REF(map) x)
|
||||
BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
|
||||
BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
|
||||
: base_t(BOOST_MOVE_BASE(base_t, x))
|
||||
{}
|
||||
|
||||
|
@ -388,7 +388,7 @@ class map
|
|||
BOOST_CONTAINER_FORCEINLINE map& operator=(BOOST_RV_REF(map) x)
|
||||
BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
|
||||
allocator_traits_type::is_always_equal::value) &&
|
||||
boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
|
||||
boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
|
||||
{ return static_cast<map&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
|
@ -1014,7 +1014,7 @@ class map
|
|||
template<class C2>
|
||||
BOOST_CONTAINER_FORCEINLINE void merge(map<Key, T, C2, Allocator, Options>& source)
|
||||
{
|
||||
typedef container_detail::tree
|
||||
typedef dtl::tree
|
||||
<value_type_impl, select_1st_t, C2, Allocator, Options> base2_t;
|
||||
this->merge_unique(static_cast<base2_t&>(source));
|
||||
}
|
||||
|
@ -1028,7 +1028,7 @@ class map
|
|||
template<class C2>
|
||||
BOOST_CONTAINER_FORCEINLINE void merge(multimap<Key, T, C2, Allocator, Options>& source)
|
||||
{
|
||||
typedef container_detail::tree
|
||||
typedef dtl::tree
|
||||
<value_type_impl, select_1st_t, C2, Allocator, Options> base2_t;
|
||||
this->base_t::merge_unique(static_cast<base2_t&>(source));
|
||||
}
|
||||
|
@ -1046,7 +1046,7 @@ class map
|
|||
//! <b>Complexity</b>: Constant.
|
||||
void swap(map& x)
|
||||
BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||
&& boost::container::container_detail::is_nothrow_swappable<Compare>::value )
|
||||
&& boost::container::dtl::is_nothrow_swappable<Compare>::value )
|
||||
|
||||
//! <b>Effects</b>: erase(a.begin(),a.end()).
|
||||
//!
|
||||
|
@ -1079,6 +1079,26 @@ class map
|
|||
//! <b>Complexity</b>: Logarithmic.
|
||||
const_iterator find(const key_type& x) const;
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: An iterator pointing to an element with the key
|
||||
//! equivalent to x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
template<typename K>
|
||||
iterator find(const K& x);
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: A const_iterator pointing to an element with the key
|
||||
//! equivalent to x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
template<typename K>
|
||||
const_iterator find(const K& x) const;
|
||||
|
||||
#endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
||||
//! <b>Returns</b>: The number of elements with key equivalent to x.
|
||||
|
@ -1087,6 +1107,16 @@ class map
|
|||
BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const
|
||||
{ return static_cast<size_type>(this->find(x) != this->cend()); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: The number of elements with key equivalent to x.
|
||||
//!
|
||||
//! <b>Complexity</b>: log(size())+count(k)
|
||||
template<typename K>
|
||||
BOOST_CONTAINER_FORCEINLINE size_type count(const K& x) const
|
||||
{ return static_cast<size_type>(this->find(x) != this->cend()); }
|
||||
|
||||
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
||||
//! <b>Returns</b>: An iterator pointing to the first element with key not less
|
||||
|
@ -1101,6 +1131,26 @@ class map
|
|||
//! <b>Complexity</b>: Logarithmic
|
||||
const_iterator lower_bound(const key_type& x) const;
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: An iterator pointing to the first element with key not less
|
||||
//! than k, or a.end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<typename K>
|
||||
iterator lower_bound(const K& x);
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: A const iterator pointing to the first element with key not
|
||||
//! less than k, or a.end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<typename K>
|
||||
const_iterator lower_bound(const K& x) const;
|
||||
|
||||
//! <b>Returns</b>: An iterator pointing to the first element with key not less
|
||||
//! than x, or end() if such an element is not found.
|
||||
//!
|
||||
|
@ -1113,6 +1163,26 @@ class map
|
|||
//! <b>Complexity</b>: Logarithmic
|
||||
const_iterator upper_bound(const key_type& x) const;
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: An iterator pointing to the first element with key not less
|
||||
//! than x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<typename K>
|
||||
iterator upper_bound(const K& x);
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: A const iterator pointing to the first element with key not
|
||||
//! less than x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<typename K>
|
||||
const_iterator upper_bound(const K& x) const;
|
||||
|
||||
//! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
|
@ -1123,6 +1193,24 @@ class map
|
|||
//! <b>Complexity</b>: Logarithmic
|
||||
std::pair<const_iterator,const_iterator> equal_range(const key_type& x) const;
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<typename K>
|
||||
std::pair<iterator,iterator> equal_range(const K& x);
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<typename K>
|
||||
std::pair<const_iterator,const_iterator> equal_range(const K& x) const;
|
||||
|
||||
//! <b>Effects</b>: Rebalances the tree. It's a no-op for Red-Black and AVL trees.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear
|
||||
|
@ -1175,6 +1263,60 @@ class map
|
|||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
};
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
|
||||
template <typename InputIterator>
|
||||
map(InputIterator, InputIterator) ->
|
||||
map< typename dtl::remove_const< typename iterator_traits<InputIterator>::value_type::first_type>::type
|
||||
, typename iterator_traits<InputIterator>::value_type::second_type>;
|
||||
|
||||
template <typename InputIterator, typename Allocator>
|
||||
map(InputIterator, InputIterator, Allocator const&) ->
|
||||
map< typename dtl::remove_const< typename iterator_traits<InputIterator>::value_type::first_type>::type
|
||||
, typename iterator_traits<InputIterator>::value_type::second_type
|
||||
, std::less<typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type>
|
||||
, Allocator>;
|
||||
|
||||
template <typename InputIterator, typename Compare>
|
||||
map(InputIterator, InputIterator, Compare const&) ->
|
||||
map< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
|
||||
, typename iterator_traits<InputIterator>::value_type::second_type
|
||||
, Compare>;
|
||||
|
||||
template <typename InputIterator, typename Compare, typename Allocator>
|
||||
map(InputIterator, InputIterator, Compare const&, Allocator const&) ->
|
||||
map< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
|
||||
, typename iterator_traits<InputIterator>::value_type::second_type
|
||||
, Compare
|
||||
, Allocator>;
|
||||
|
||||
template <typename InputIterator>
|
||||
map(ordered_unique_range_t, InputIterator, InputIterator) ->
|
||||
map< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
|
||||
, typename iterator_traits<InputIterator>::value_type::second_type>;
|
||||
|
||||
template <typename InputIterator, typename Allocator>
|
||||
map(ordered_unique_range_t, InputIterator, InputIterator, Allocator const&) ->
|
||||
map< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
|
||||
, typename iterator_traits<InputIterator>::value_type::second_type
|
||||
, std::less<typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type>
|
||||
, Allocator>;
|
||||
|
||||
template <typename InputIterator, typename Compare>
|
||||
map(ordered_unique_range_t, InputIterator, InputIterator, Compare const&) ->
|
||||
map< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
|
||||
, typename iterator_traits<InputIterator>::value_type::second_type
|
||||
, Compare>;
|
||||
|
||||
template <typename InputIterator, typename Compare, typename Allocator>
|
||||
map(ordered_unique_range_t, InputIterator, InputIterator, Compare const&, Allocator const&) ->
|
||||
map< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
|
||||
, typename iterator_traits<InputIterator>::value_type::second_type
|
||||
, Compare
|
||||
, Allocator>;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
|
@ -1219,9 +1361,9 @@ template <class Key, class T, class Compare, class Allocator, class Options>
|
|||
#endif
|
||||
class multimap
|
||||
///@cond
|
||||
: public container_detail::tree
|
||||
: public dtl::tree
|
||||
< std::pair<const Key, T>
|
||||
, container_detail::select1st<Key>
|
||||
, dtl::select1st<Key>
|
||||
, Compare, Allocator, Options>
|
||||
///@endcond
|
||||
{
|
||||
|
@ -1229,11 +1371,11 @@ class multimap
|
|||
private:
|
||||
BOOST_COPYABLE_AND_MOVABLE(multimap)
|
||||
|
||||
typedef container_detail::select1st<Key> select_1st_t;
|
||||
typedef dtl::select1st<Key> select_1st_t;
|
||||
typedef std::pair<const Key, T> value_type_impl;
|
||||
typedef container_detail::tree
|
||||
typedef dtl::tree
|
||||
<value_type_impl, select_1st_t, Compare, Allocator, Options> base_t;
|
||||
typedef container_detail::pair <Key, T> movable_value_type_impl;
|
||||
typedef dtl::pair <Key, T> movable_value_type_impl;
|
||||
typedef typename base_t::value_compare value_compare_impl;
|
||||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
|
@ -1271,7 +1413,7 @@ class multimap
|
|||
<key_type BOOST_MOVE_I mapped_type> >) node_type;
|
||||
|
||||
//allocator_type::value_type type must be std::pair<CONST Key, T>
|
||||
BOOST_STATIC_ASSERT((container_detail::is_same<typename allocator_type::value_type, std::pair<const Key, T> >::value));
|
||||
BOOST_STATIC_ASSERT((dtl::is_same<typename allocator_type::value_type, std::pair<const Key, T> >::value));
|
||||
|
||||
//////////////////////////////////////////////
|
||||
//
|
||||
|
@ -1283,8 +1425,8 @@ class multimap
|
|||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE multimap()
|
||||
BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value &&
|
||||
container_detail::is_nothrow_default_constructible<Compare>::value)
|
||||
BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value &&
|
||||
dtl::is_nothrow_default_constructible<Compare>::value)
|
||||
: base_t()
|
||||
{}
|
||||
|
||||
|
@ -1486,7 +1628,7 @@ class multimap
|
|||
//!
|
||||
//! <b>Postcondition</b>: x is emptied.
|
||||
BOOST_CONTAINER_FORCEINLINE multimap(BOOST_RV_REF(multimap) x)
|
||||
BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
|
||||
BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
|
||||
: base_t(BOOST_MOVE_BASE(base_t, x))
|
||||
{}
|
||||
|
||||
|
@ -1518,7 +1660,7 @@ class multimap
|
|||
BOOST_CONTAINER_FORCEINLINE multimap& operator=(BOOST_RV_REF(multimap) x)
|
||||
BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
|
||||
allocator_traits_type::is_always_equal::value) &&
|
||||
boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
|
||||
boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
|
||||
{ return static_cast<multimap&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
|
@ -1790,7 +1932,7 @@ class multimap
|
|||
template<class C2>
|
||||
BOOST_CONTAINER_FORCEINLINE void merge(multimap<Key, T, C2, Allocator, Options>& source)
|
||||
{
|
||||
typedef container_detail::tree
|
||||
typedef dtl::tree
|
||||
<value_type_impl, select_1st_t, C2, Allocator, Options> base2_t;
|
||||
this->base_t::merge_equal(static_cast<base2_t&>(source));
|
||||
}
|
||||
|
@ -1804,7 +1946,7 @@ class multimap
|
|||
template<class C2>
|
||||
BOOST_CONTAINER_FORCEINLINE void merge(map<Key, T, C2, Allocator, Options>& source)
|
||||
{
|
||||
typedef container_detail::tree
|
||||
typedef dtl::tree
|
||||
<value_type_impl, select_1st_t, C2, Allocator, Options> base2_t;
|
||||
this->base_t::merge_equal(static_cast<base2_t&>(source));
|
||||
}
|
||||
|
@ -1818,7 +1960,7 @@ class multimap
|
|||
//! @copydoc ::boost::container::set::swap
|
||||
void swap(multiset& x)
|
||||
BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||
&& boost::container::container_detail::is_nothrow_swappable<Compare>::value );
|
||||
&& boost::container::dtl::is_nothrow_swappable<Compare>::value );
|
||||
|
||||
//! @copydoc ::boost::container::set::clear
|
||||
void clear() BOOST_NOEXCEPT_OR_NOTHROW;
|
||||
|
@ -1841,11 +1983,40 @@ class multimap
|
|||
//! <b>Complexity</b>: Logarithmic.
|
||||
const_iterator find(const key_type& x) const;
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: An iterator pointing to an element with the key
|
||||
//! equivalent to x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
template<typename K>
|
||||
iterator find(const K& x);
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: A const_iterator pointing to an element with the key
|
||||
//! equivalent to x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
template<typename K>
|
||||
const_iterator find(const K& x) const;
|
||||
|
||||
//! <b>Returns</b>: The number of elements with key equivalent to x.
|
||||
//!
|
||||
//! <b>Complexity</b>: log(size())+count(k)
|
||||
size_type count(const key_type& x) const;
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: The number of elements with key equivalent to x.
|
||||
//!
|
||||
//! <b>Complexity</b>: log(size())+count(k)
|
||||
template<typename K>
|
||||
size_type count(const K& x) const;
|
||||
|
||||
//! <b>Returns</b>: An iterator pointing to the first element with key not less
|
||||
//! than k, or a.end() if such an element is not found.
|
||||
//!
|
||||
|
@ -1858,6 +2029,26 @@ class multimap
|
|||
//! <b>Complexity</b>: Logarithmic
|
||||
const_iterator lower_bound(const key_type& x) const;
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: An iterator pointing to the first element with key not less
|
||||
//! than k, or a.end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<typename K>
|
||||
iterator lower_bound(const K& x);
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: A const iterator pointing to the first element with key not
|
||||
//! less than k, or a.end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<typename K>
|
||||
const_iterator lower_bound(const K& x) const;
|
||||
|
||||
//! <b>Returns</b>: An iterator pointing to the first element with key not less
|
||||
//! than x, or end() if such an element is not found.
|
||||
//!
|
||||
|
@ -1870,6 +2061,26 @@ class multimap
|
|||
//! <b>Complexity</b>: Logarithmic
|
||||
const_iterator upper_bound(const key_type& x) const;
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: An iterator pointing to the first element with key not less
|
||||
//! than x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<typename K>
|
||||
iterator upper_bound(const K& x);
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: A const iterator pointing to the first element with key not
|
||||
//! less than x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<typename K>
|
||||
const_iterator upper_bound(const K& x) const;
|
||||
|
||||
//! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
|
@ -1880,6 +2091,24 @@ class multimap
|
|||
//! <b>Complexity</b>: Logarithmic
|
||||
std::pair<const_iterator,const_iterator> equal_range(const key_type& x) const;
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<typename K>
|
||||
std::pair<iterator,iterator> equal_range(const K& x);
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<typename K>
|
||||
std::pair<const_iterator,const_iterator> equal_range(const K& x) const;
|
||||
|
||||
//! <b>Effects</b>: Rebalances the tree. It's a no-op for Red-Black and AVL trees.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear
|
||||
|
@ -1923,6 +2152,60 @@ class multimap
|
|||
#endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
};
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
|
||||
template <typename InputIterator>
|
||||
multimap(InputIterator, InputIterator) ->
|
||||
multimap<typename dtl::remove_const< typename iterator_traits<InputIterator>::value_type::first_type>::type
|
||||
, typename iterator_traits<InputIterator>::value_type::second_type>;
|
||||
|
||||
template <typename InputIterator, typename Allocator>
|
||||
multimap(InputIterator, InputIterator, Allocator const&) ->
|
||||
multimap<typename dtl::remove_const< typename iterator_traits<InputIterator>::value_type::first_type>::type
|
||||
, typename iterator_traits<InputIterator>::value_type::second_type
|
||||
, std::less<typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type>
|
||||
, Allocator>;
|
||||
|
||||
template <typename InputIterator, typename Compare>
|
||||
multimap(InputIterator, InputIterator, Compare const&) ->
|
||||
multimap< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
|
||||
, typename iterator_traits<InputIterator>::value_type::second_type
|
||||
, Compare>;
|
||||
|
||||
template <typename InputIterator, typename Compare, typename Allocator>
|
||||
multimap(InputIterator, InputIterator, Compare const&, Allocator const&) ->
|
||||
multimap< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
|
||||
, typename iterator_traits<InputIterator>::value_type::second_type
|
||||
, Compare
|
||||
, Allocator>;
|
||||
|
||||
template <typename InputIterator>
|
||||
multimap(ordered_range_t, InputIterator, InputIterator) ->
|
||||
multimap< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
|
||||
, typename iterator_traits<InputIterator>::value_type::second_type>;
|
||||
|
||||
template <typename InputIterator, typename Allocator>
|
||||
multimap(ordered_range_t, InputIterator, InputIterator, Allocator const&) ->
|
||||
multimap< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
|
||||
, typename iterator_traits<InputIterator>::value_type::second_type
|
||||
, std::less<typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type>
|
||||
, Allocator>;
|
||||
|
||||
template <typename InputIterator, typename Compare>
|
||||
multimap(ordered_range_t, InputIterator, InputIterator, Compare const&) ->
|
||||
multimap< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
|
||||
, typename iterator_traits<InputIterator>::value_type::second_type
|
||||
, Compare>;
|
||||
|
||||
template <typename InputIterator, typename Compare, typename Allocator>
|
||||
multimap(ordered_range_t, InputIterator, InputIterator, Compare const&, Allocator const&) ->
|
||||
multimap< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
|
||||
, typename iterator_traits<InputIterator>::value_type::second_type
|
||||
, Compare
|
||||
, Allocator>;
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
} //namespace container {
|
||||
|
|
|
@ -174,9 +174,9 @@ class node_handle
|
|||
//! of a node handle is void.
|
||||
template<class KeyMapped2>
|
||||
node_handle( BOOST_RV_REF_BEG node_handle<NodeAllocator, KeyMapped2> BOOST_RV_REF_END nh
|
||||
, typename container_detail::enable_if_c
|
||||
< ((unsigned)container_detail::is_same<KeyMapped, void>::value +
|
||||
(unsigned)container_detail::is_same<KeyMapped2, void>::value) == 1u
|
||||
, typename dtl::enable_if_c
|
||||
< ((unsigned)dtl::is_same<KeyMapped, void>::value +
|
||||
(unsigned)dtl::is_same<KeyMapped2, void>::value) == 1u
|
||||
>::type* = 0) BOOST_NOEXCEPT
|
||||
: m_ptr(nh.get())
|
||||
{ this->move_construct_end(nh); }
|
||||
|
@ -250,7 +250,7 @@ class node_handle
|
|||
//! <b>Throws</b>: Nothing.
|
||||
value_type& value() const BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT((container_detail::is_same<KeyMapped, void>::value));
|
||||
BOOST_STATIC_ASSERT((dtl::is_same<KeyMapped, void>::value));
|
||||
BOOST_ASSERT(!empty());
|
||||
return m_ptr->get_data();
|
||||
}
|
||||
|
@ -265,7 +265,7 @@ class node_handle
|
|||
//! <b>Requires</b>: Modifying the key through the returned reference is permitted.
|
||||
key_type& key() const BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT((!container_detail::is_same<KeyMapped, void>::value));
|
||||
BOOST_STATIC_ASSERT((!dtl::is_same<KeyMapped, void>::value));
|
||||
BOOST_ASSERT(!empty());
|
||||
return const_cast<key_type &>(KeyMapped().key_of_value(m_ptr->get_data()));
|
||||
}
|
||||
|
@ -278,7 +278,7 @@ class node_handle
|
|||
//! <b>Throws</b>: Nothing.
|
||||
mapped_type& mapped() const BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT((!container_detail::is_same<KeyMapped, void>::value));
|
||||
BOOST_STATIC_ASSERT((!dtl::is_same<KeyMapped, void>::value));
|
||||
BOOST_ASSERT(!empty());
|
||||
return KeyMapped().mapped_of_value(m_ptr->get_data());
|
||||
}
|
||||
|
|
|
@ -28,6 +28,24 @@
|
|||
namespace boost {
|
||||
namespace container {
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
// OPTIONS FOR ASSOCIATIVE TREE-BASED CONTAINERS
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
//! Enumeration used to configure ordered associative containers
|
||||
//! with a concrete tree implementation.
|
||||
enum tree_type_enum
|
||||
{
|
||||
red_black_tree,
|
||||
avl_tree,
|
||||
scapegoat_tree,
|
||||
splay_tree
|
||||
};
|
||||
|
||||
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
||||
template<tree_type_enum TreeType, bool OptimizeSize>
|
||||
|
@ -37,6 +55,8 @@ struct tree_opt
|
|||
static const bool optimize_size = OptimizeSize;
|
||||
};
|
||||
|
||||
typedef tree_opt<red_black_tree, true> tree_assoc_defaults;
|
||||
|
||||
#endif //!defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
||||
//!This option setter specifies the underlying tree type
|
||||
|
@ -72,6 +92,151 @@ struct tree_assoc_options
|
|||
typedef implementation_defined type;
|
||||
};
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
|
||||
//! Helper alias metafunction to combine options into a single type to be used
|
||||
//! by tree-based associative containers
|
||||
template<class ...Options>
|
||||
using tree_assoc_options_t = typename boost::container::tree_assoc_options<Options...>::type;
|
||||
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
// OPTIONS FOR VECTOR-BASED CONTAINERS
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
||||
template<class AllocTraits, class StoredSizeType>
|
||||
struct get_stored_size_type_with_alloctraits
|
||||
{
|
||||
typedef StoredSizeType type;
|
||||
};
|
||||
|
||||
template<class AllocTraits>
|
||||
struct get_stored_size_type_with_alloctraits<AllocTraits, void>
|
||||
{
|
||||
typedef typename AllocTraits::size_type type;
|
||||
};
|
||||
|
||||
template<class GrowthType, class StoredSizeType>
|
||||
struct vector_opt
|
||||
{
|
||||
typedef GrowthType growth_factor_type;
|
||||
typedef StoredSizeType stored_size_type;
|
||||
|
||||
template<class AllocTraits>
|
||||
struct get_stored_size_type
|
||||
: get_stored_size_type_with_alloctraits<AllocTraits, StoredSizeType>
|
||||
{};
|
||||
};
|
||||
|
||||
class default_next_capacity;
|
||||
|
||||
typedef vector_opt<void, void> vector_null_opt;
|
||||
|
||||
#else //!defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
||||
//!This growth factor argument specifies that the container should increase it's
|
||||
//!capacity a 50% when existing capacity is exhausted.
|
||||
struct growth_factor_50{};
|
||||
|
||||
//!This growth factor argument specifies that the container should increase it's
|
||||
//!capacity a 60% when existing capacity is exhausted.
|
||||
struct growth_factor_60{};
|
||||
|
||||
//!This growth factor argument specifies that the container should increase it's
|
||||
//!capacity a 100% (doubling its capacity) when existing capacity is exhausted.
|
||||
struct growth_factor_100{};
|
||||
|
||||
#endif //!defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
||||
//!This option setter specifies the growth factor strategy of the underlying vector.
|
||||
//!
|
||||
//!\tparam GrowthFactor A function object that has the following signature:<br/><br/>
|
||||
//!`template<class SizeType>`<br/>
|
||||
//!`SizeType operator()(SizeType cur_cap, SizeType add_min_cap, SizeType max_cap) const;`.<br/><br/>
|
||||
//!`cur_cap` is the current capacity, `add_min_cap` is the minimum additional capacity
|
||||
//!we want to achieve and `max_cap` is the maximum capacity that the allocator or other
|
||||
//!factors allow. The implementation should return a value between `cur_cap` + `add_min_cap`
|
||||
//!and `max_cap`. `cur_cap` + `add_min_cap` is guaranteed not to overflow/wraparound,
|
||||
//! but the implementation should handle wraparound produced by the growth factor.
|
||||
//!
|
||||
//!Predefined growth factors that can be passed as arguments to this option are:
|
||||
//!\c boost::container::growth_factor_50
|
||||
//!\c boost::container::growth_factor_60
|
||||
//!\c boost::container::growth_factor_100
|
||||
//!
|
||||
//!If this option is not specified, a default will be used by the container.
|
||||
BOOST_INTRUSIVE_OPTION_TYPE(growth_factor, GrowthFactor, GrowthFactor, growth_factor_type)
|
||||
|
||||
//!This option specifies the unsigned integer type that a user wants the container
|
||||
//!to use to hold size-related information inside a container (e.g. current size, current capacity).
|
||||
//!
|
||||
//!\tparam StoredSizeType A unsigned integer type. It shall be smaller than than the size
|
||||
//! of the size_type deduced from `allocator_traits<A>::size_type` or the same type.
|
||||
//!
|
||||
//!If the maximum capacity() to be used is limited, a user can try to use 8-bit, 16-bit
|
||||
//!(e.g. in 32-bit machines), or 32-bit size types (e.g. in a 64 bit machine) to see if some
|
||||
//!memory can be saved for empty vectors. This could potentially performance benefits due to better
|
||||
//!cache usage.
|
||||
//!
|
||||
//!Note that alignment requirements can disallow theoritical space savings. Example:
|
||||
//!\c vector holds a pointer and two size types (for size and capacity), in a 32 bit machine
|
||||
//!a 8 bit size type (total size: 4 byte pointer + 2 x 1 byte sizes = 6 bytes)
|
||||
//!will not save space when comparing two 16-bit size types because usually
|
||||
//!a 32 bit alignment is required for vector and the size will be rounded to 8 bytes. In a 64-bit
|
||||
//!machine a 16 bit size type does not usually save memory when comparing to a 32-bit size type.
|
||||
//!Measure the size of the resulting container and do not assume a smaller \c stored_size
|
||||
//!will always lead to a smaller sizeof(container).
|
||||
//!
|
||||
//!If a user tries to insert more elements than representable by \c stored_size, vector
|
||||
//!will throw a length_error.
|
||||
//!
|
||||
//!If this option is not specified, `allocator_traits<A>::size_type` (usually std::size_t) will
|
||||
//!be used to store size-related information inside the container.
|
||||
BOOST_INTRUSIVE_OPTION_TYPE(stored_size, StoredSizeType, StoredSizeType, stored_size_type)
|
||||
|
||||
//! Helper metafunction to combine options into a single type to be used
|
||||
//! by \c boost::container::vector.
|
||||
//! Supported options are: \c boost::container::growth_factor and \c boost::container::stored_size
|
||||
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) || defined(BOOST_CONTAINER_VARIADIC_TEMPLATES)
|
||||
template<class ...Options>
|
||||
#else
|
||||
template<class O1 = void, class O2 = void, class O3 = void, class O4 = void>
|
||||
#endif
|
||||
struct vector_options
|
||||
{
|
||||
/// @cond
|
||||
typedef typename ::boost::intrusive::pack_options
|
||||
< vector_null_opt,
|
||||
#if !defined(BOOST_CONTAINER_VARIADIC_TEMPLATES)
|
||||
O1, O2, O3, O4
|
||||
#else
|
||||
Options...
|
||||
#endif
|
||||
>::type packed_options;
|
||||
typedef vector_opt< typename packed_options::growth_factor_type
|
||||
, typename packed_options::stored_size_type> implementation_defined;
|
||||
/// @endcond
|
||||
typedef implementation_defined type;
|
||||
};
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
|
||||
//! Helper alias metafunction to combine options into a single type to be used
|
||||
//! by \c boost::container::vector.
|
||||
//! Supported options are: \c boost::container::growth_factor and \c boost::container::stored_size
|
||||
template<class ...Options>
|
||||
using vector_options_t = typename boost::container::vector_options<Options...>::type;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
@ -60,21 +60,21 @@ namespace container {
|
|||
//! \tparam Compare is the comparison functor used to order keys
|
||||
//! \tparam Allocator is the allocator to be used to allocate memory for this container
|
||||
//! \tparam Options is an packed option type generated using using boost::container::tree_assoc_options.
|
||||
template <class Key, class Compare = std::less<Key>, class Allocator = new_allocator<Key>, class Options = tree_assoc_defaults >
|
||||
template <class Key, class Compare = std::less<Key>, class Allocator = new_allocator<Key>, class Options = void>
|
||||
#else
|
||||
template <class Key, class Compare, class Allocator, class Options>
|
||||
#endif
|
||||
class set
|
||||
///@cond
|
||||
: public container_detail::tree
|
||||
< Key, container_detail::identity<Key>, Compare, Allocator, Options>
|
||||
: public dtl::tree
|
||||
< Key, dtl::identity<Key>, Compare, Allocator, Options>
|
||||
///@endcond
|
||||
{
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
private:
|
||||
BOOST_COPYABLE_AND_MOVABLE(set)
|
||||
typedef container_detail::tree
|
||||
< Key, container_detail::identity<Key>, Compare, Allocator, Options> base_t;
|
||||
typedef dtl::tree
|
||||
< Key, dtl::identity<Key>, Compare, Allocator, Options> base_t;
|
||||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
public:
|
||||
|
@ -114,8 +114,8 @@ class set
|
|||
//! <b>Complexity</b>: Constant.
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE set()
|
||||
BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value &&
|
||||
container_detail::is_nothrow_default_constructible<Compare>::value)
|
||||
BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value &&
|
||||
dtl::is_nothrow_default_constructible<Compare>::value)
|
||||
: base_t()
|
||||
{}
|
||||
|
||||
|
@ -320,7 +320,7 @@ class set
|
|||
//!
|
||||
//! <b>Postcondition</b>: x is emptied.
|
||||
BOOST_CONTAINER_FORCEINLINE set(BOOST_RV_REF(set) x)
|
||||
BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
|
||||
BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
|
||||
: base_t(BOOST_MOVE_BASE(base_t, x))
|
||||
{}
|
||||
|
||||
|
@ -356,7 +356,7 @@ class set
|
|||
BOOST_CONTAINER_FORCEINLINE set& operator=(BOOST_RV_REF(set) x)
|
||||
BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
|
||||
allocator_traits_type::is_always_equal::value) &&
|
||||
boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
|
||||
boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
|
||||
{ return static_cast<set&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
|
@ -639,8 +639,8 @@ class set
|
|||
template<class C2>
|
||||
BOOST_CONTAINER_FORCEINLINE void merge(set<Key, C2, Allocator, Options>& source)
|
||||
{
|
||||
typedef container_detail::tree
|
||||
<Key, container_detail::identity<Key>, C2, Allocator, Options> base2_t;
|
||||
typedef dtl::tree
|
||||
<Key, dtl::identity<Key>, C2, Allocator, Options> base2_t;
|
||||
this->base_t::merge_unique(static_cast<base2_t&>(source));
|
||||
}
|
||||
|
||||
|
@ -653,8 +653,8 @@ class set
|
|||
template<class C2>
|
||||
BOOST_CONTAINER_FORCEINLINE void merge(multiset<Key, C2, Allocator, Options>& source)
|
||||
{
|
||||
typedef container_detail::tree
|
||||
<Key, container_detail::identity<Key>, C2, Allocator, Options> base2_t;
|
||||
typedef dtl::tree
|
||||
<Key, dtl::identity<Key>, C2, Allocator, Options> base2_t;
|
||||
this->base_t::merge_unique(static_cast<base2_t&>(source));
|
||||
}
|
||||
|
||||
|
@ -701,7 +701,7 @@ class set
|
|||
//! <b>Complexity</b>: Constant.
|
||||
void swap(set& x)
|
||||
BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||
&& boost::container::container_detail::is_nothrow_swappable<Compare>::value );
|
||||
&& boost::container::dtl::is_nothrow_swappable<Compare>::value );
|
||||
|
||||
//! <b>Effects</b>: erase(a.begin(),a.end()).
|
||||
//!
|
||||
|
@ -734,6 +734,26 @@ class set
|
|||
//! <b>Complexity</b>: Logarithmic.
|
||||
const_iterator find(const key_type& x) const;
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: An iterator pointing to an element with the key
|
||||
//! equivalent to x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
template<typename K>
|
||||
iterator find(const K& x);
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: A const_iterator pointing to an element with the key
|
||||
//! equivalent to x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
template<typename K>
|
||||
const_iterator find(const K& x) const;
|
||||
|
||||
#endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
||||
//! <b>Returns</b>: The number of elements with key equivalent to x.
|
||||
|
@ -742,6 +762,16 @@ class set
|
|||
BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const
|
||||
{ return static_cast<size_type>(this->base_t::find(x) != this->base_t::cend()); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: The number of elements with key equivalent to x.
|
||||
//!
|
||||
//! <b>Complexity</b>: log(size())+count(k)
|
||||
template<typename K>
|
||||
BOOST_CONTAINER_FORCEINLINE size_type count(const K& x) const
|
||||
{ return static_cast<size_type>(this->find(x) != this->cend()); }
|
||||
|
||||
//! <b>Returns</b>: The number of elements with key equivalent to x.
|
||||
//!
|
||||
//! <b>Complexity</b>: log(size())+count(k)
|
||||
|
@ -762,6 +792,26 @@ class set
|
|||
//! <b>Complexity</b>: Logarithmic
|
||||
const_iterator lower_bound(const key_type& x) const;
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: An iterator pointing to the first element with key not less
|
||||
//! than k, or a.end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<typename K>
|
||||
iterator lower_bound(const K& x);
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: A const iterator pointing to the first element with key not
|
||||
//! less than k, or a.end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<typename K>
|
||||
const_iterator lower_bound(const K& x) const;
|
||||
|
||||
//! <b>Returns</b>: An iterator pointing to the first element with key not less
|
||||
//! than x, or end() if such an element is not found.
|
||||
//!
|
||||
|
@ -774,6 +824,26 @@ class set
|
|||
//! <b>Complexity</b>: Logarithmic
|
||||
const_iterator upper_bound(const key_type& x) const;
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: An iterator pointing to the first element with key not less
|
||||
//! than x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<typename K>
|
||||
iterator upper_bound(const K& x);
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Returns</b>: A const iterator pointing to the first element with key not
|
||||
//! less than x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<typename K>
|
||||
const_iterator upper_bound(const K& x) const;
|
||||
|
||||
#endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
||||
//! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
|
||||
|
@ -788,18 +858,28 @@ class set
|
|||
BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const
|
||||
{ return this->base_t::lower_bound_range(x); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<typename K>
|
||||
std::pair<iterator,iterator> equal_range(const K& x)
|
||||
{ return this->base_t::lower_bound_range(x); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
//! key_compare::is_transparent exists.
|
||||
//!
|
||||
//! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<typename K>
|
||||
std::pair<const_iterator,const_iterator> equal_range(const K& x) const
|
||||
{ return this->base_t::lower_bound_range(x); }
|
||||
|
||||
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
||||
//! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
std::pair<iterator,iterator> equal_range(const key_type& x);
|
||||
|
||||
//! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const;
|
||||
|
||||
//! <b>Effects</b>: Rebalances the tree. It's a no-op for Red-Black and AVL trees.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear
|
||||
|
@ -854,6 +934,42 @@ class set
|
|||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
};
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
|
||||
template <typename InputIterator>
|
||||
set(InputIterator, InputIterator) ->
|
||||
set<typename iterator_traits<InputIterator>::value_type>;
|
||||
|
||||
template <typename InputIterator, typename Allocator>
|
||||
set(InputIterator, InputIterator, Allocator const&) ->
|
||||
set<typename iterator_traits<InputIterator>::value_type, std::less<typename iterator_traits<InputIterator>::value_type>, Allocator>;
|
||||
|
||||
template <typename InputIterator, typename Compare>
|
||||
set(InputIterator, InputIterator, Compare const&) ->
|
||||
set<typename iterator_traits<InputIterator>::value_type, Compare>;
|
||||
|
||||
template <typename InputIterator, typename Compare, typename Allocator>
|
||||
set(InputIterator, InputIterator, Compare const&, Allocator const&) ->
|
||||
set<typename iterator_traits<InputIterator>::value_type, Compare, Allocator>;
|
||||
|
||||
template <typename InputIterator>
|
||||
set(ordered_unique_range_t, InputIterator, InputIterator) ->
|
||||
set<typename iterator_traits<InputIterator>::value_type>;
|
||||
|
||||
template <typename InputIterator, typename Allocator>
|
||||
set(ordered_unique_range_t, InputIterator, InputIterator, Allocator const&) ->
|
||||
set<typename iterator_traits<InputIterator>::value_type, std::less<typename iterator_traits<InputIterator>::value_type>, Allocator>;
|
||||
|
||||
template <typename InputIterator, typename Compare>
|
||||
set(ordered_unique_range_t, InputIterator, InputIterator, Compare const&) ->
|
||||
set<typename iterator_traits<InputIterator>::value_type, Compare>;
|
||||
|
||||
template <typename InputIterator, typename Compare, typename Allocator>
|
||||
set(ordered_unique_range_t, InputIterator, InputIterator, Compare const&, Allocator const&) ->
|
||||
set<typename iterator_traits<InputIterator>::value_type, Compare, Allocator>;
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
} //namespace container {
|
||||
|
@ -893,15 +1009,15 @@ template <class Key, class Compare, class Allocator, class Options>
|
|||
#endif
|
||||
class multiset
|
||||
/// @cond
|
||||
: public container_detail::tree
|
||||
<Key,container_detail::identity<Key>, Compare, Allocator, Options>
|
||||
: public dtl::tree
|
||||
<Key,dtl::identity<Key>, Compare, Allocator, Options>
|
||||
/// @endcond
|
||||
{
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
private:
|
||||
BOOST_COPYABLE_AND_MOVABLE(multiset)
|
||||
typedef container_detail::tree
|
||||
<Key,container_detail::identity<Key>, Compare, Allocator, Options> base_t;
|
||||
typedef dtl::tree
|
||||
<Key,dtl::identity<Key>, Compare, Allocator, Options> base_t;
|
||||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
public:
|
||||
|
@ -938,8 +1054,8 @@ class multiset
|
|||
|
||||
//! @copydoc ::boost::container::set::set()
|
||||
BOOST_CONTAINER_FORCEINLINE multiset()
|
||||
BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value &&
|
||||
container_detail::is_nothrow_default_constructible<Compare>::value)
|
||||
BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value &&
|
||||
dtl::is_nothrow_default_constructible<Compare>::value)
|
||||
: base_t()
|
||||
{}
|
||||
|
||||
|
@ -1068,7 +1184,7 @@ class multiset
|
|||
|
||||
//! @copydoc ::boost::container::set::set(set &&)
|
||||
BOOST_CONTAINER_FORCEINLINE multiset(BOOST_RV_REF(multiset) x)
|
||||
BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
|
||||
BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
|
||||
: base_t(BOOST_MOVE_BASE(base_t, x))
|
||||
{}
|
||||
|
||||
|
@ -1090,7 +1206,7 @@ class multiset
|
|||
BOOST_CONTAINER_FORCEINLINE multiset& operator=(BOOST_RV_REF(multiset) x)
|
||||
BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
|
||||
allocator_traits_type::is_always_equal::value) &&
|
||||
boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
|
||||
boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
|
||||
{ return static_cast<multiset&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
|
@ -1269,8 +1385,8 @@ class multiset
|
|||
template<class C2>
|
||||
BOOST_CONTAINER_FORCEINLINE void merge(multiset<Key, C2, Allocator, Options>& source)
|
||||
{
|
||||
typedef container_detail::tree
|
||||
<Key, container_detail::identity<Key>, C2, Allocator, Options> base2_t;
|
||||
typedef dtl::tree
|
||||
<Key, dtl::identity<Key>, C2, Allocator, Options> base2_t;
|
||||
this->base_t::merge_equal(static_cast<base2_t&>(source));
|
||||
}
|
||||
|
||||
|
@ -1283,8 +1399,8 @@ class multiset
|
|||
template<class C2>
|
||||
BOOST_CONTAINER_FORCEINLINE void merge(set<Key, C2, Allocator, Options>& source)
|
||||
{
|
||||
typedef container_detail::tree
|
||||
<Key, container_detail::identity<Key>, C2, Allocator, Options> base2_t;
|
||||
typedef dtl::tree
|
||||
<Key, dtl::identity<Key>, C2, Allocator, Options> base2_t;
|
||||
this->base_t::merge_equal(static_cast<base2_t&>(source));
|
||||
}
|
||||
|
||||
|
@ -1313,7 +1429,7 @@ class multiset
|
|||
//! @copydoc ::boost::container::set::swap
|
||||
void swap(multiset& x)
|
||||
BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||
&& boost::container::container_detail::is_nothrow_swappable<Compare>::value );
|
||||
&& boost::container::dtl::is_nothrow_swappable<Compare>::value );
|
||||
|
||||
//! @copydoc ::boost::container::set::clear
|
||||
void clear() BOOST_NOEXCEPT_OR_NOTHROW;
|
||||
|
@ -1330,27 +1446,63 @@ class multiset
|
|||
//! @copydoc ::boost::container::set::find(const key_type& ) const
|
||||
const_iterator find(const key_type& x) const;
|
||||
|
||||
//! @copydoc ::boost::container::set::find(const K& )
|
||||
template<typename K>
|
||||
iterator find(const K& x);
|
||||
|
||||
//! @copydoc ::boost::container::set::find(const K& )
|
||||
template<typename K>
|
||||
const_iterator find(const K& x) const;
|
||||
|
||||
//! @copydoc ::boost::container::set::count(const key_type& ) const
|
||||
size_type count(const key_type& x) const;
|
||||
|
||||
//! @copydoc ::boost::container::set::count(const K& ) const
|
||||
template<typename K>
|
||||
size_type count(const K& x) const;
|
||||
|
||||
//! @copydoc ::boost::container::set::lower_bound(const key_type& )
|
||||
iterator lower_bound(const key_type& x);
|
||||
|
||||
//! @copydoc ::boost::container::set::lower_bound(const key_type& ) const
|
||||
const_iterator lower_bound(const key_type& x) const;
|
||||
|
||||
//! @copydoc ::boost::container::set::lower_bound(const K& )
|
||||
template<typename K>
|
||||
iterator lower_bound(const K& x);
|
||||
|
||||
//! @copydoc ::boost::container::set::lower_bound(const K& ) const
|
||||
template<typename K>
|
||||
const_iterator lower_bound(const K& x) const;
|
||||
|
||||
//! @copydoc ::boost::container::set::upper_bound(const key_type& )
|
||||
iterator upper_bound(const key_type& x);
|
||||
|
||||
//! @copydoc ::boost::container::set::upper_bound(const key_type& ) const
|
||||
const_iterator upper_bound(const key_type& x) const;
|
||||
|
||||
//! @copydoc ::boost::container::set::upper_bound(const K& )
|
||||
template<typename K>
|
||||
iterator upper_bound(const K& x);
|
||||
|
||||
//! @copydoc ::boost::container::set::upper_bound(const K& ) const
|
||||
template<typename K>
|
||||
const_iterator upper_bound(const K& x) const;
|
||||
|
||||
//! @copydoc ::boost::container::set::equal_range(const key_type& ) const
|
||||
std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const;
|
||||
|
||||
//! @copydoc ::boost::container::set::equal_range(const key_type& )
|
||||
std::pair<iterator,iterator> equal_range(const key_type& x);
|
||||
|
||||
//! @copydoc ::boost::container::set::equal_range(const K& ) const
|
||||
template<typename K>
|
||||
std::pair<const_iterator, const_iterator> equal_range(const K& x) const;
|
||||
|
||||
//! @copydoc ::boost::container::set::equal_range(const K& )
|
||||
template<typename K>
|
||||
std::pair<iterator,iterator> equal_range(const K& x);
|
||||
|
||||
//! @copydoc ::boost::container::set::rebalance()
|
||||
void rebalance();
|
||||
|
||||
|
@ -1404,6 +1556,46 @@ class multiset
|
|||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
};
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
|
||||
template <typename InputIterator>
|
||||
multiset(InputIterator, InputIterator) ->
|
||||
multiset<typename iterator_traits<InputIterator>::value_type>;
|
||||
|
||||
template <typename InputIterator, typename Allocator>
|
||||
multiset(InputIterator, InputIterator, Allocator const&) ->
|
||||
multiset< typename iterator_traits<InputIterator>::value_type
|
||||
, std::less<typename iterator_traits<InputIterator>::value_type>
|
||||
, Allocator>;
|
||||
|
||||
template <typename InputIterator, typename Compare>
|
||||
multiset(InputIterator, InputIterator, Compare const&) ->
|
||||
multiset<typename iterator_traits<InputIterator>::value_type, Compare>;
|
||||
|
||||
template <typename InputIterator, typename Compare, typename Allocator>
|
||||
multiset(InputIterator, InputIterator, Compare const&, Allocator const&) ->
|
||||
multiset<typename iterator_traits<InputIterator>::value_type, Compare, Allocator>;
|
||||
|
||||
template <typename InputIterator>
|
||||
multiset(ordered_range_t, InputIterator, InputIterator) ->
|
||||
multiset<typename iterator_traits<InputIterator>::value_type>;
|
||||
|
||||
template <typename InputIterator, typename Allocator>
|
||||
multiset(ordered_range_t, InputIterator, InputIterator, Allocator const&) ->
|
||||
multiset< typename iterator_traits<InputIterator>::value_type
|
||||
, std::less<typename iterator_traits<InputIterator>::value_type>
|
||||
, Allocator>;
|
||||
|
||||
template <typename InputIterator, typename Compare>
|
||||
multiset(ordered_range_t, InputIterator, InputIterator, Compare const&) ->
|
||||
multiset< typename iterator_traits<InputIterator>::value_type, Compare>;
|
||||
|
||||
template <typename InputIterator, typename Compare, typename Allocator>
|
||||
multiset(ordered_range_t, InputIterator, InputIterator, Compare const&, Allocator const&) ->
|
||||
multiset<typename iterator_traits<InputIterator>::value_type, Compare, Allocator>;
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
} //namespace container {
|
||||
|
|
|
@ -118,11 +118,11 @@ class small_vector_allocator
|
|||
typedef typename allocator_traits<Allocator>::propagate_on_container_move_assignment propagate_on_container_move_assignment;
|
||||
typedef typename allocator_traits<Allocator>::propagate_on_container_swap propagate_on_container_swap;
|
||||
//! An integral constant with member `value == false`
|
||||
typedef BOOST_CONTAINER_IMPDEF(container_detail::bool_<false>) is_always_equal;
|
||||
typedef BOOST_CONTAINER_IMPDEF(dtl::bool_<false>) is_always_equal;
|
||||
//! An integral constant with member `value == true`
|
||||
typedef BOOST_CONTAINER_IMPDEF(container_detail::bool_<true>) is_partially_propagable;
|
||||
typedef BOOST_CONTAINER_IMPDEF(dtl::bool_<true>) is_partially_propagable;
|
||||
|
||||
BOOST_CONTAINER_DOCIGN(typedef container_detail::version_type<small_vector_allocator BOOST_CONTAINER_I 1> version;)
|
||||
BOOST_CONTAINER_DOCIGN(typedef dtl::version_type<small_vector_allocator BOOST_CONTAINER_I 1> version;)
|
||||
|
||||
//!Obtains an small_vector_allocator that allocates
|
||||
//!objects of type T2
|
||||
|
@ -282,7 +282,8 @@ class small_vector_allocator
|
|||
pointer internal_storage() const
|
||||
{
|
||||
typedef typename Allocator::value_type value_type;
|
||||
typedef container_detail::vector_alloc_holder< small_vector_allocator<Allocator> > vector_alloc_holder_t;
|
||||
typedef typename allocator_traits_type::size_type size_type;
|
||||
typedef vector_alloc_holder< small_vector_allocator<Allocator>, size_type > vector_alloc_holder_t;
|
||||
typedef vector<value_type, small_vector_allocator<Allocator> > vector_base;
|
||||
typedef small_vector_base<value_type, Allocator> derived_type;
|
||||
//
|
||||
|
@ -337,7 +338,7 @@ class small_vector_base
|
|||
pointer internal_storage() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
return boost::intrusive::pointer_traits<pointer>::pointer_to
|
||||
(*const_cast<T*>(static_cast<const T*>(static_cast<const void*>(&m_storage_start))));
|
||||
(*const_cast<T*>(static_cast<const T*>(static_cast<const void*>(m_storage_start.data))));
|
||||
}
|
||||
|
||||
typedef vector<T, small_vector_allocator<SecondaryAllocator> > base_type;
|
||||
|
@ -345,12 +346,11 @@ class small_vector_base
|
|||
const base_type &as_base() const { return static_cast<const base_type&>(*this); }
|
||||
|
||||
public:
|
||||
typedef typename container_detail::aligned_storage
|
||||
<sizeof(T), container_detail::alignment_of<T>::value>::type storage_type;
|
||||
typedef typename dtl::aligned_storage
|
||||
<sizeof(T), dtl::alignment_of<T>::value>::type storage_type;
|
||||
typedef small_vector_allocator<SecondaryAllocator> allocator_type;
|
||||
|
||||
protected:
|
||||
typedef typename base_type::initial_capacity_t initial_capacity_t;
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE explicit small_vector_base(initial_capacity_t, std::size_t initial_capacity)
|
||||
: base_type(initial_capacity_t(), this->internal_storage(), initial_capacity)
|
||||
|
@ -419,7 +419,7 @@ struct small_vector_storage_calculator
|
|||
{
|
||||
typedef small_vector_base<T, Allocator> svh_type;
|
||||
typedef vector<T, small_vector_allocator<Allocator> > svhb_type;
|
||||
static const std::size_t s_align = container_detail::alignment_of<Storage>::value;
|
||||
static const std::size_t s_align = dtl::alignment_of<Storage>::value;
|
||||
static const std::size_t s_size = sizeof(Storage);
|
||||
static const std::size_t svh_sizeof = sizeof(svh_type);
|
||||
static const std::size_t svhb_sizeof = sizeof(svhb_type);
|
||||
|
@ -481,7 +481,6 @@ class small_vector : public small_vector_base<T, Allocator>
|
|||
|
||||
BOOST_COPYABLE_AND_MOVABLE(small_vector)
|
||||
|
||||
typedef typename base_type::initial_capacity_t initial_capacity_t;
|
||||
typedef allocator_traits<typename base_type::allocator_type> allocator_traits_type;
|
||||
|
||||
public:
|
||||
|
@ -507,7 +506,7 @@ class small_vector : public small_vector_base<T, Allocator>
|
|||
|
||||
public:
|
||||
BOOST_CONTAINER_FORCEINLINE small_vector()
|
||||
BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value)
|
||||
BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value)
|
||||
: base_type(initial_capacity_t(), internal_capacity())
|
||||
{}
|
||||
|
||||
|
@ -541,18 +540,18 @@ class small_vector : public small_vector_base<T, Allocator>
|
|||
|
||||
template <class InIt>
|
||||
BOOST_CONTAINER_FORCEINLINE small_vector(InIt first, InIt last
|
||||
BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename container_detail::disable_if_c
|
||||
< container_detail::is_convertible<InIt BOOST_MOVE_I size_type>::value
|
||||
BOOST_MOVE_I container_detail::nat >::type * = 0)
|
||||
BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename dtl::disable_if_c
|
||||
< dtl::is_convertible<InIt BOOST_MOVE_I size_type>::value
|
||||
BOOST_MOVE_I dtl::nat >::type * = 0)
|
||||
)
|
||||
: base_type(initial_capacity_t(), internal_capacity())
|
||||
{ this->assign(first, last); }
|
||||
|
||||
template <class InIt>
|
||||
BOOST_CONTAINER_FORCEINLINE small_vector(InIt first, InIt last, const allocator_type& a
|
||||
BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename container_detail::disable_if_c
|
||||
< container_detail::is_convertible<InIt BOOST_MOVE_I size_type>::value
|
||||
BOOST_MOVE_I container_detail::nat >::type * = 0)
|
||||
BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename dtl::disable_if_c
|
||||
< dtl::is_convertible<InIt BOOST_MOVE_I size_type>::value
|
||||
BOOST_MOVE_I dtl::nat >::type * = 0)
|
||||
)
|
||||
: base_type(initial_capacity_t(), internal_capacity(), a)
|
||||
{ this->assign(first, last); }
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace boost { namespace container {
|
|||
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template<class T, std::size_t N>
|
||||
class static_storage_allocator
|
||||
|
@ -51,17 +51,17 @@ class static_storage_allocator
|
|||
{ return *this; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE T* internal_storage() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return const_cast<T*>(static_cast<const T*>(static_cast<const void*>(&storage))); }
|
||||
{ return const_cast<T*>(static_cast<const T*>(static_cast<const void*>(storage.data))); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE T* internal_storage() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return static_cast<T*>(static_cast<void*>(&storage)); }
|
||||
{ return static_cast<T*>(static_cast<void*>(storage.data)); }
|
||||
|
||||
static const std::size_t internal_capacity = N;
|
||||
|
||||
std::size_t max_size() const
|
||||
{ return N; }
|
||||
|
||||
typedef boost::container::container_detail::version_type<static_storage_allocator, 0> version;
|
||||
typedef boost::container::dtl::version_type<static_storage_allocator, 0> version;
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator==(const static_storage_allocator &, const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return false; }
|
||||
|
@ -73,7 +73,7 @@ class static_storage_allocator
|
|||
typename aligned_storage<sizeof(T)*N, alignment_of<T>::value>::type storage;
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
|
@ -103,10 +103,10 @@ class static_storage_allocator
|
|||
//!@tparam Capacity The maximum number of elements static_vector can store, fixed at compile time.
|
||||
template <typename Value, std::size_t Capacity>
|
||||
class static_vector
|
||||
: public vector<Value, container_detail::static_storage_allocator<Value, Capacity> >
|
||||
: public vector<Value, dtl::static_storage_allocator<Value, Capacity> >
|
||||
{
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
typedef vector<Value, container_detail::static_storage_allocator<Value, Capacity> > base_t;
|
||||
typedef vector<Value, dtl::static_storage_allocator<Value, Capacity> > base_t;
|
||||
|
||||
BOOST_COPYABLE_AND_MOVABLE(static_vector)
|
||||
|
||||
|
@ -114,7 +114,7 @@ class static_vector
|
|||
friend class static_vector;
|
||||
|
||||
public:
|
||||
typedef container_detail::static_storage_allocator<Value, Capacity> allocator_type;
|
||||
typedef dtl::static_storage_allocator<Value, Capacity> allocator_type;
|
||||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
public:
|
||||
|
@ -259,7 +259,7 @@ public:
|
|||
{}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE static_vector(BOOST_RV_REF(static_vector) other, const allocator_type &)
|
||||
BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<value_type>::value)
|
||||
BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<value_type>::value)
|
||||
: base_t(BOOST_MOVE_BASE(base_t, other))
|
||||
{}
|
||||
|
||||
|
@ -294,7 +294,7 @@ public:
|
|||
//! @par Complexity
|
||||
//! Linear O(N).
|
||||
BOOST_CONTAINER_FORCEINLINE static_vector(BOOST_RV_REF(static_vector) other)
|
||||
BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<value_type>::value)
|
||||
BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<value_type>::value)
|
||||
: base_t(BOOST_MOVE_BASE(base_t, other))
|
||||
{}
|
||||
|
||||
|
@ -1228,7 +1228,7 @@ inline void swap(static_vector<V, C1> & x, static_vector<V, C2> & y);
|
|||
|
||||
template<typename V, std::size_t C1, std::size_t C2>
|
||||
inline void swap(static_vector<V, C1> & x, static_vector<V, C2> & y
|
||||
, typename container_detail::enable_if_c< C1 != C2>::type * = 0)
|
||||
, typename dtl::enable_if_c< C1 != C2>::type * = 0)
|
||||
{
|
||||
x.swap(y);
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -11,9 +11,9 @@
|
|||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/functional/hash/detail/float_functions.hpp>
|
||||
#include <boost/functional/hash/detail/limits.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/container_hash/detail/float_functions.hpp>
|
||||
#include <boost/container_hash/detail/limits.hpp>
|
||||
#include <boost/core/enable_if.hpp>
|
||||
#include <boost/integer/static_log2.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/assert.hpp>
|
|
@ -18,12 +18,11 @@
|
|||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/functional/hash/hash.hpp>
|
||||
#include <boost/container_hash/hash.hpp>
|
||||
#include <boost/detail/container_fwd.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/core/enable_if.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <vector>
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_ARRAY)
|
||||
# include <array>
|
||||
|
@ -72,6 +71,56 @@ namespace boost
|
|||
return seed;
|
||||
}
|
||||
|
||||
inline std::size_t hash_range(
|
||||
std::vector<bool>::iterator first,
|
||||
std::vector<bool>::iterator last)
|
||||
{
|
||||
std::size_t seed = 0;
|
||||
|
||||
for(; first != last; ++first)
|
||||
{
|
||||
hash_combine<bool>(seed, *first);
|
||||
}
|
||||
|
||||
return seed;
|
||||
}
|
||||
|
||||
inline std::size_t hash_range(
|
||||
std::vector<bool>::const_iterator first,
|
||||
std::vector<bool>::const_iterator last)
|
||||
{
|
||||
std::size_t seed = 0;
|
||||
|
||||
for(; first != last; ++first)
|
||||
{
|
||||
hash_combine<bool>(seed, *first);
|
||||
}
|
||||
|
||||
return seed;
|
||||
}
|
||||
|
||||
inline void hash_range(
|
||||
std::size_t& seed,
|
||||
std::vector<bool>::iterator first,
|
||||
std::vector<bool>::iterator last)
|
||||
{
|
||||
for(; first != last; ++first)
|
||||
{
|
||||
hash_combine<bool>(seed, *first);
|
||||
}
|
||||
}
|
||||
|
||||
inline void hash_range(
|
||||
std::size_t& seed,
|
||||
std::vector<bool>::const_iterator first,
|
||||
std::vector<bool>::const_iterator last)
|
||||
{
|
||||
for(; first != last; ++first)
|
||||
{
|
||||
hash_combine<bool>(seed, *first);
|
||||
}
|
||||
}
|
||||
|
||||
template <class T, class A>
|
||||
std::size_t hash_value(std::vector<T, A> const& v)
|
||||
{
|
||||
|
@ -171,19 +220,66 @@ namespace boost
|
|||
return boost::hash_detail::hash_tuple(v);
|
||||
}
|
||||
|
||||
# define BOOST_HASH_TUPLE_F(z, n, _) \
|
||||
template< \
|
||||
BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \
|
||||
> \
|
||||
inline std::size_t hash_value(std::tuple< \
|
||||
BOOST_PP_ENUM_PARAMS_Z(z, n, A) \
|
||||
> const& v) \
|
||||
{ \
|
||||
return boost::hash_detail::hash_tuple(v); \
|
||||
template<typename A0>
|
||||
inline std::size_t hash_value(std::tuple<A0> const& v)
|
||||
{
|
||||
return boost::hash_detail::hash_tuple(v);
|
||||
}
|
||||
|
||||
template<typename A0, typename A1>
|
||||
inline std::size_t hash_value(std::tuple<A0, A1> const& v)
|
||||
{
|
||||
return boost::hash_detail::hash_tuple(v);
|
||||
}
|
||||
|
||||
template<typename A0, typename A1, typename A2>
|
||||
inline std::size_t hash_value(std::tuple<A0, A1, A2> const& v)
|
||||
{
|
||||
return boost::hash_detail::hash_tuple(v);
|
||||
}
|
||||
|
||||
template<typename A0, typename A1, typename A2, typename A3>
|
||||
inline std::size_t hash_value(std::tuple<A0, A1, A2, A3> const& v)
|
||||
{
|
||||
return boost::hash_detail::hash_tuple(v);
|
||||
}
|
||||
|
||||
template<typename A0, typename A1, typename A2, typename A3, typename A4>
|
||||
inline std::size_t hash_value(std::tuple<A0, A1, A2, A3, A4> const& v)
|
||||
{
|
||||
return boost::hash_detail::hash_tuple(v);
|
||||
}
|
||||
|
||||
template<typename A0, typename A1, typename A2, typename A3, typename A4, typename A5>
|
||||
inline std::size_t hash_value(std::tuple<A0, A1, A2, A3, A4, A5> const& v)
|
||||
{
|
||||
return boost::hash_detail::hash_tuple(v);
|
||||
}
|
||||
|
||||
template<typename A0, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
|
||||
inline std::size_t hash_value(std::tuple<A0, A1, A2, A3, A4, A5, A6> const& v)
|
||||
{
|
||||
return boost::hash_detail::hash_tuple(v);
|
||||
}
|
||||
|
||||
template<typename A0, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
|
||||
inline std::size_t hash_value(std::tuple<A0, A1, A2, A3, A4, A5, A6, A7> const& v)
|
||||
{
|
||||
return boost::hash_detail::hash_tuple(v);
|
||||
}
|
||||
|
||||
template<typename A0, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
|
||||
inline std::size_t hash_value(std::tuple<A0, A1, A2, A3, A4, A5, A6, A7, A8> const& v)
|
||||
{
|
||||
return boost::hash_detail::hash_tuple(v);
|
||||
}
|
||||
|
||||
template<typename A0, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
|
||||
inline std::size_t hash_value(std::tuple<A0, A1, A2, A3, A4, A5, A6, A7, A8, A9> const& v)
|
||||
{
|
||||
return boost::hash_detail::hash_tuple(v);
|
||||
}
|
||||
|
||||
BOOST_PP_REPEAT_FROM_TO(1, 11, BOOST_HASH_TUPLE_F, _)
|
||||
# undef BOOST_HASH_TUPLE_F
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -16,14 +16,14 @@
|
|||
#if !defined(BOOST_FUNCTIONAL_HASH_HASH_HPP)
|
||||
#define BOOST_FUNCTIONAL_HASH_HASH_HPP
|
||||
|
||||
#include <boost/functional/hash/hash_fwd.hpp>
|
||||
#include <boost/container_hash/hash_fwd.hpp>
|
||||
#include <functional>
|
||||
#include <boost/functional/hash/detail/hash_float.hpp>
|
||||
#include <boost/container_hash/detail/hash_float.hpp>
|
||||
#include <string>
|
||||
#include <boost/limits.hpp>
|
||||
#include <boost/type_traits/is_enum.hpp>
|
||||
#include <boost/type_traits/is_integral.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/core/enable_if.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
|
||||
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
|
@ -34,6 +34,10 @@
|
|||
#include <typeindex>
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR)
|
||||
#include <system_error>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
#pragma warning(push)
|
||||
|
||||
|
@ -58,6 +62,58 @@
|
|||
# define BOOST_FUNCTIONAL_HASH_ROTL32(x, r) (x << r) | (x >> (32 - r))
|
||||
#endif
|
||||
|
||||
// Detect whether standard library has C++17 headers
|
||||
|
||||
#if !defined(BOOST_HASH_CXX17)
|
||||
# if defined(BOOST_MSVC)
|
||||
# if defined(_HAS_CXX17) && _HAS_CXX17
|
||||
# define BOOST_HASH_CXX17 1
|
||||
# endif
|
||||
# elif defined(__cplusplus) && __cplusplus >= 201703
|
||||
# define BOOST_HASH_CXX17 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_HASH_CXX17)
|
||||
# define BOOST_HASH_CXX17 0
|
||||
#endif
|
||||
|
||||
#if BOOST_HASH_CXX17 && defined(__has_include)
|
||||
# if !defined(BOOST_HASH_HAS_STRING_VIEW) && __has_include(<string_view>)
|
||||
# define BOOST_HASH_HAS_STRING_VIEW 1
|
||||
# endif
|
||||
# if !defined(BOOST_HASH_HAS_OPTIONAL) && __has_include(<optional>)
|
||||
# define BOOST_HASH_HAS_OPTIONAL 1
|
||||
# endif
|
||||
# if !defined(BOOST_HASH_HAS_VARIANT) && __has_include(<variant>)
|
||||
# define BOOST_HASH_HAS_VARIANT 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_HASH_HAS_STRING_VIEW)
|
||||
# define BOOST_HASH_HAS_STRING_VIEW 0
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_HASH_HAS_OPTIONAL)
|
||||
# define BOOST_HASH_HAS_OPTIONAL 0
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_HASH_HAS_VARIANT)
|
||||
# define BOOST_HASH_HAS_VARIANT 0
|
||||
#endif
|
||||
|
||||
#if BOOST_HASH_HAS_STRING_VIEW
|
||||
# include <string_view>
|
||||
#endif
|
||||
|
||||
#if BOOST_HASH_HAS_OPTIONAL
|
||||
# include <optional>
|
||||
#endif
|
||||
|
||||
#if BOOST_HASH_HAS_VARIANT
|
||||
# include <variant>
|
||||
#endif
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace hash_detail
|
||||
|
@ -176,13 +232,35 @@ namespace boost
|
|||
std::size_t hash_value(
|
||||
std::basic_string<Ch, std::BOOST_HASH_CHAR_TRAITS<Ch>, A> const&);
|
||||
|
||||
#if BOOST_HASH_HAS_STRING_VIEW
|
||||
template <class Ch>
|
||||
std::size_t hash_value(
|
||||
std::basic_string_view<Ch, std::BOOST_HASH_CHAR_TRAITS<Ch> > const&);
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
typename boost::hash_detail::float_numbers<T>::type hash_value(T);
|
||||
|
||||
#if BOOST_HASH_HAS_OPTIONAL
|
||||
template <typename T>
|
||||
std::size_t hash_value(std::optional<T> const&);
|
||||
#endif
|
||||
|
||||
#if BOOST_HASH_HAS_VARIANT
|
||||
std::size_t hash_value(std::monostate);
|
||||
template <typename... Types>
|
||||
std::size_t hash_value(std::variant<Types...> const&);
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX)
|
||||
std::size_t hash_value(std::type_index);
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR)
|
||||
std::size_t hash_value(std::error_code const&);
|
||||
std::size_t hash_value(std::error_condition const&);
|
||||
#endif
|
||||
|
||||
// Implementation
|
||||
|
||||
namespace hash_detail
|
||||
|
@ -410,12 +488,49 @@ namespace boost
|
|||
return hash_range(v.begin(), v.end());
|
||||
}
|
||||
|
||||
#if BOOST_HASH_HAS_STRING_VIEW
|
||||
template <class Ch>
|
||||
inline std::size_t hash_value(
|
||||
std::basic_string_view<Ch, std::BOOST_HASH_CHAR_TRAITS<Ch> > const& v)
|
||||
{
|
||||
return hash_range(v.begin(), v.end());
|
||||
}
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
typename boost::hash_detail::float_numbers<T>::type hash_value(T v)
|
||||
{
|
||||
return boost::hash_detail::float_hash_value(v);
|
||||
}
|
||||
|
||||
#if BOOST_HASH_HAS_OPTIONAL
|
||||
template <typename T>
|
||||
inline std::size_t hash_value(std::optional<T> const& v) {
|
||||
if (!v) {
|
||||
// Arbitray value for empty optional.
|
||||
return 0x12345678;
|
||||
} else {
|
||||
boost::hash<T> hf;
|
||||
return hf(*v);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if BOOST_HASH_HAS_VARIANT
|
||||
inline std::size_t hash_value(std::monostate) {
|
||||
return 0x87654321;
|
||||
}
|
||||
|
||||
template <typename... Types>
|
||||
inline std::size_t hash_value(std::variant<Types...> const& v) {
|
||||
std::size_t seed = 0;
|
||||
hash_combine(seed, v.index());
|
||||
std::visit([&seed](auto&& x) { hash_combine(seed, x); }, v);
|
||||
return seed;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX)
|
||||
inline std::size_t hash_value(std::type_index v)
|
||||
{
|
||||
|
@ -423,6 +538,22 @@ namespace boost
|
|||
}
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR)
|
||||
inline std::size_t hash_value(std::error_code const& v) {
|
||||
std::size_t seed = 0;
|
||||
hash_combine(seed, v.value());
|
||||
hash_combine(seed, &v.category());
|
||||
return seed;
|
||||
}
|
||||
|
||||
inline std::size_t hash_value(std::error_condition const& v) {
|
||||
std::size_t seed = 0;
|
||||
hash_combine(seed, v.value());
|
||||
hash_combine(seed, &v.category());
|
||||
return seed;
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// boost::hash
|
||||
//
|
||||
|
@ -459,6 +590,16 @@ namespace boost
|
|||
} \
|
||||
};
|
||||
|
||||
#define BOOST_HASH_SPECIALIZE_TEMPLATE_REF(type) \
|
||||
struct hash<type> \
|
||||
: public boost::hash_detail::hash_base<type> \
|
||||
{ \
|
||||
std::size_t operator()(type const& v) const \
|
||||
{ \
|
||||
return boost::hash_value(v); \
|
||||
} \
|
||||
};
|
||||
|
||||
BOOST_HASH_SPECIALIZE(bool)
|
||||
BOOST_HASH_SPECIALIZE(char)
|
||||
BOOST_HASH_SPECIALIZE(signed char)
|
||||
|
@ -494,6 +635,19 @@ namespace boost
|
|||
BOOST_HASH_SPECIALIZE_REF(std::basic_string<char32_t>)
|
||||
#endif
|
||||
|
||||
#if BOOST_HASH_HAS_STRING_VIEW
|
||||
BOOST_HASH_SPECIALIZE_REF(std::string_view)
|
||||
# if !defined(BOOST_NO_STD_WSTRING) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
|
||||
BOOST_HASH_SPECIALIZE_REF(std::wstring_view)
|
||||
# endif
|
||||
# if !defined(BOOST_NO_CXX11_CHAR16_T)
|
||||
BOOST_HASH_SPECIALIZE_REF(std::basic_string_view<char16_t>)
|
||||
# endif
|
||||
# if !defined(BOOST_NO_CXX11_CHAR32_T)
|
||||
BOOST_HASH_SPECIALIZE_REF(std::basic_string_view<char32_t>)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_LONG_LONG)
|
||||
BOOST_HASH_SPECIALIZE(boost::long_long_type)
|
||||
BOOST_HASH_SPECIALIZE(boost::ulong_long_type)
|
||||
|
@ -504,12 +658,24 @@ namespace boost
|
|||
BOOST_HASH_SPECIALIZE(boost::uint128_type)
|
||||
#endif
|
||||
|
||||
#if BOOST_HASH_HAS_OPTIONAL
|
||||
template <typename T>
|
||||
BOOST_HASH_SPECIALIZE_TEMPLATE_REF(std::optional<T>)
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_HASH_HAS_VARIANT)
|
||||
template <typename... T>
|
||||
BOOST_HASH_SPECIALIZE_TEMPLATE_REF(std::variant<T...>)
|
||||
BOOST_HASH_SPECIALIZE(std::monostate)
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX)
|
||||
BOOST_HASH_SPECIALIZE(std::type_index)
|
||||
#endif
|
||||
|
||||
#undef BOOST_HASH_SPECIALIZE
|
||||
#undef BOOST_HASH_SPECIALIZE_REF
|
||||
#undef BOOST_HASH_SPECIALIZE_TEMPLATE_REF
|
||||
|
||||
// Specializing boost::hash for pointers.
|
||||
|
||||
|
@ -591,5 +757,5 @@ namespace boost
|
|||
|
||||
#if !defined(BOOST_HASH_NO_EXTENSIONS) \
|
||||
&& !defined(BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP)
|
||||
#include <boost/functional/hash/extensions.hpp>
|
||||
#include <boost/container_hash/extensions.hpp>
|
||||
#endif
|
|
@ -10,13 +10,13 @@
|
|||
#if !defined(BOOST_FUNCTIONAL_HASH_FWD_HPP)
|
||||
#define BOOST_FUNCTIONAL_HASH_FWD_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/config/workaround.hpp>
|
||||
#include <cstddef>
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
|
@ -49,20 +49,20 @@ namespace boost {
|
|||
namespace detail {
|
||||
|
||||
template<class T>
|
||||
class addressof_ref {
|
||||
class addrof_ref {
|
||||
public:
|
||||
BOOST_FORCEINLINE addressof_ref(T& o) BOOST_NOEXCEPT
|
||||
BOOST_FORCEINLINE addrof_ref(T& o) BOOST_NOEXCEPT
|
||||
: o_(o) { }
|
||||
BOOST_FORCEINLINE operator T&() const BOOST_NOEXCEPT {
|
||||
return o_;
|
||||
}
|
||||
private:
|
||||
addressof_ref& operator=(const addressof_ref&);
|
||||
addrof_ref& operator=(const addrof_ref&);
|
||||
T& o_;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct address_of {
|
||||
struct addrof {
|
||||
static BOOST_FORCEINLINE T* get(T& o, long) BOOST_NOEXCEPT {
|
||||
return reinterpret_cast<T*>(&
|
||||
const_cast<char&>(reinterpret_cast<const volatile char&>(o)));
|
||||
|
@ -76,38 +76,38 @@ struct address_of {
|
|||
#if !defined(BOOST_NO_CXX11_DECLTYPE) && \
|
||||
(defined(__INTEL_COMPILER) || \
|
||||
(defined(__clang__) && !defined(_LIBCPP_VERSION)))
|
||||
typedef decltype(nullptr) addressof_null_t;
|
||||
typedef decltype(nullptr) addrof_null_t;
|
||||
#else
|
||||
typedef std::nullptr_t addressof_null_t;
|
||||
typedef std::nullptr_t addrof_null_t;
|
||||
#endif
|
||||
|
||||
template<>
|
||||
struct address_of<addressof_null_t> {
|
||||
typedef addressof_null_t type;
|
||||
struct addrof<addrof_null_t> {
|
||||
typedef addrof_null_t type;
|
||||
static BOOST_FORCEINLINE type* get(type& o, int) BOOST_NOEXCEPT {
|
||||
return &o;
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct address_of<const addressof_null_t> {
|
||||
typedef const addressof_null_t type;
|
||||
struct addrof<const addrof_null_t> {
|
||||
typedef const addrof_null_t type;
|
||||
static BOOST_FORCEINLINE type* get(type& o, int) BOOST_NOEXCEPT {
|
||||
return &o;
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct address_of<volatile addressof_null_t> {
|
||||
typedef volatile addressof_null_t type;
|
||||
struct addrof<volatile addrof_null_t> {
|
||||
typedef volatile addrof_null_t type;
|
||||
static BOOST_FORCEINLINE type* get(type& o, int) BOOST_NOEXCEPT {
|
||||
return &o;
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct address_of<const volatile addressof_null_t> {
|
||||
typedef const volatile addressof_null_t type;
|
||||
struct addrof<const volatile addrof_null_t> {
|
||||
typedef const volatile addrof_null_t type;
|
||||
static BOOST_FORCEINLINE type* get(type& o, int) BOOST_NOEXCEPT {
|
||||
return &o;
|
||||
}
|
||||
|
@ -127,9 +127,9 @@ addressof(T& o) BOOST_NOEXCEPT
|
|||
{
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) || \
|
||||
BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5120)
|
||||
return detail::address_of<T>::get(o, 0);
|
||||
return boost::detail::addrof<T>::get(o, 0);
|
||||
#else
|
||||
return detail::address_of<T>::get(detail::addressof_ref<T>(o), 0);
|
||||
return boost::detail::addrof<T>::get(boost::detail::addrof_ref<T>(o), 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -137,14 +137,14 @@ addressof(T& o) BOOST_NOEXCEPT
|
|||
namespace detail {
|
||||
|
||||
template<class T>
|
||||
struct addressof_result {
|
||||
struct addrof_result {
|
||||
typedef T* type;
|
||||
};
|
||||
|
||||
} /* detail */
|
||||
|
||||
template<class T, std::size_t N>
|
||||
BOOST_FORCEINLINE typename detail::addressof_result<T[N]>::type
|
||||
BOOST_FORCEINLINE typename boost::detail::addrof_result<T[N]>::type
|
||||
addressof(T (&o)[N]) BOOST_NOEXCEPT
|
||||
{
|
||||
return &o;
|
||||
|
@ -170,79 +170,79 @@ const T (*addressof(const T (&o)[N]) BOOST_NOEXCEPT)[N]
|
|||
namespace detail {
|
||||
|
||||
template<class T>
|
||||
T addressof_declval() BOOST_NOEXCEPT;
|
||||
T addrof_declval() BOOST_NOEXCEPT;
|
||||
|
||||
template<class>
|
||||
struct addressof_void {
|
||||
struct addrof_void {
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
template<class T, class E = void>
|
||||
struct addressof_member_operator {
|
||||
struct addrof_member_operator {
|
||||
static constexpr bool value = false;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct addressof_member_operator<T, typename
|
||||
addressof_void<decltype(addressof_declval<T&>().operator&())>::type> {
|
||||
struct addrof_member_operator<T, typename
|
||||
addrof_void<decltype(addrof_declval<T&>().operator&())>::type> {
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_INTEL, < 1600)
|
||||
struct addressof_addressable { };
|
||||
struct addrof_addressable { };
|
||||
|
||||
addressof_addressable*
|
||||
operator&(addressof_addressable&) BOOST_NOEXCEPT;
|
||||
addrof_addressable*
|
||||
operator&(addrof_addressable&) BOOST_NOEXCEPT;
|
||||
#endif
|
||||
|
||||
template<class T, class E = void>
|
||||
struct addressof_non_member_operator {
|
||||
struct addrof_non_member_operator {
|
||||
static constexpr bool value = false;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct addressof_non_member_operator<T, typename
|
||||
addressof_void<decltype(operator&(addressof_declval<T&>()))>::type> {
|
||||
struct addrof_non_member_operator<T, typename
|
||||
addrof_void<decltype(operator&(addrof_declval<T&>()))>::type> {
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
|
||||
template<class T, class E = void>
|
||||
struct addressof_expression {
|
||||
struct addrof_expression {
|
||||
static constexpr bool value = false;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct addressof_expression<T,
|
||||
typename addressof_void<decltype(&addressof_declval<T&>())>::type> {
|
||||
struct addrof_expression<T,
|
||||
typename addrof_void<decltype(&addrof_declval<T&>())>::type> {
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct addressof_is_constexpr {
|
||||
static constexpr bool value = addressof_expression<T>::value &&
|
||||
!addressof_member_operator<T>::value &&
|
||||
!addressof_non_member_operator<T>::value;
|
||||
struct addrof_is_constexpr {
|
||||
static constexpr bool value = addrof_expression<T>::value &&
|
||||
!addrof_member_operator<T>::value &&
|
||||
!addrof_non_member_operator<T>::value;
|
||||
};
|
||||
|
||||
template<bool E, class T>
|
||||
struct addressof_if { };
|
||||
struct addrof_if { };
|
||||
|
||||
template<class T>
|
||||
struct addressof_if<true, T> {
|
||||
struct addrof_if<true, T> {
|
||||
typedef T* type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
BOOST_FORCEINLINE
|
||||
typename addressof_if<!addressof_is_constexpr<T>::value, T>::type
|
||||
typename addrof_if<!addrof_is_constexpr<T>::value, T>::type
|
||||
addressof(T& o) BOOST_NOEXCEPT
|
||||
{
|
||||
return address_of<T>::get(addressof_ref<T>(o), 0);
|
||||
return addrof<T>::get(addrof_ref<T>(o), 0);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
constexpr BOOST_FORCEINLINE
|
||||
typename addressof_if<addressof_is_constexpr<T>::value, T>::type
|
||||
typename addrof_if<addrof_is_constexpr<T>::value, T>::type
|
||||
addressof(T& o) BOOST_NOEXCEPT
|
||||
{
|
||||
return &o;
|
||||
|
@ -254,7 +254,7 @@ template<class T>
|
|||
constexpr BOOST_FORCEINLINE T*
|
||||
addressof(T& o) BOOST_NOEXCEPT
|
||||
{
|
||||
return detail::addressof(o);
|
||||
return boost::detail::addressof(o);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -34,6 +34,17 @@
|
|||
#endif
|
||||
|
||||
#include <boost/config.hpp>
|
||||
//
|
||||
// For the following code we get several warnings along the lines of:
|
||||
//
|
||||
// boost/cstdint.hpp:428:35: error: use of C99 long long integer constant
|
||||
//
|
||||
// So we declare this a system header to suppress these warnings.
|
||||
// See also https://github.com/boostorg/config/issues/190
|
||||
//
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 4)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
//
|
||||
// Note that GLIBC is a bit inconsistent about whether int64_t is defined or not
|
||||
|
@ -60,7 +71,7 @@
|
|||
# include <stdint.h>
|
||||
|
||||
// There is a bug in Cygwin two _C macros
|
||||
# if defined(__STDC_CONSTANT_MACROS) && defined(__CYGWIN__)
|
||||
# if defined(INTMAX_C) && defined(__CYGWIN__)
|
||||
# undef INTMAX_C
|
||||
# undef UINTMAX_C
|
||||
# define INTMAX_C(c) c##LL
|
||||
|
@ -408,16 +419,6 @@ INT#_C macros if they're not already defined (John Maddock).
|
|||
#if !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && \
|
||||
(!defined(INT8_C) || !defined(INT16_C) || !defined(INT32_C) || !defined(INT64_C))
|
||||
//
|
||||
// For the following code we get several warnings along the lines of:
|
||||
//
|
||||
// boost/cstdint.hpp:428:35: error: use of C99 long long integer constant
|
||||
//
|
||||
// So we declare this a system header to suppress these warnings.
|
||||
//
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 4)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
//
|
||||
// Undef the macros as a precaution, since we may get here if <stdint.h> has failed
|
||||
// to define them all, see https://svn.boost.org/trac/boost/ticket/12786
|
||||
//
|
||||
|
|
|
@ -3,5 +3,4 @@
|
|||
// 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)
|
||||
|
||||
#include <boost/functional/hash/hash.hpp>
|
||||
|
||||
#include <boost/container_hash/hash.hpp>
|
||||
|
|
|
@ -3,9 +3,4 @@
|
|||
// 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)
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/functional/hash/hash_fwd.hpp>
|
||||
#include <boost/container_hash/hash_fwd.hpp>
|
||||
|
|
|
@ -502,5 +502,3 @@ assign_if(const Predicate& pred, Type& object, const Type& src)
|
|||
}} // namespace boost icl
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -263,7 +263,8 @@ typename enable_if<is_interval<Type>, Type>::type
|
|||
span(const typename interval_traits<Type>::domain_type& left,
|
||||
const typename interval_traits<Type>::domain_type& right)
|
||||
{
|
||||
if(interval_traits<Type>::domain_compare()(left,right))
|
||||
typedef typename interval_traits<Type>::domain_compare domain_compare;
|
||||
if(domain_compare()(left,right))
|
||||
return construct<Type>(left, right);
|
||||
else
|
||||
return construct<Type>(right, left);
|
||||
|
@ -276,7 +277,8 @@ typename enable_if<is_static_right_open<Type>, Type>::type
|
|||
hull(const typename interval_traits<Type>::domain_type& left,
|
||||
const typename interval_traits<Type>::domain_type& right)
|
||||
{
|
||||
if(interval_traits<Type>::domain_compare()(left,right))
|
||||
typedef typename interval_traits<Type>::domain_compare domain_compare;
|
||||
if(domain_compare()(left,right))
|
||||
return construct<Type>(left, domain_next<Type>(right));
|
||||
else
|
||||
return construct<Type>(right, domain_next<Type>(left));
|
||||
|
@ -289,7 +291,7 @@ hull(const typename interval_traits<Type>::domain_type& left,
|
|||
{
|
||||
typedef typename interval_traits<Type>::domain_type domain_type;
|
||||
typedef typename interval_traits<Type>::domain_compare domain_compare;
|
||||
if(interval_traits<Type>::domain_compare()(left,right))
|
||||
if(domain_compare()(left,right))
|
||||
{
|
||||
BOOST_ASSERT((numeric_minimum<domain_type, domain_compare, is_numeric<domain_type>::value>
|
||||
::is_less_than(left) ));
|
||||
|
@ -308,7 +310,8 @@ typename enable_if<is_static_closed<Type>, Type>::type
|
|||
hull(const typename interval_traits<Type>::domain_type& left,
|
||||
const typename interval_traits<Type>::domain_type& right)
|
||||
{
|
||||
if(interval_traits<Type>::domain_compare()(left,right))
|
||||
typedef typename interval_traits<Type>::domain_compare domain_compare;
|
||||
if(domain_compare()(left,right))
|
||||
return construct<Type>(left, right);
|
||||
else
|
||||
return construct<Type>(right, left);
|
||||
|
@ -321,7 +324,7 @@ hull(const typename interval_traits<Type>::domain_type& left,
|
|||
{
|
||||
typedef typename interval_traits<Type>::domain_type domain_type;
|
||||
typedef typename interval_traits<Type>::domain_compare domain_compare;
|
||||
if(interval_traits<Type>::domain_compare()(left,right))
|
||||
if(domain_compare()(left,right))
|
||||
{
|
||||
BOOST_ASSERT((numeric_minimum<domain_type, domain_compare, is_numeric<domain_type>::value>
|
||||
::is_less_than(left) ));
|
||||
|
@ -342,7 +345,8 @@ typename enable_if<has_dynamic_bounds<Type>, Type>::type
|
|||
hull(const typename interval_traits<Type>::domain_type& left,
|
||||
const typename interval_traits<Type>::domain_type& right)
|
||||
{
|
||||
if(interval_traits<Type>::domain_compare()(left,right))
|
||||
typedef typename interval_traits<Type>::domain_compare domain_compare;
|
||||
if(domain_compare()(left,right))
|
||||
return construct<Type>(left, right, interval_bounds::closed());
|
||||
else
|
||||
return construct<Type>(right, left, interval_bounds::closed());
|
||||
|
@ -1474,4 +1478,3 @@ operator << (std::basic_ostream<CharType, CharTraits> &stream, Type const& objec
|
|||
}} // namespace icl boost
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ Copyright (c) 2010-2010: Joachim Faulhaber
|
|||
#ifndef BOOST_ICL_CONCEPT_INTERVAL_ASSOCIATOR_HPP_JOFA_100920
|
||||
#define BOOST_ICL_CONCEPT_INTERVAL_ASSOCIATOR_HPP_JOFA_100920
|
||||
|
||||
#include <boost/range/iterator_range.hpp>
|
||||
#include <boost/icl/type_traits/domain_type_of.hpp>
|
||||
#include <boost/icl/type_traits/interval_type_of.hpp>
|
||||
#include <boost/icl/type_traits/is_combinable.hpp>
|
||||
|
@ -1161,6 +1162,30 @@ elements_end(const Type& object)
|
|||
return typename Type::element_const_iterator(object.end());
|
||||
}
|
||||
|
||||
template<class Type>
|
||||
typename enable_if
|
||||
<mpl::and_< is_interval_container<Type>
|
||||
, mpl::not_<is_continuous_interval<typename Type::interval_type> > >,
|
||||
iterator_range<typename Type::element_iterator> >::type
|
||||
elements(Type& object)
|
||||
{
|
||||
return
|
||||
make_iterator_range( typename Type::element_iterator(object.begin())
|
||||
, typename Type::element_iterator(object.end()) );
|
||||
}
|
||||
|
||||
template<class Type>
|
||||
typename enable_if
|
||||
<mpl::and_< is_interval_container<Type>
|
||||
, mpl::not_<is_continuous_interval<typename Type::interval_type> > >,
|
||||
iterator_range<typename Type::element_const_iterator> >::type
|
||||
elements(Type const& object)
|
||||
{
|
||||
return
|
||||
make_iterator_range( typename Type::element_const_iterator(object.begin())
|
||||
, typename Type::element_const_iterator(object.end()) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
//- Reverse
|
||||
//--------------------------------------------------------------------------
|
||||
|
|
|
@ -18,6 +18,7 @@ Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
|
|||
#include <boost/icl/detail/design_config.hpp>
|
||||
#include <boost/icl/detail/on_absorbtion.hpp>
|
||||
#include <boost/icl/detail/interval_map_algo.hpp>
|
||||
#include <boost/icl/detail/exclusive_less_than.hpp>
|
||||
|
||||
#include <boost/icl/associative_interval_container.hpp>
|
||||
|
||||
|
|
|
@ -437,7 +437,7 @@ inline void interval_base_set<SubType,DomainT,Compare,Interval,Alloc>
|
|||
if(!icl::is_empty(lead_gap))
|
||||
// [lead_gap--- . . .
|
||||
// [prior_) [-- it_ ...
|
||||
this->_set.insert(prior(it_), lead_gap);
|
||||
this->_set.insert(cyclic_prior(*this, it_), lead_gap);
|
||||
|
||||
// . . . --------- . . . addend interval
|
||||
// [-- it_ --) has a common part with the first overval
|
||||
|
@ -592,5 +592,3 @@ struct is_interval_container<icl::interval_base_set<SubType,DomainT,Compare,Inte
|
|||
}} // namespace icl boost
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -16,12 +16,15 @@ namespace boost{namespace icl
|
|||
|
||||
/** \brief Performes an addition using a container's memberfunction add, when operator= is called. */
|
||||
template<class ContainerT> class add_iterator
|
||||
: public std::iterator<std::output_iterator_tag, void, void, void, void>
|
||||
{
|
||||
public:
|
||||
/// The container's type.
|
||||
typedef ContainerT container_type;
|
||||
typedef std::output_iterator_tag iterator_category;
|
||||
typedef void value_type;
|
||||
typedef void difference_type;
|
||||
typedef void pointer;
|
||||
typedef void reference;
|
||||
|
||||
/** An add_iterator is constructed with a container and a position
|
||||
that has to be maintained. */
|
||||
|
@ -57,12 +60,15 @@ inline add_iterator<ContainerT> adder(ContainerT& cont, IteratorT iter_)
|
|||
|
||||
/** \brief Performes an insertion using a container's memberfunction add, when operator= is called. */
|
||||
template<class ContainerT> class insert_iterator
|
||||
: public std::iterator<std::output_iterator_tag, void, void, void, void>
|
||||
{
|
||||
public:
|
||||
/// The container's type.
|
||||
typedef ContainerT container_type;
|
||||
typedef std::output_iterator_tag iterator_category;
|
||||
typedef void value_type;
|
||||
typedef void difference_type;
|
||||
typedef void pointer;
|
||||
typedef void reference;
|
||||
|
||||
/** An insert_iterator is constructed with a container and a position
|
||||
that has to be maintained. */
|
||||
|
|
|
@ -32,10 +32,10 @@ Copyright (c) 2007-2011: Joachim Faulhaber
|
|||
#include <boost/icl/type_traits/is_total.hpp>
|
||||
#include <boost/icl/type_traits/is_element_container.hpp>
|
||||
#include <boost/icl/type_traits/has_inverse.hpp>
|
||||
#include <boost/icl/type_traits/to_string.hpp>
|
||||
|
||||
#include <boost/icl/associative_element_container.hpp>
|
||||
#include <boost/icl/functors.hpp>
|
||||
#include <boost/icl/type_traits/to_string.hpp>
|
||||
|
||||
namespace boost{namespace icl
|
||||
{
|
||||
|
@ -700,4 +700,3 @@ struct type_to_string<icl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,
|
|||
}} // namespace icl boost
|
||||
|
||||
#endif // BOOST_ICL_MAP_HPP_JOFA_070519
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ Copyright (c) 2008-2009: Joachim Faulhaber
|
|||
#include <boost/mpl/or.hpp>
|
||||
#include <boost/mpl/and.hpp>
|
||||
#include <boost/mpl/not.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/icl/type_traits/no_type.hpp>
|
||||
|
||||
namespace boost{ namespace icl
|
||||
|
@ -35,7 +36,7 @@ namespace boost{ namespace icl
|
|||
typedef represents type;
|
||||
BOOST_STATIC_CONSTANT(bool,
|
||||
value = (mpl::and_< has_rep_type<Type>
|
||||
, is_same<typename Type::rep, Rep> >::value)
|
||||
, boost::is_same<typename Type::rep, Rep> >::value)
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -66,5 +67,3 @@ namespace boost{ namespace icl
|
|||
}} // namespace boost icl
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -48,5 +48,3 @@ inline std::size_t value_size<Type>::apply(const Type& value)
|
|||
}} // namespace boost icl
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -17,33 +17,20 @@
|
|||
#ifdef BOOST_MSVC
|
||||
|
||||
#pragma warning (push)
|
||||
//
|
||||
//'function' : resolved overload was found by argument-dependent lookup
|
||||
//A function found by argument-dependent lookup (Koenig lookup) was eventually
|
||||
//chosen by overload resolution.
|
||||
//
|
||||
//In Visual C++ .NET and earlier compilers, a different function would have
|
||||
//been called. To pick the original function, use an explicitly qualified name.
|
||||
//
|
||||
|
||||
//warning C4275: non dll-interface class 'x' used as base for
|
||||
//dll-interface class 'Y'
|
||||
#pragma warning (disable : 4275)
|
||||
//warning C4251: 'x' : class 'y' needs to have dll-interface to
|
||||
//be used by clients of class 'z'
|
||||
#pragma warning (disable : 4251)
|
||||
#pragma warning (disable : 4675)
|
||||
#pragma warning (disable : 4996)
|
||||
#pragma warning (disable : 4503)
|
||||
#pragma warning (disable : 4275) // non DLL-interface classkey "identifier" used as base for DLL-interface classkey "identifier"
|
||||
#pragma warning (disable : 4251) // "identifier" : class "type" needs to have dll-interface to be used by clients of class "type2"
|
||||
#pragma warning (disable : 4675) // "method" should be declared "static" and have exactly one parameter
|
||||
#pragma warning (disable : 4996) // "function": was declared deprecated
|
||||
#pragma warning (disable : 4503) // "identifier" : decorated name length exceeded, name was truncated
|
||||
#pragma warning (disable : 4284) // odd return type for operator->
|
||||
#pragma warning (disable : 4244) // possible loss of data
|
||||
#pragma warning (disable : 4521) ////Disable "multiple copy constructors specified"
|
||||
#pragma warning (disable : 4127) //conditional expression is constant
|
||||
#pragma warning (disable : 4146)
|
||||
#pragma warning (disable : 4146) // unary minus operator applied to unsigned type, result still unsigned
|
||||
#pragma warning (disable : 4267) //conversion from 'X' to 'Y', possible loss of data
|
||||
#pragma warning (disable : 4541) //'typeid' used on polymorphic type 'boost::exception' with /GR-
|
||||
#pragma warning (disable : 4512) //'typeid' used on polymorphic type 'boost::exception' with /GR-
|
||||
#pragma warning (disable : 4522)
|
||||
#pragma warning (disable : 4522) // "class" : multiple assignment operators specified
|
||||
#pragma warning (disable : 4706) //assignment within conditional expression
|
||||
#pragma warning (disable : 4710) // function not inlined
|
||||
#pragma warning (disable : 4714) // "function": marked as __forceinline not inlined
|
||||
|
|
|
@ -1,168 +0,0 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-2014. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/intrusive for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_DETAIL_POINTER_ELEMENT_HPP
|
||||
#define BOOST_INTRUSIVE_DETAIL_POINTER_ELEMENT_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
#endif //BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
namespace detail{
|
||||
|
||||
//////////////////////
|
||||
//struct first_param
|
||||
//////////////////////
|
||||
|
||||
template <typename T> struct first_param
|
||||
{ typedef void type; };
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
template <template <typename, typename...> class TemplateClass, typename T, typename... Args>
|
||||
struct first_param< TemplateClass<T, Args...> >
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
#else //C++03 compilers
|
||||
|
||||
template < template //0arg
|
||||
<class
|
||||
> class TemplateClass, class T
|
||||
>
|
||||
struct first_param
|
||||
< TemplateClass<T> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //1arg
|
||||
<class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //2arg
|
||||
<class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //3arg
|
||||
<class,class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1, class P2>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1, P2> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //4arg
|
||||
<class,class,class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1, class P2, class P3>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1, P2, P3> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //5arg
|
||||
<class,class,class,class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1, class P2, class P3, class P4>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1, P2, P3, P4> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //6arg
|
||||
<class,class,class,class,class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1, class P2, class P3, class P4, class P5>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1, P2, P3, P4, P5> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //7arg
|
||||
<class,class,class,class,class,class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1, class P2, class P3, class P4, class P5, class P6>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1, P2, P3, P4, P5, P6> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //8arg
|
||||
<class,class,class,class,class,class,class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1, class P2, class P3, class P4, class P5, class P6, class P7>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1, P2, P3, P4, P5, P6, P7> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //9arg
|
||||
<class,class,class,class,class,class,class,class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1, P2, P3, P4, P5, P6, P7, P8> >
|
||||
{ typedef T type; };
|
||||
|
||||
#endif //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
template <typename T>
|
||||
struct has_internal_pointer_element
|
||||
{
|
||||
template <typename X>
|
||||
static char test(int, typename X::element_type*);
|
||||
|
||||
template <typename X>
|
||||
static int test(...);
|
||||
|
||||
static const bool value = (1 == sizeof(test<T>(0, 0)));
|
||||
};
|
||||
|
||||
template<class Ptr, bool = has_internal_pointer_element<Ptr>::value>
|
||||
struct pointer_element_impl
|
||||
{
|
||||
typedef typename Ptr::element_type type;
|
||||
};
|
||||
|
||||
template<class Ptr>
|
||||
struct pointer_element_impl<Ptr, false>
|
||||
{
|
||||
typedef typename boost::intrusive::detail::first_param<Ptr>::type type;
|
||||
};
|
||||
|
||||
} //namespace detail{
|
||||
|
||||
template <typename Ptr>
|
||||
struct pointer_element
|
||||
{
|
||||
typedef typename ::boost::intrusive::detail::pointer_element_impl<Ptr>::type type;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct pointer_element<T*>
|
||||
{ typedef T type; };
|
||||
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
#endif // defined(BOOST_INTRUSIVE_DETAIL_POINTER_ELEMENT_HPP)
|
|
@ -1,47 +0,0 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-2014
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/intrusive for documentation.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_DETAIL_TO_RAW_POINTER_HPP
|
||||
#define BOOST_INTRUSIVE_DETAIL_TO_RAW_POINTER_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
#include <boost/intrusive/detail/pointer_element.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
namespace detail {
|
||||
|
||||
template <class T>
|
||||
BOOST_INTRUSIVE_FORCEINLINE T* to_raw_pointer(T* p)
|
||||
{ return p; }
|
||||
|
||||
template <class Pointer>
|
||||
BOOST_INTRUSIVE_FORCEINLINE typename boost::intrusive::pointer_element<Pointer>::type*
|
||||
to_raw_pointer(const Pointer &p)
|
||||
{ return boost::intrusive::detail::to_raw_pointer(p.operator->()); }
|
||||
|
||||
} //namespace detail
|
||||
} //namespace intrusive
|
||||
} //namespace boost
|
||||
|
||||
#include <boost/intrusive/detail/config_end.hpp>
|
||||
|
||||
#endif //BOOST_INTRUSIVE_DETAIL_UTILITIES_HPP
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue