mirror of
https://github.com/boostorg/circular_buffer.git
synced 2026-02-03 09:02:12 +00:00
Compare commits
8 Commits
boost-1.75
...
boost-1.81
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a08a5b55ee | ||
|
|
05a83223e4 | ||
|
|
6c5ebd98a0 | ||
|
|
d99ba9ae43 | ||
|
|
d4fbf446b9 | ||
|
|
9579999506 | ||
|
|
adf0d87681 | ||
|
|
2b15dc6044 |
@@ -4,9 +4,9 @@
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
cmake_minimum_required(VERSION 3.5...3.20)
|
||||
|
||||
project(BoostCircularBuffer LANGUAGES CXX)
|
||||
project(boost_circular_buffer VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
||||
|
||||
add_library(boost_circular_buffer INTERFACE)
|
||||
|
||||
@@ -22,4 +22,5 @@ target_link_libraries(boost_circular_buffer INTERFACE
|
||||
Boost::move
|
||||
Boost::static_assert
|
||||
Boost::throw_exception
|
||||
Boost::type_traits)
|
||||
Boost::type_traits
|
||||
)
|
||||
|
||||
@@ -259,7 +259,10 @@ struct iterator
|
||||
#endif // #if BOOST_CB_ENABLE_DEBUG
|
||||
|
||||
//! Assign operator.
|
||||
iterator& operator = (const iterator& it) {
|
||||
#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
|
||||
iterator& operator=(const iterator&) = default;
|
||||
#else
|
||||
iterator& operator=(const iterator& it) {
|
||||
if (this == &it)
|
||||
return *this;
|
||||
#if BOOST_CB_ENABLE_DEBUG
|
||||
@@ -269,6 +272,7 @@ struct iterator
|
||||
m_it = it.m_it;
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Random access iterator methods
|
||||
|
||||
|
||||
@@ -10,5 +10,6 @@
|
||||
],
|
||||
"maintainers": [
|
||||
"Jan Gaspar <jano_gaspar -at- yahoo.com>"
|
||||
]
|
||||
],
|
||||
"cxxstd": "03"
|
||||
}
|
||||
|
||||
@@ -246,9 +246,9 @@ void allocator_test() {
|
||||
CB_CONTAINER<MyInteger> cb1(10, 0);
|
||||
const CB_CONTAINER<MyInteger> cb2(10, 0);
|
||||
CB_CONTAINER<MyInteger>::allocator_type& alloc_ref = cb1.get_allocator();
|
||||
(void)alloc_ref;
|
||||
CB_CONTAINER<MyInteger>::allocator_type alloc = cb2.get_allocator();
|
||||
alloc_ref.max_size();
|
||||
alloc.max_size();
|
||||
(void)alloc;
|
||||
|
||||
generic_test(cb1);
|
||||
|
||||
|
||||
@@ -71,6 +71,11 @@ class InstanceCounter {
|
||||
public:
|
||||
InstanceCounter() { increment(); }
|
||||
InstanceCounter(const InstanceCounter& y) { y.increment(); }
|
||||
InstanceCounter& operator=(const InstanceCounter& y) {
|
||||
decrement();
|
||||
y.increment();
|
||||
return *this;
|
||||
}
|
||||
~InstanceCounter() { decrement(); }
|
||||
static int count() { return ms_count; }
|
||||
private:
|
||||
@@ -106,12 +111,9 @@ struct MyInputIterator {
|
||||
typedef size_t size_type;
|
||||
typedef ptrdiff_t difference_type;
|
||||
explicit MyInputIterator(const vector_iterator& it) : m_it(it) {}
|
||||
MyInputIterator& operator = (const MyInputIterator& it) {
|
||||
if (this == &it)
|
||||
return *this;
|
||||
m_it = it.m_it;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Default assignment operator
|
||||
|
||||
reference operator * () const { return *m_it; }
|
||||
pointer operator -> () const { return &(operator*()); }
|
||||
MyInputIterator& operator ++ () {
|
||||
|
||||
Reference in New Issue
Block a user