mirror of
https://github.com/boostorg/container.git
synced 2025-08-02 14:04:26 +02:00
Merge branch 'zerotypos-found-inspection_report' into develop
This commit is contained in:
@@ -4,8 +4,8 @@
|
|||||||
// @date Aug 14, 2011
|
// @date Aug 14, 2011
|
||||||
// @author Andrew Hundt <ATHundt@gmail.com>
|
// @author Andrew Hundt <ATHundt@gmail.com>
|
||||||
//
|
//
|
||||||
// (C) 2011-2013 Andrew Hundt <ATHundt@gmail.com>
|
// (C) Copyright 2011-2013 Andrew Hundt <ATHundt@gmail.com>
|
||||||
// (C) 2013-2013 Ion Gaztanaga
|
// (C) Copyright 2013-2013 Ion Gaztanaga
|
||||||
//
|
//
|
||||||
// Distributed under the Boost Software License, Version 1.0. (See
|
// Distributed under the Boost Software License, Version 1.0. (See
|
||||||
// accompanying file LICENSE_1_0.txt or copy at
|
// accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
@@ -107,8 +107,8 @@ struct insert_n_copies_proxy
|
|||||||
|
|
||||||
void copy_n_and_update(Allocator &, Iterator p, size_type n) const
|
void copy_n_and_update(Allocator &, Iterator p, size_type n) const
|
||||||
{
|
{
|
||||||
for (; 0 < n; --n, ++p){
|
for (; 0 < n; --n, ++p){
|
||||||
*p = v_;
|
*p = v_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -140,9 +140,9 @@ class new_allocator
|
|||||||
//!Throws std::bad_alloc if there is no enough memory
|
//!Throws std::bad_alloc if there is no enough memory
|
||||||
pointer allocate(size_type count)
|
pointer allocate(size_type count)
|
||||||
{
|
{
|
||||||
if(BOOST_UNLIKELY(count > this->max_size()))
|
if(BOOST_UNLIKELY(count > this->max_size()))
|
||||||
throw_bad_alloc();
|
throw_bad_alloc();
|
||||||
return static_cast<T*>(::operator new(count*sizeof(T)));
|
return static_cast<T*>(::operator new(count*sizeof(T)));
|
||||||
}
|
}
|
||||||
|
|
||||||
//!Deallocates previously allocated memory.
|
//!Deallocates previously allocated memory.
|
||||||
|
@@ -507,7 +507,7 @@ class small_vector : public small_vector_base<T, Allocator>
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
BOOST_CONTAINER_FORCEINLINE small_vector()
|
BOOST_CONTAINER_FORCEINLINE small_vector()
|
||||||
BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value)
|
BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value)
|
||||||
: base_type(initial_capacity_t(), internal_capacity())
|
: base_type(initial_capacity_t(), internal_capacity())
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
@@ -391,10 +391,10 @@ int main ()
|
|||||||
//Test std::pair value type as tree has workarounds to make old std::pair
|
//Test std::pair value type as tree has workarounds to make old std::pair
|
||||||
//implementations movable that can break things
|
//implementations movable that can break things
|
||||||
{
|
{
|
||||||
boost::container::map<pair_t, pair_t> s;
|
boost::container::map<pair_t, pair_t> s;
|
||||||
std::pair<const pair_t,pair_t> p;
|
std::pair<const pair_t,pair_t> p;
|
||||||
s.insert(p);
|
s.insert(p);
|
||||||
s.emplace(p);
|
s.emplace(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////
|
////////////////////////////////////
|
||||||
|
@@ -379,10 +379,10 @@ int main ()
|
|||||||
//Test std::pair value type as tree has workarounds to make old std::pair
|
//Test std::pair value type as tree has workarounds to make old std::pair
|
||||||
//implementations movable that can break things
|
//implementations movable that can break things
|
||||||
{
|
{
|
||||||
boost::container::set<std::pair<int,int> > s;
|
boost::container::set<std::pair<int,int> > s;
|
||||||
std::pair<int,int> p(0, 0);
|
std::pair<int,int> p(0, 0);
|
||||||
s.insert(p);
|
s.insert(p);
|
||||||
s.emplace(p);
|
s.emplace(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
test_merge_from_different_comparison();
|
test_merge_from_different_comparison();
|
||||||
|
Reference in New Issue
Block a user