forked from boostorg/container
Divided set benchmark in several smaller benchmark files
This commit is contained in:
1 parent
a4b839628a
commit
a4c0188173
23 files changed
+1700
-520
No files matched your search
@@ -113,8 +113,10 @@ struct if_
|
||||
|
||||
template <class Pair>
|
||||
struct select1st
|
||||
// : public std::unary_function<Pair, typename Pair::first_type>
|
||||
{
|
||||
typedef Pair argument_type;
|
||||
typedef typename Pair::first_type result_type;
|
||||
|
||||
template<class OtherPair>
|
||||
const typename Pair::first_type& operator()(const OtherPair& x) const
|
||||
{ return x.first; }
|
||||
@@ -126,8 +128,10 @@ struct select1st
|
||||
// identity is an extension: it is not part of the standard.
|
||||
template <class T>
|
||||
struct identity
|
||||
// : public std::unary_function<T,T>
|
||||
{
|
||||
typedef T argument_type;
|
||||
typedef T result_type;
|
||||
|
||||
typedef T type;
|
||||
const T& operator()(const T& x) const
|
||||
{ return x; }
|
||||
|
||||
@@ -30,8 +30,6 @@
|
||||
#include <boost/detail/no_exceptions_support.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
#include <cstddef>
|
||||
#include <functional> //std::unary_function
|
||||
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
@@ -252,8 +250,10 @@ class private_node_pool_impl
|
||||
};
|
||||
|
||||
struct is_between
|
||||
: std::unary_function<typename free_nodes_t::value_type, bool>
|
||||
{
|
||||
typedef typename free_nodes_t::value_type argument_type;
|
||||
typedef bool result_type;
|
||||
|
||||
is_between(const void *addr, std::size_t size)
|
||||
: beg_(static_cast<const char *>(addr)), end_(beg_+size)
|
||||
{}
|
||||
|
||||
@@ -492,19 +492,22 @@ class basic_string
|
||||
|
||||
template <class Tr>
|
||||
struct Eq_traits
|
||||
: public std::binary_function<typename Tr::char_type,
|
||||
typename Tr::char_type,
|
||||
bool>
|
||||
{
|
||||
bool operator()(const typename Tr::char_type& x,
|
||||
const typename Tr::char_type& y) const
|
||||
//Compatibility with std::binary_function
|
||||
typedef typename Tr::char_type first_argument_type;
|
||||
typedef typename Tr::char_type second_argument_type;
|
||||
typedef bool result_type;
|
||||
|
||||
bool operator()(const first_argument_type& x, const second_argument_type& y) const
|
||||
{ return Tr::eq(x, y); }
|
||||
};
|
||||
|
||||
template <class Tr>
|
||||
struct Not_within_traits
|
||||
: public std::unary_function<typename Tr::char_type, bool>
|
||||
{
|
||||
typedef typename Tr::char_type argument_type;
|
||||
typedef bool result_type;
|
||||
|
||||
typedef const typename Tr::char_type* Pointer;
|
||||
const Pointer m_first;
|
||||
const Pointer m_last;
|
||||
|
||||
@@ -352,7 +352,7 @@ struct vector_alloc_holder
|
||||
size_type next_capacity(size_type additional_objects) const
|
||||
{
|
||||
return next_capacity_calculator
|
||||
<size_type, /*NextCapacityDouble*/NextCapacity60Percent>::
|
||||
<size_type, NextCapacityDouble/*NextCapacity60Percent*/>::
|
||||
get( allocator_traits_type::max_size(this->alloc())
|
||||
, this->m_capacity, additional_objects );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user