Compare commits

...

20 Commits

Author SHA1 Message Date
Peter Dimov
737acf58a2 Merge pull request #54 from Lastique/feature/remove_static_assert
Remove dependencies on Boost.StaticAssert
2026-02-03 02:13:29 +02:00
Andrey Semashev
243f4a4b54 Remove dependencies on Boost.StaticAssert.
Boost.StaticAssert has been merged into Boost.Config, so remove
the dependency.
2026-01-22 19:43:15 +03:00
Peter Dimov
0320ba365c Merge pull request #49 from grafikrobot/modular
Add support for modular build structure.
2025-05-02 19:05:59 +03:00
Rene Rivera
c7f6164f32 Move include to target. 2025-04-17 08:37:16 -05:00
Rene Rivera
36ac5b3a29 Update build deps. 2024-07-31 08:32:04 -05:00
Rene Rivera
c456d21adb Fix doc include path refs. 2024-07-28 10:40:37 -05:00
Rene Rivera
bbbdf89031 Adjust doc build to avoid boost-root references. 2024-07-28 10:32:26 -05:00
Rene Rivera
02ec070792 Move inter-lib dependencies to a project variable and into the build targets. 2024-07-23 22:34:23 -05:00
Rene Rivera
0d8027e607 Update copyright dates. 2024-07-20 22:52:04 -05:00
Rene Rivera
d2f6eff9bd Bump B2 require to 5.2 2024-06-14 11:33:55 -05:00
Rene Rivera
7f7d13fffb Add requires-b2 check to top-level build file. 2024-05-05 09:00:00 -05:00
Rene Rivera
c0ed5c34b6 Switch to library requirements instead of source. As source puts extra source in install targets. 2024-03-29 21:15:58 -05:00
Rene Rivera
2959b67a60 Make the library modular usable. 2024-03-11 08:27:02 -05:00
Glen Fernandes
05a83223e4 Merge pull request #41 from apolukhin/antoshkka/fix-deprecated-copy
fix deprecated-copy warnings
2021-12-11 08:59:12 -05:00
Glen Fernandes
6c5ebd98a0 Update defaulted operator style 2021-12-11 08:57:56 -05:00
Antony Polukhin
d99ba9ae43 fix deprecated-copy warnings 2021-12-11 12:26:43 +03:00
Peter Dimov
d4fbf446b9 Merge branch 'master' into develop 2021-06-10 01:30:49 +03:00
Peter Dimov
9579999506 Update CMakeLists.txt 2021-06-10 01:21:06 +03:00
Glen Fernandes
adf0d87681 Update test case to not call allocator's max_size 2021-02-15 22:33:13 -05:00
Edward Diener
2b15dc6044 Add "cxxstd" json field 2021-01-19 17:48:41 -05:00
8 changed files with 82 additions and 44 deletions

View File

@@ -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)
@@ -20,6 +20,6 @@ target_link_libraries(boost_circular_buffer INTERFACE
Boost::config
Boost::core
Boost::move
Boost::static_assert
Boost::throw_exception
Boost::type_traits)
Boost::type_traits
)

30
build.jam Normal file
View File

@@ -0,0 +1,30 @@
# Copyright René Ferdinand Rivera Morell 2023-2024
# 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)
require-b2 5.2 ;
constant boost_dependencies :
/boost/assert//boost_assert
/boost/concept_check//boost_concept_check
/boost/config//boost_config
/boost/core//boost_core
/boost/move//boost_move
/boost/throw_exception//boost_throw_exception
/boost/type_traits//boost_type_traits ;
project /boost/circular_buffer
: common-requirements
;
explicit
[ alias boost_circular_buffer : : :
: <include>include <library>$(boost_dependencies) ]
[ alias all : boost_circular_buffer example test ]
;
call-if : boost-library circular_buffer
;

View File

