-
0.63.1 (2026/01/06)
- Fixed bug in release (doc) pipeline.
-
0.63.0 (2026/01/06)
- Added
batt::has_typed_arg<T>(args...)
- Added
-
0.62.0 (2025/12/08)
- Fixed some Conan recipe regressions with the switch to Cor toolkit.
- Added
batt::BasicLatencyTimer(issue/27) - Made many bit manipulation functions
constexpr(issue/25) - Fixed bugs in
get_typed_arg<T&>(issue/28) - Added
BATT_DECLARE_MAKE_STATUS_FNandBATT_REGISTER_CODES_AND_MAKE_STATUS_FNfor easier creation of custom status code types and message tables.
-
0.61.1 (2025/10/06)
- Fixed bug in
batt::ObjectThreadStorage<T>/::ScopedSlotwhere different overloads ofScopedSlot::get(...)would create different thread-scoped objects.
- Fixed bug in
-
0.61.0 (2025/10/06)
- Added
batt::ObjectThreadStorage<T>/::ScopedSlotfor per-thread/per-object storage. - Fixed Conan editable mode.
- Added
-
0.60.1 (2025/08/08)
- Added automatic calibration for
batt::LatencyTimerto compensate for measurement overhead - Removed release client from
.gitlab-ci.yml - Added
batt::FlatDeque<T>; changedbatt::Queue<T> - Increased memory available for handlers in
batt::Task::awaitfrom 128 to 1024 bytes batt::NotOkStatusWrappernow lazily constructs itsstd::ostringstreambuffer
- Added automatic calibration for
-
0.59.0 (2025/05/19)
- Increased default kernel threads which can report
BATT_DEBUG_INFOfrom 32 to 256 - Removed
-std=c++17from ConanFilecpp_info.cxxflags - Added more packages with unusual Conan package name to CMake target name mappings:
abseil:abslgreg7mdp-gtl:gtlrobin-hood-hashing:robin_hood
- Tuned MCSLock unit test for faster running times
- Added
batt::ThreadSpec(<batteries/cpu_align.hpp>) + text serialization/parser for human-writable specifications of CPU pinning schemes for thread pools (now used bybatt::WorkerPoolandbatt::Runtime::DefaultScheduler)- Environment variable
BATT_DEFAULT_SCHEDULER_IO_SPECcan also now be used to specify a mapping of executor objects to threads (which can be pinned to specific cores usingBATT_DEFAULT_SCHEDULER_THREAD_SPEC)
- Environment variable
- Added test
AsyncScalableGrantTestto provide a micro-benchmark comparison ofbatt::ScalableGrantandbatt::SpinGrant, to make detecting regressions easier. - Added
batt::FinalAct::run()(<batteries/finally.hpp>) to execute afinallyblock before block scope is exited - Moved
batt::bit_countto new header<batteries/bit_ops.hpp> - Added
batt::fixed_point::LinearProjection(<batteries/math.hpp>), which implements fast (no divisions), fixed-point integer scaling from an input range to an output domain - Added header
<batteries/bit_ops.hpp>with support for popcount, rank/select, and various bit set operations, with hardware acceleration if available. - Moved
BATT_UNWRAPmacro from header<batteries/operators.hpp>to<batteries/utility.hpp> - Added
batt::Optional<T>::value_or_panic(), which returns the value held by anOptional<T>or panics if theOptionalisNone - Added
batt::IsOptional<T>meta-function/trait for compile-time detection of optional types - Added
batt::RemoveOptional<T>meta-function/trait to remove a layer ofOptional<T>wrapping (if possible) - Added
batt::FastCountMetric<T>, a lower-overhead version ofbatt::CountMetric<T>that uses thread-local data to avoid atomic operations on the metric update path. - Improvements to
batt::seq::LoopControl - Added
<batteries/typed_args.hpp>
- Increased default kernel threads which can report
-
0.58.5 (2025/01/30)
- Disabled code coverage in pipelines (will re-enable when performance regression(s) are investigated/fixed)
- Fixed compatibility issue by relaxing CMake version requirement to 3.22
-
0.58.2 (2025/01/13)
- Fix some doc comment typos
- Expand the coding style document
- Add
BATT_SUPPRESS_IF_GCC_VERSION(version, warning_id_str)to<batteries/suppress.hpp> - Fix some spurious warnings to enable gcc 13 support (not yet added to pipelines)
-
0.58.1 (2024/11/18)
- Add code coverage tools to the pipeline docker image
- Bug fixes/improvements to scripts
- Fix Conan editable mode
- Fix bugs re: multiple check failures suppress full trace when multi-threaded
- Fix bug in Optional that allows implicit conversion from primitive type to strong typedef
-
0.58.0 (2024/10/10)
- Added support for throwing out of Batteries-based code into a larger app context that uses exceptions.
batt::StatusException- exception type that wraps abatt::Statusplus an optional extra message string; derives fromstd::runtime_errorBATT_THROW_IF_NOT_OK(expr)- macro that accepts any expression evaluating to abatt::Statusorbatt::StatusOr<T>; expands to statement that checks for ok and throwsbatt::StatusExceptionif not ok; supports stream-insertion (<<) of extra information similar toBATT_CHECKBATT_OK_RESULT_OR_THROW(expr)- macro that accepts an expression that evalutes to abatt::StatusOr<T>and expands to an expression that checks for ok (throwsbatt::StatusExceptionif not), plus a dereference of theStatusOrif it is ok
- Added support for throwing out of Batteries-based code into a larger app context that uses exceptions.
-
0.57.2 (2024/10/02)
- Fixed compilation error on gcc with C++ std versions before 20 (17, gnu17).
-
0.57.1 (2024/10/01)
- Fixed #23 (bug) -
batt::seq::chain()produces sequence that gives incorrect result forpeek()when first sequence empty, second sequence non-empty. - Upgrade script submodule - moved test from top-level Makefile to script/conan-targets.mk; added script/run-tests.sh.
- Fixed #23 (bug) -
-
0.57.0 (2024/09/25)
- Added SSL/TLS (
https://) support tobatt::HttpClient- SSL context initialization can be customized by supplying a
std::functiontobatt::HttpClient::set_ssl_init_fn. The function should have the signaturevoid(Optional<boost::asio::ssl::context>&, const HostAddress&), and should construct the passed optional context in-place (usingbatt::Optional::emplace).
- SSL context initialization can be customized by supplying a
- Worked around race conditions in conan install when downloading/building new packages
- Added support in CI pipelines for uploading any packages that were built from source during
make installto a cache artifact server. - Upgraded dependencies in the lockfile (and also added openssl, for https support).
- Added SSL/TLS (
-
0.56.2 (2024/09/10)
- Fixed race condition bugs in
batt::ReadWriteLockthat could lead to panics or deadlocks - Added
HoldOwnershipandReleaseOwnershipmodes for allWatchAtomic<T>simple modification functionsHoldOwnershipis the default; it is slightly faster and more scalable, but assumes that the caller will keep the Watch object alive until the function returnsReleaseOwnershipis slightly slower and less scalable, but is safe to call even when the modification being performed to the Watch value will cause the Watch itself to be deleted
- Added a
batt::FakeTimeServiceinstance tobatt::FakeExecutionContext; added support inbatt::FakeExecutionContext::run_with_random_seedfor simulated timer expirations
- Fixed race condition bugs in
-
0.56.0 (2024/09/06)
- Renamed
batt::Granttobatt::SpinGrant - Introduced new Grant implementation,
batt::ScalableGrant- Uses explicit mutex locks and a waiter queue to scale more gracefully than the old Grant (now SpinGrant), where all contenders to claim Grant count use a single
batt::Watchand CAS-like loops AsyncScalableGrantTest.ScalabilityBenchmarktest (newly added) demonstrates that, as expected, SpinGrant degrades linearly with the number of contenders, whereas ScalableGrant maintains a constant throughput even when faced with hundreds or thousands of Tasks competing for Grant count.
- Uses explicit mutex locks and a waiter queue to scale more gracefully than the old Grant (now SpinGrant), where all contenders to claim Grant count use a single
batt::Grantis now a type alias tobatt::ScalableGrant- Minor bug fixes that cause spurious failed checks when panicking on another thread
- Renamed
-
0.55.1 (2024/07/25)
- Fixed bug where printing a
batt::WaitForResourceto astd::ostreamresults in a crash - Added test for
std::ostreamprinting ofbatt::CountMetric
- Fixed bug where printing a
-
0.55.0 (2024/07/19)
- Added
batt::LazyLatch<T>- likebatt::Latch<T>but automatically initializes when value is requested, via aninit_fnpassed in at construction time.
- Added
-
0.54.0
- Added template parameter
bool kAllowAllocforbatt::SmallFn, which enables falling back to dynamic (heap) allocation if a type-erased function is too large to fit in the inline small object buffer (similar tobatt::SmallVec). - Added
batt::InstanceCounter<T>for easy debug tracking of the number of active instances for a given type.
- Added template parameter
-
0.53.0
- Batteries now uses Conan version ranges for dependencies + lock files.
- Added
batt::StaticTypeMap<KeyTupleT, ValueT>, to store a fixed-size collection of values indexed by distinct types.
-
0.52.5
- Added
batt::ReadWriteMutex<T>to wrapbatt::ReadWriteLockand an instance ofT, using an API similar tobatt::Mutex<T>.
- Added
-
0.52.3
- Fixed race condition bug in
WatchAtomic::poke()/Queue<T>::poke()that could cause the next waiter to miss the poke.
- Fixed race condition bug in
-
0.52.1
- Added a static assert to detect incorrect use of
batt::seq::map(when the map function returns void).
- Added a static assert to detect incorrect use of
-
0.52.0
- Added
batt::HttpServer: a basic HTTP/1.1 server implementation based onbatt::Task, sharing common code withbatt::HttpClient - Added
cleanup_fnoptional argument tobatt::Queue<T>::drain - Added
batt::HttpMessageBase::close()(inherited bybatt::HttpRequestandbatt::HttpResponse) - Added
batt::HttpMessageBase::invoke_stream_writer(writer_fn)(inherited bybatt::HttpRequestandbatt::HttpResponse) - Moved
serializemethod frombatt::HttpRequesttobatt::HttpMessageBaseso it can be used bybatt::HttpResponse - Moved
RequestInfoto top levelbatt::HttpMessageInfoso it can be used with requests and responses
- Added
-
0.51.1
- Added
BATT_ASSERTstatements to detect attempts to access the contents of an invalidbatt::Optional<T>.
- Added
-
0.51.0
- Added
batt::bit_count, a portable version of the "how many 1-bits in this integer" machine instruction (POPCOUNT on Intel).
- Added
-
0.50.9
- Added better explanation of the
batt::Mutex<T>::with_lock(doc comments). - Added a
\returndoc tag forWatchAtomic<T>::set_value.
- Added better explanation of the
-
0.50.7
- Added
patchelfpackage to Docker image for CI/CD pipelines. - Added
batt::InlineSubTask<kStackBufferSize>(#include <batteries/async/inline_sub_task.hpp>) for easy allocation/launching of sub-tasks using part of the stack memory of an existing task.
- Added
-
0.50.6
- Added environment variable
BATT_DEFAULT_SCHEDULER_PIN_CPUto control whetherbatt::Runtime::default_scheduler()pins its thread pool 1:1 to specific CPUs.
- Added environment variable
-
0.50.5
- Added
batt::ReadWriteLock, an implementation of a fair reader/writer mutex as described in "Synchronization Without Contention" (Mellor-Crummey, Scott, 1991) - Changed the Dockerfile to install all Python packages (including Conan) in a virtual environment (/opt/venv) instead of the ambient environment.
- Upgrade the Dockerfile to install Conan version 2.0.16.
- Added
batt::WatchAtomic<T>::poll(), which yields the current task and then reloads/returns the watch value.
- Added
-
0.50.3
- Fixed a problem with the CMakeLists.txt and conanfile.py that caused unit tests to be (re-)built when running conan install from a downstream project.
-
0.50.1
- Added
batt::AtomicCounterGauge<T>, an atomic variable with both gauge-like (moves up and down) and counter-like (add/subtract counters are monotonically increasing) semantics.
- Added
-
0.49.2
- Added
batt::BoolStatus(<batteries/bool_status.hpp>), an enum that has true/false/unknown values and overloaded logical operators.
- Added
-
0.49.1
- Added to
<batteries/type_traits.hpp>:is_any_true(expr0, expr1, expr2, ...): (constexpr) Returns true (and short circuits) at the firsttrue-valued argument; elsefalseare_all_true(expr0, expr1, expr2, ...): (constexpr) Returns false (and short circuits) at the firstfalse-valued argument elsetrueIsOneOf<T, M0, M1, ...>: (inline constexpr bool) True iffTis exactly one of the setM0,M1, ...DecaysToOneOf<T, M0, M1, ...>: (inline constexpr bool) True iffstd::decay_t<T>is one of the setM0,M1, ...
- Added to
-
0.49.0
- Added
BATT_RETURN_OK_RESULT(expr), which unwraps and returns expr if it evaluates to an ok status, continues without returning otherwise.
- Added
-
0.48.9/0.48.10 (2023/11/27)
- Fix conan install bug in conanfile.py: search for script/batt.py relative to the source folder, in addition to the conanfile.py folder.
-
0.48.8 (2023/11/21)
- Add
batt::Promise<T>::is_ready()to test whether a future value or error has been set.
- Add
-
0.48.4 (2023/11/16)
batt::Statusnow preserves message strings fromstd::error_code(for the built-in error categories:std::system_category(),std::generic_category(),std::future_category(), andstd::iostream_category()).
-
0.48.3 (2023/11/15)
- Added header
operators.hpp:BATT_OBJECT_PRINT_IMPL(inline_decl, type, fields_tuple)- Defines
<<to print the object to an ostream
- Defines
BATT_OBJECT_EQUALS_IMPL(inline_decl, type, fields_tuple)- Defines
==as conjunction of field-wise equality
- Defines
BATT_OBJECT_LESS_THAN_IMPL(inline_decl, type, fields_tuple)- Defines
<as a lexicographical ordering of the field orders
- Defines
BATT_EQUALITY_COMPARABLE(inline_decl, left_type, right_type)- Defines
!=based on==
- Defines
BATT_TOTALLY_ORDERED(inline_decl, left_type_right_type)- Defines
>,<=, and>=based on<
- Defines
- Added header
-
0.48.2 (2023/11/06)
- Added
batt::Future<T>::from_value,batt::Future<T>::from_error: convenient API for making completed Futures. - Print
batt::StatusasGROUP.CODE:MESSAGEinstead ofVALUE:MESSAGE; this allows the savvy reader to convert printed Status values to, for example, errno codes by inspection.
- Added
-
0.47.0 (2023/10/17)
- Added
batt::Future<T>::and_thenfor monadic future composition.
- Added
-
0.33.0 (2023/05/19)
- Added Conan options for build variants that affect ABI:
header_onlyglog_supportprotobuf_supportasserts_enabledshared
- Added
<batteries/stacktrace.hpp>, which includes boost stacktrace and suppresses spurious GCC warnings in the boost code. - Added a runtime check system to
<batteries/config.hpp>that computes a "feature [bit-]mask" which captures the build variant; this is done for each compilation unit that includesconfig.hpp(using static init of aboolin an anonymous namespace) and compared to a global, canonical feature mask. In this way, we can now detect bugs where different libraries were built with different Batteries feature settings and halt the program before undefined behavior ensues. - Added new macros to control optimization suppression in the code:
BATT_GCC_BEGIN_OPTIMIZE(setting)- setting must be a string literal, e.g. "O0"BATT_GCC_END_OPTIMIZE()- reverts the optimization level set byBATT_GCC_BEGIN_OPTIMIZEBATT_BEGIN_NO_OPTIMIZE()- begins a section in which optimization is completely disabledBATT_END_NO_OPTIMIZE()- ends a section begun byBATT_BEGIN_NO_OPTIMIZE
- Enabling
BATT_ASSERTstatements can now be done independent of theNDEBUGdefine, usingBATT_ASSERTS_ENABLED, which is controlled by the Conan config via theasserts_enabledoption, which can beNone(default),True, orFalse. IfBATT_ASSERTS_ENABLEDis not defined (i.e.,asserts_enabledisNone), then asserts are only enabled whenNDEBUGis defined, like before. - Added support for
std::ostream operator<<tobatt::LogLevel(<batteries/status.hpp>) - Fixed silent ABI breakage bug in
batt::detail::NotOkStatusWrapperthat causes aborts at runtime when some libraries are compiled withBATT_GLOG_AVAILABLEand some without. - Fixed an overly aggressive check in
batt::Task
- Added Conan options for build variants that affect ABI:
-
0.31.3 (2023/05/03)
- Fixed bug in TakeNSource that causes hang after limit is reached (instead of returning batt::StatusCode::kEndOfStream).
-
0.31.0 (2023/05/03)
- Added
batt::SingleBufferSource.
- Added
-
0.30.0 (2023/04/13)
- Fix #4 (Added
std::ostream& operator<<(std::ostream&, batt::Watch<T>)) - Fix #5 (Deadlock if a failed BATT_CHECK generates another failed check when trying to print the message)
- Fix #6 (Added
batt::Watch<T>::reset())
- Fix #4 (Added
-
0.29.0 (2023/03/31)
- Add
batt::seq::zip.
- Add
-
0.28.5 (2023/03/17)
- Add doc comment for
batt::getenv_as.
- Add doc comment for
-
0.28.4 (2023/03/17)
- Added
batt::Optional::or_else(Fn)to matchstd::optional. - Changed
batt::require_fail_thread_default_log_level()to returnbatt::Optional<batt::LogLevel>&instead ofbatt::LogLevel&, and made it default to the current global setting when it isbatt::None.
- Added
-
0.28.3 (2023/03/13)
- Fix bug that prevented the use of
batt::Future<T>::await.
- Fix bug that prevented the use of
-
0.27.1 (2023/03/08)
- Fixed typo in case_of.hpp doc.
- Added support for silent conversion of
batt::StatusOr<batt::NoneType>tobatt::Status.
-
0.27.0 (2023/03/07)
- Added
BATT_CHECK_TYPE(type, expr)to<batteries/static_assert.hpp>:- At runtime, evaluates to just
expr, but adds a compile-time assertion that the type ofexpristype.
- At runtime, evaluates to just
- Added
-
0.26.0 (2023/03/04)
- Added
batt::Task::DeferStart{bool}option to suppress automatic Task starting; also:- Added member fn
batt::Task::is_started() - Added member fn
batt::Task::start() - Added class
batt::Task::Options
- Added member fn
- Added
-
0.25.3 (2023/03/02)
- Fixed many missing functions/operators for
batt::Optional<T&>partial specialization.
- Fixed many missing functions/operators for
-
0.25.0 (2023/02/23)
- Added
batt::Task::await_signal(moved from "upper layers").
- Added
-
0.24.6 (2023/02/22)
- Added support for MacOS/Clang build pipelines
- Added
batt::Task::spawn() - Added
batt::NoDestruct<T>
-
0.23.1 (2023/02/06)
- Fixed bug in script/run-with-docker.sh
- Added xxd to docker images
-
0.22.1 (2023/01/27)
- Added
batt::DefaultInitialized, a type that implicitly converts to any default-constructible type. - Added a
stepparameter (typebatt::TransferStep &, batteries/async/fetch.hpp) that allows callers to determine which step failed whenbatt::transfer_chunked_datareturns an error.
- Added
-
0.21.0 (2023/01/25)
- Added
batt::register_error_categoryto allow applications to specify howerror_codevalues with customerror_categoryobjects should be converted tobatt::Status. - Upgraded boost to 1.81.0
- Upgraded gtest to 1.13.0
- Added
-
0.20.1 (2023/01/18)
- Added
batt::transfer_chunked_data(in batteries/async/fetch.hpp).
- Added
-
0.19.8 (2023/01/11)
- Upgrade to Conan 1.56 (from 1.53).
-
0.19.6 (2022/12/19)
- Fixed build error with
batt::to_status(std::error_code)
- Fixed build error with
-
0.19.5 (2022/12/16)
- Fixed crash bug caused by accidental implicit conversion from error_code enum values to batt::Status.
-
0.19.2 (2022/12/16)
- Fixed test regression by updating the expected error status to match the boost::system::error_code value.
-
0.19.1 (2022/12/16)
- Added accurate translation of more boost::system::error_code values into batt::Status.
-
0.19.0 (2022/12/14)
- Added
batt::Latch<T>::set_errorto explicitly set the Latch to an error status for better readability. - Added new header batteries/async/fetch.hpp with:
batt::fetch_chunk: blocking API for no-copy input streams with an async_fetch methodbatt::BasicScopedChunk<Stream>: automatically calls consume on fetched data at scope exit
- Added
-
0.18.1 (2022/12/09)
- Added
batt::PinnablePtr<T>.
- Added
-
0.18.0 (2022/12/07)
- Added
batt::Channel<T>::async_read, along with unit tests for the async methods ofbatt::Channel<T>.
- Added
-
0.17.1 (2022/12/02)
- Added
batt::Runtime::reset()andbatt::Runtime::is_halted()so that downstream libraries that use a Google Test global environment to start/stop batt::Runtime can restart the default thread pool, for GTEST_REPEAT/--gtest_repeat testing.
- Added
-
0.16.2 (2022/11/30)
- Fixed a broken link in the release notes.
-
0.16.1 (2022/11/30)
- Added release notes (this document) to the doc pages.
-
0.16.0 (2022/11/30)
- Added clamp min/max functions to batt::Watch, to atomically enforce upper/lower bounds on the watched value.