Merge branch 'luzpaz-container-misc-typos' into develop

This commit is contained in:
Ion Gaztañaga
2018-11-10 23:34:40 +01:00
10 changed files with 16 additions and 15 deletions

View File

@@ -366,8 +366,8 @@ operations provide stronger exception safety guarantees than in vector:
[[erase] [no-throw unless copy/move construction/assignment of `T` throw (basic)] [no-throw]] [[erase] [no-throw unless copy/move construction/assignment of `T` throw (basic)] [no-throw]]
] ]
[*Memory overhead]. The C++ standard does not specifiy requirements on memory consumption, but virtually any implementation [*Memory overhead]. The C++ standard does not specify requirements on memory consumption, but virtually any implementation
of `vector` has the same behavior wih respect to memory usage: the memory allocated by a `vector` v with n elements of type T of `vector` has the same behavior with respect to memory usage: the memory allocated by a `vector` v with n elements of type T
is is
m[sub v] = c\u2219e, m[sub v] = c\u2219e,
@@ -1254,6 +1254,7 @@ use [*Boost.Container]? There are several reasons for that:
* Fixed bugs: * Fixed bugs:
* [@https://github.com/boostorg/container/issues/82 GitHub #82: ['"Function definition in header file"]]. * [@https://github.com/boostorg/container/issues/82 GitHub #82: ['"Function definition in header file"]].
* [@https://github.com/boostorg/container/issues/83 GitHub #83: ['"Iterator zero incrementing leads to assert on empty vector"]]. * [@https://github.com/boostorg/container/issues/83 GitHub #83: ['"Iterator zero incrementing leads to assert on empty vector"]].
* [@https://github.com/boostorg/container/pull/85 GitHub #85: ['"container: misc-typos"]].
* [@https://github.com/boostorg/container/pull/86 GitHub #86: ['"Add missing warning re-enabling include"]]. * [@https://github.com/boostorg/container/pull/86 GitHub #86: ['"Add missing warning re-enabling include"]].
[endsect] [endsect]

View File

@@ -31,7 +31,7 @@ int main ()
list<non_copy_movable> l; list<non_copy_movable> l;
non_copy_movable ncm; non_copy_movable ncm;
//A new element will be built calling non_copy_movable(int) contructor //A new element will be built calling non_copy_movable(int) constructor
l.emplace(l.begin(), 0); l.emplace(l.begin(), 0);
assert(l.size() == 1); assert(l.size() == 1);

View File

@@ -151,7 +151,7 @@ struct allocator_traits
//! Allocator::void_pointer if such a type exists ; otherwise, pointer_traits<pointer>::rebind<void>. //! Allocator::void_pointer if such a type exists ; otherwise, pointer_traits<pointer>::rebind<void>.
//! //!
typedef see_documentation void_pointer; typedef see_documentation void_pointer;
//! Allocator::const_void_pointer if such a type exists ; otherwis e, pointer_traits<pointer>::rebind<const //! Allocator::const_void_pointer if such a type exists ; otherwise, pointer_traits<pointer>::rebind<const
//! //!
typedef see_documentation const_void_pointer; typedef see_documentation const_void_pointer;
//! Allocator::difference_type if such a type exists ; otherwise, pointer_traits<pointer>::difference_type. //! Allocator::difference_type if such a type exists ; otherwise, pointer_traits<pointer>::difference_type.

View File

@@ -837,7 +837,7 @@ class stable_vector
BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value
|| allocator_traits_type::is_always_equal::value) || allocator_traits_type::is_always_equal::value)
{ {
//for move constructor, no aliasing (&x != this) is assummed. //for move constructor, no aliasing (&x != this) is assumed.
BOOST_ASSERT(this != &x); BOOST_ASSERT(this != &x);
node_allocator_type &this_alloc = this->priv_node_alloc(); node_allocator_type &this_alloc = this->priv_node_alloc();
node_allocator_type &x_alloc = x.priv_node_alloc(); node_allocator_type &x_alloc = x.priv_node_alloc();

View File

@@ -96,7 +96,7 @@ class static_storage_allocator
//! Insertion beyond the capacity result in throwing std::bad_alloc() if exceptions are enabled or //! Insertion beyond the capacity result in throwing std::bad_alloc() if exceptions are enabled or
//! calling throw_bad_alloc() if not enabled. //! calling throw_bad_alloc() if not enabled.
//! //!
//! std::out_of_range is thrown if out of bound access is performed in <code>at()</code> if exceptions are //! std::out_of_range is thrown if out of bounds access is performed in <code>at()</code> if exceptions are
//! enabled, throw_out_of_range() if not enabled. //! enabled, throw_out_of_range() if not enabled.
//! //!
//!@tparam Value The type of element that will be stored. //!@tparam Value The type of element that will be stored.

View File

@@ -896,7 +896,7 @@ class basic_string
BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value
|| allocator_traits_type::is_always_equal::value) || allocator_traits_type::is_always_equal::value)
{ {
//for move constructor, no aliasing (&x != this) is assummed. //for move constructor, no aliasing (&x != this) is assumed.
BOOST_ASSERT(this != &x); BOOST_ASSERT(this != &x);
allocator_type &this_alloc = this->alloc(); allocator_type &this_alloc = this->alloc();
allocator_type &x_alloc = x.alloc(); allocator_type &x_alloc = x.alloc();

View File

@@ -2406,7 +2406,7 @@ class vector
, dtl::is_different<OtherAllocator, allocator_type> , dtl::is_different<OtherAllocator, allocator_type>
>::type * = 0) >::type * = 0)
{ {
//for move assignment, no aliasing (&x != this) is assummed. //for move assignment, no aliasing (&x != this) is assumed.
BOOST_ASSERT(this != &x); BOOST_ASSERT(this != &x);
allocator_type &this_alloc = this->m_holder.alloc(); allocator_type &this_alloc = this->m_holder.alloc();
allocator_type &x_alloc = x.m_holder.alloc(); allocator_type &x_alloc = x.m_holder.alloc();

View File

@@ -1762,7 +1762,7 @@ static FORCEINLINE int win32munmap(void* ptr, size_t size) {
#define CALL_MREMAP(addr, osz, nsz, mv) MFAIL #define CALL_MREMAP(addr, osz, nsz, mv) MFAIL
#endif /* HAVE_MMAP && HAVE_MREMAP */ #endif /* HAVE_MMAP && HAVE_MREMAP */
/* mstate bit set if continguous morecore disabled or failed */ /* mstate bit set if contiguous morecore disabled or failed */
#define USE_NONCONTIGUOUS_BIT (4U) #define USE_NONCONTIGUOUS_BIT (4U)
/* segment bit set in create_mspace_with_base */ /* segment bit set in create_mspace_with_base */
@@ -4676,7 +4676,7 @@ void* dlmalloc(size_t bytes) {
void dlfree(void* mem) { void dlfree(void* mem) {
/* /*
Consolidate freed chunks with preceeding or succeeding bordering Consolidate freed chunks with preceding or succeeding bordering
free chunks, if they exist, and then place in a bin. Intermixed free chunks, if they exist, and then place in a bin. Intermixed
with special cases for top, dv, mmapped chunks, and usage errors. with special cases for top, dv, mmapped chunks, and usage errors.
*/ */
@@ -6210,10 +6210,10 @@ History:
Wolfram Gloger (Gloger@lrz.uni-muenchen.de). Wolfram Gloger (Gloger@lrz.uni-muenchen.de).
* Use last_remainder in more cases. * Use last_remainder in more cases.
* Pack bins using idea from colin@nyx10.cs.du.edu * Pack bins using idea from colin@nyx10.cs.du.edu
* Use ordered bins instead of best-fit threshhold * Use ordered bins instead of best-fit threshold
* Eliminate block-local decls to simplify tracing and debugging. * Eliminate block-local decls to simplify tracing and debugging.
* Support another case of realloc via move into top * Support another case of realloc via move into top
* Fix error occuring when initial sbrk_base not word-aligned. * Fix error occurring when initial sbrk_base not word-aligned.
* Rely on page size for units instead of SBRK_UNIT to * Rely on page size for units instead of SBRK_UNIT to
avoid surprises about sbrk alignment conventions. avoid surprises about sbrk alignment conventions.
* Add mallinfo, mallopt. Thanks to Raymond Nijssen * Add mallinfo, mallopt. Thanks to Raymond Nijssen

View File

@@ -788,7 +788,7 @@ static int internal_node_multialloc
/*Error if wrong element_size parameter */ /*Error if wrong element_size parameter */
if (!element_size || if (!element_size ||
/*OR Error if n_elements less thatn contiguous_elements */ /*OR Error if n_elements less than contiguous_elements */
((contiguous_elements + 1) > (DL_MULTIALLOC_DEFAULT_CONTIGUOUS + 1) && n_elements < contiguous_elements) || ((contiguous_elements + 1) > (DL_MULTIALLOC_DEFAULT_CONTIGUOUS + 1) && n_elements < contiguous_elements) ||
/* OR Error if integer overflow */ /* OR Error if integer overflow */
(SQRT_MAX_SIZE_T < (element_req_size | contiguous_elements) && (SQRT_MAX_SIZE_T < (element_req_size | contiguous_elements) &&

View File

@@ -352,7 +352,7 @@ void test_do_allocate()
BOOST_TEST(dmbr.remaining_storage(1u) == sizeof(buf)); BOOST_TEST(dmbr.remaining_storage(1u) == sizeof(buf));
//Allocate all remaining storage //Allocate all remaining storage
dmbr.do_allocate(dmbr.remaining_storage(1u), 1u); dmbr.do_allocate(dmbr.remaining_storage(1u), 1u);
//No new allocation should have ocurred //No new allocation should have occurred
BOOST_TEST(mrl.m_info.size() == 0u); BOOST_TEST(mrl.m_info.size() == 0u);
BOOST_TEST(dmbr.remaining_storage(1u) == 0u); BOOST_TEST(dmbr.remaining_storage(1u) == 0u);
} }
@@ -433,7 +433,7 @@ void test_release()
//Allocate all remaining storage //Allocate all remaining storage
mr.allocate(monr.remaining_storage(1u), 1u); mr.allocate(monr.remaining_storage(1u), 1u);
BOOST_TEST(monr.current_buffer() == ((char*)&buf + sizeof(buf))); BOOST_TEST(monr.current_buffer() == ((char*)&buf + sizeof(buf)));
//No new allocation should have ocurred //No new allocation should have occurred
BOOST_TEST(monr.remaining_storage(1u) == 0u); BOOST_TEST(monr.remaining_storage(1u) == 0u);
//Release and check memory was released and the original buffer is back //Release and check memory was released and the original buffer is back
monr.release(); monr.release();