@@ -6,7 +6,7 @@
# Use, modification and distribution is subject to
# the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt
# (See accompanying file LICENSE_1_0.txt
# or copy at http://www.boost.org/LICENSE_1_0.txt)
path-constant nav_images : html/images/ ; # png and svg images for home, next, note, tip...
@@ -16,7 +16,7 @@ path-constant here : . ; # location of /doc folder.
# echo "nav_images = " $(nav_images) ; # "nav_images = I:\boost-trunk\libs\circular_buffer\doc\html\images
# echo "images_location = " $(images_location) ; # images_location = I:\boost-trunk\libs\circular_buffer\doc\html\images
# echo "pdf_images_location = " $(pdf_images_location) #
# echo "pdf_images_location = " $(pdf_images_location) #
import modules ;
using auto-index ;
using doxygen ; # Required if you want to use Doxygen.
@@ -26,10 +26,10 @@ using quickbook ;
doxygen autodoc
:
# List all the files individually (RECURSIVE=NO ).
[ glob ../../../boost/circular_buffer.hpp ]
[ glob ../../../boost/circular_buffer/base.hpp ]
[ glob ../../../boost/circular_buffer/space_optimized.hpp ]
[ glob ../include/boost/circular_buffer.hpp ]
[ glob ../include/boost/circular_buffer/base.hpp ]
[ glob ../include/boost/circular_buffer/space_optimized.hpp ]
:
# Pass some setting parameters to Doxygen.
<doxygen:param>WARNINGS=YES # Default NO, but useful to see warnings, especially in a logfile.
@@ -38,14 +38,14 @@ doxygen autodoc
# Much better to send message to a logfile than the default stderr.
# and make sure that there are no Doxygen errors or significant warnings in the log file.
<doxygen:param>RECURSIVE=NO # Search recursively down .hpp and .cpp subdirectories.
<doxygen:param>EXTRACT_ALL=NO
<doxygen:param>EXTRACT_PRIVATE=NO # NO means do not extract info about private member functions and data.
<doxygen:param>EXTRACT_ALL=NO
<doxygen:param>EXTRACT_PRIVATE=NO # NO means do not extract info about private member functions and data.
<doxygen:param>HIDE_UNDOC_MEMBERS=YES # Only show members that have some documentation like \param, \return ...
<doxygen:param>MACRO_EXPANSION=YES # YES will expand all macro names in the source code (default = NO).
<doxygen:param>EXPAND_ONLY_PREDEF=YES # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
# then the macro expansion is limited to the macros specified with the PREDEFINED and EXPAND_AS_DEFINED tags.
# If EXPAND_ONLY_PREDEF tag can be used to specify a list of macro names that should be expanded (as defined).
# The PREDEFINED tag can be used to specify one or more macro names that are defined
# The PREDEFINED tag can be used to specify one or more macro names that are defined
# before the preprocessor is started (similar to the -D option of gcc).
# The argument of the tag is a list of macros of the form:
# name or name=definition (no spaces).
@@ -78,17 +78,17 @@ doxygen autodoc
<doxygen:param>EXCLUDE_SYMBOLS=*_throws
# <doxygen:param>IMAGE_PATH="../images" # for circular_buffer.png
# See autodoxywarnings.log to check this is correct.
# The syntax hoops to jump through are 'interesting' for more than one PREDEFINED,
# and to permit spaces within definitions (use double quotes).
# Don't forget that every double quote " needs a preceding \trip character!
# and that each trailing continuation \ needs a preceding \trip character too!
# And finally that if more than one item is included (as here) the whole is
# enclosed in "PREDEFINED=... ", but without a leading \. Go figure...
# A grep for PREDEFINED= in jamfiles will reveal even more complex examples.
# Boost Libraries with useful examples are: Accumulators, Interprocess, MPI, Random, Units, Expressive.
# Optionally, you can provide a Reference section name specific for your library, for example:
<xsl:param>"boost.doxygen.reftitle=Boost.Circular_buffer C++ Reference"
;
@@ -101,7 +101,7 @@ boostbook standalone
:
circular_buffer
:
# General settings
# =================
<format>html:<xsl:param>boost.root=../../../..
@@ -118,7 +118,7 @@ boostbook standalone
<xsl:param>page.margin.outer=0.5in
# Yes, we want graphics for admonishments:
<xsl:param>admon.graphics=1
# HTML options:
# =============
# Use graphics icons not text for navigation:
@@ -137,27 +137,27 @@ boostbook standalone
<format>html:<xsl:param>html.cellspacing=3 # pixels
# Vertical spacing in table cells.
<format>html:<xsl:param>html.cellpadding=5 # pixels
# Not sure if these are right way round?
# Not sure if these are right way round?
<auto-index>on # Turns on index (or off).
# Turns on (or off) index-verbose for diagnostic info (using /bin auto-index-verbose folders).
<auto-index-verbose>on
<auto-index-verbose>on
<format>pdf:<auto-index-internal>off # on (or off) to use internally generated indexes.
<format>html:<xsl:param>index.on.type=1 # = 1 For the native stylesheets to generate multiple different indexes.
<auto-index-script>circular_buffer.idx # Specifies the name of the script to load for circular_buffer.
<auto-index-script>circular_buffer.idx # Specifies the name of the script to load for circular_buffer.
<auto-index-prefix>../../.. # Will get you back up to /circular_buffer, so !scan-path "boost/circular_buffer/" is where *.hpp will be,
# and /libs/circular_buffer for other files.
# Without this would need !scan-path "../../../boost/circular_buffer"
# Used by Quickbook to invoke indexing.
# Required by boost-trunk/doc/ see jamfile.v2 to use auto-index.
# Choose indexing method for html:
<format>html:<auto-index-internal>on
<format>docbook:<auto-index-internal>on
# PDF Options:
# ============
# TOC Generation: this is needed for FOP-0.9 and later:
@@ -172,10 +172,10 @@ boostbook standalone
<xsl:param>page.margin.inner=0.5in
# Margin size:
<xsl:param>page.margin.outer=0.5in
# Yes, we want graphics for admonishments:
<xsl:param>admon.graphics=1
# Set these one for PDF generation *only*:
# default png graphics are awful in PDF form,
# better use SVG instead:
@@ -183,19 +183,19 @@ boostbook standalone
#<format>pdf:<xsl:param>admon.graphics.extension=".png" # Only png images are available.
# Don't need this, default path works OK:
#<format>pdf:<xsl:param>admon.graphics.path=$(nav_images)/ # next, prev, note, tip ... for pdf.
<format>pdf:<xsl:param>use.role.for.mediaobject=1
<format>pdf:<xsl:param>use.role.for.mediaobject=1
<format>pdf:<xsl:param>preferred.mediaobject.role=print
<format>pdf:<xsl:param>img.src.path=$(pdf_images_location)/ # graphics (diagrams) for pdf.
<format>pdf:<xsl:param>draft.mode="no"
<format>pdf:<xsl:param>boost.url.prefix=../../../..
<dependency>autodoc #
<dependency>autodoc #
<dependency>png_install
;
# Install (copy) the 'master' copies of all icon images (both PNG and SVG)
# and the Boost logo from your current Boost-root
# to the local /doc/html/images folder so that html is complete and standalone.
# to the local /doc/html/images folder so that html is complete and standalone.
install png_install : [ glob $(here)/*.png ] : <location>$(here)/../../../doc/html/images ;
# install pdf-install : standalone : <install-type>PDF <location>. ;

View File

@@ -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

View File

@@ -10,5 +10,6 @@
],
"maintainers": [
"Jan Gaspar <jano_gaspar -at- yahoo.com>"
]
],
"cxxstd": "03"
}

View File

@@ -13,6 +13,7 @@ import testing ;
project
: requirements
<library>/boost/circular_buffer//boost_circular_buffer
<toolset>msvc:<warnings>all
<toolset>msvc:<asynch-exceptions>on
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
@@ -28,5 +29,5 @@ test-suite "circular_buffer"
[ run space_optimized_test.cpp : : : <threading>single <define>"BOOST_CB_ENABLE_DEBUG=1" : space_optimized_test_dbg ]
[ run soft_iterator_invalidation.cpp : : : <threading>single : ]
[ run constant_erase_test.cpp : : : <threading>single : ]
[ compile bounded_buffer_comparison.cpp : <threading>multi : ]
[ compile bounded_buffer_comparison.cpp : <threading>multi <library>/boost/thread//boost_thread <library>/boost/timer//boost_timer : ]
;

View File

@@ -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);

View File

@@ -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 ++ () {