The most over-engineered C++ assertion library
This is a build2 package for the libassert
C++ library. It provides an advanced assertion library with automatic expression
decomposition, stack traces, syntax highlighting, and rich diagnostic output.
Usage
To start using libassert in your project, add the following depends
value to your manifest, adjusting the version constraint as appropriate:
depends: libassert ^2.2.1
Then import the library in your buildfile:
import libs = libassert%lib{assert}
Importable targets
This package provides the following importable targets:
Depends (3)
Tests
Reviews
Builds
| toolchain |
public-0.18.1 |
| target |
x86_64-apple-darwin23.5.0 |
| tgt config |
macos_14-clang_15.0-static_O3 |
| timestamp |
2026-11-16 12:30:13 UTC (01:12:02 hours ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-apple-darwin23.5.0 |
| tgt config |
macos_14-clang_15.0-O3 |
| timestamp |
2026-11-16 12:29:20 UTC (01:12:54 hours ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-apple-darwin23.5.0 |
| tgt config |
macos_14-clang_15.0 |
| timestamp |
2026-11-16 12:28:29 UTC (01:13:45 hours ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-gcc_16-static_O3 |
| timestamp |
2026-11-16 10:28:31 UTC (03:13:43 hours ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-gcc_16-ndebug_O3 |
| timestamp |
2026-11-16 10:28:01 UTC (03:14:14 hours ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-gcc_16-O3 |
| timestamp |
2026-11-16 10:27:19 UTC (03:14:56 hours ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-gcc_16 |
| timestamp |
2026-11-16 10:26:17 UTC (03:15:58 hours ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-clang_18_libc++-O3 |
| timestamp |
2026-11-16 10:25:43 UTC (03:16:32 hours ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-clang_18_libc++-static_O3 |
| timestamp |
2026-11-16 10:25:27 UTC (03:16:47 hours ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-gcc_14-bindist |
| timestamp |
2026-11-16 10:25:18 UTC (03:16:56 hours ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-clang_18_libc++ |
| timestamp |
2026-11-16 10:25:08 UTC (03:17:06 hours ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-clang_18-static_O3 |
| timestamp |
2026-11-16 10:24:50 UTC (03:17:25 hours ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-gcc_15-O3 |
| timestamp |
2026-11-16 10:24:40 UTC (03:17:35 hours ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-clang_18-O3 |
| timestamp |
2026-11-16 10:24:30 UTC (03:17:44 hours ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-clang_18 |
| timestamp |
2026-11-16 10:24:13 UTC (03:18:02 hours ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-gcc_15 |
| timestamp |
2026-11-16 10:23:58 UTC (03:18:16 hours ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-apple-darwin22.5.0 |
| tgt config |
macos_13-clang_15.0 |
| timestamp |
2026-11-16 10:23:18 UTC (03:18:56 hours ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-gcc_14-static_O3 |
| timestamp |
2026-11-16 10:22:10 UTC (03:20:04 hours ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-gcc_14-ndebug_O3 |
| timestamp |
2026-11-16 10:20:55 UTC (03:21:19 hours ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-gcc_14-O3 |
| timestamp |
2026-11-16 10:19:36 UTC (03:22:38 hours ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-gcc_14 |
| timestamp |
2026-11-16 10:18:49 UTC (03:23:25 hours ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_22_libc++-static_O3 |
| timestamp |
2026-11-16 10:11:46 UTC (03:30:28 hours ago) |
| result |
warning (test) | warning (test-installed) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_22_libc++-O3 |
| timestamp |
2026-11-16 10:11:27 UTC (03:30:48 hours ago) |
| result |
warning (test) | warning (test-installed) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-microsoft-win32-msvc14.5 |
| tgt config |
windows_10-msvc_18-O2 |
| timestamp |
2026-11-16 10:11:23 UTC (03:30:51 hours ago) |
| result |
warning (test) | warning (test-installed) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_22-O3 |
| timestamp |
2026-11-16 10:11:22 UTC (03:30:52 hours ago) |
| result |
warning (test) | warning (test-installed) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-microsoft-win32-msvc14.5 |
| tgt config |
windows_10-clang_21_msvc_18-O2 |
| timestamp |
2026-11-16 10:11:21 UTC (03:30:53 hours ago) |
| result |
warning (test) | warning (test-installed) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-microsoft-win32-msvc14.5 |
| tgt config |
windows_10-msvc_18-static_O2 |
| timestamp |
2026-11-16 10:11:06 UTC (03:31:08 hours ago) |
| result |
warning (test) | warning (test-installed) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_22_libc++ |
| timestamp |
2026-11-16 10:11:04 UTC (03:31:10 hours ago) |
| result |
warning (test) | warning (test-installed) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-microsoft-win32-msvc14.3 |
| tgt config |
windows_10-msvc_17 |
| timestamp |
2026-11-16 10:10:46 UTC (03:31:29 hours ago) |
| result |
warning (test) | warning (test-installed) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-microsoft-win32-msvc14.5 |
| tgt config |
windows_10-clang_21_msvc_18 |
| timestamp |
2026-11-16 10:10:44 UTC (03:31:30 hours ago) |
| result |
warning (test) | warning (test-installed) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_22 |
| timestamp |
2026-11-16 10:10:39 UTC (03:31:35 hours ago) |
| result |
warning (test) | warning (test-installed) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_21 |
| timestamp |
2026-11-16 10:10:29 UTC (03:31:45 hours ago) |
| result |
warning (test) | warning (test-installed) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-microsoft-win32-msvc14.5 |
| tgt config |
windows_10-msvc_18 |
| timestamp |
2026-11-16 10:10:20 UTC (03:31:54 hours ago) |
| result |
warning (test) | warning (test-installed) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_22-static_O3 |
| timestamp |
2026-11-16 10:10:16 UTC (03:31:58 hours ago) |
| result |
warning (test) | warning (test-installed) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_ubuntu_24.04-gcc_13-bindist |
| timestamp |
2026-11-16 10:10:10 UTC (03:32:05 hours ago) |
| result |
warning (test) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-microsoft-win32-msvc14.5 |
| tgt config |
windows_10-clang_21_msvc_18-static_O2 |
| timestamp |
2026-11-16 10:10:00 UTC (03:32:14 hours ago) |
| result |
warning (test) | warning (test-installed) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_21_libc++ |
| timestamp |
2026-11-16 10:09:41 UTC (03:32:33 hours ago) |
| result |
warning (test) | warning (test-installed) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-freebsd15.0 |
| tgt config |
freebsd_15-clang_19-O3 |
| timestamp |
2026-11-16 10:08:21 UTC (03:33:54 hours ago) |
| result |
error (update) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-freebsd15.0 |
| tgt config |
freebsd_15-clang_19-static_O3 |
| timestamp |
2026-11-16 10:08:20 UTC (03:33:54 hours ago) |
| result |
error (update) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-freebsd15.0 |
| tgt config |
freebsd_15-clang_19 |
| timestamp |
2026-11-16 10:07:48 UTC (03:34:27 hours ago) |
| result |
error (update) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-freebsd14.1 |
| tgt config |
freebsd_14-clang_18 |
| timestamp |
2026-11-16 10:07:33 UTC (03:34:41 hours ago) |
| result |
error (update) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-gcc_13 |
| timestamp |
2026-11-16 10:02:43 UTC (03:39:32 hours ago) |
| result |
warning (test) | warning (test-installed) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_fedora_44-gcc_16-bindist |
| timestamp |
2026-11-14 10:52:03 UTC (02 02:50:11 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_fedora_43-gcc_15-bindist |
| timestamp |
2026-11-14 10:46:51 UTC (02 02:55:24 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_ubuntu_26.04-gcc_15-bindist |
| timestamp |
2026-11-14 10:12:41 UTC (02 03:29:33 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-apple-darwin23.5.0 |
| tgt config |
macos_14-gcc_14_homebrew-static_O3 |
| timestamp |
2026-11-10 03:42:17 UTC (06 09:59:57 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-apple-darwin23.5.0 |
| tgt config |
macos_14-gcc_14_homebrew-O3 |
| timestamp |
2026-11-10 03:40:34 UTC (06 10:01:41 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-apple-darwin23.5.0 |
| tgt config |
macos_14-gcc_14_homebrew |
| timestamp |
2026-11-10 03:38:40 UTC (06 10:03:35 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-w64-mingw32 |
| tgt config |
windows_10-gcc_15.2_mingw_w64-static_O2 |
| timestamp |
2026-11-02 15:43:33 UTC (13 21:58:41 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-w64-mingw32 |
| tgt config |
windows_10-gcc_15.2_mingw_w64-O2 |
| timestamp |
2026-11-02 15:43:33 UTC (13 21:58:42 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-w64-mingw32 |
| tgt config |
windows_10-gcc_15.2_mingw_w64 |
| timestamp |
2026-11-02 15:43:17 UTC (13 21:58:58 days ago) |
| result |
success | log | rebuild |
Changes
libassert 2.2.1
Added
- Added diff highlighting
- Added normalization for
enum E -> E in type prettification
- Added
libassert::print_stacktrace utility
- Added
libassert::get_path_mode
Fixed
Other
libassert 2.2.0
Potentially-breaking changes:
- Libassert now uses an inline ABI versioning namespace. All library symbols are now secretly in the
libassert::v1
namespace. This is technically an ABI break, however, any ABI mismatch will result in linker errors instead of silent
bugs. This change is an effort to allow future evolution of libassert in an ABI-friendly manner.
Added:
Fixed:
- Fixed warning flags on clang-cl
- Fixed some literal format handling logic
- Fixed stringification for empty
std::tuple<>
Other:
- Reduced number of standard library
#includes used by libassert to improve compile speeds
- Bumped cpptrace via FetchContent to 1.0.1
- Various code improvements
- Various testing improvements
- Miscellaneous readme updates and fixes
libassert 2.1.5
Added:
Fixed:
Other:
- Bumped magic_enum via FetchContent
- Bumped cpptrace via FetchContent from v0.7.5 to v0.8.2, with lots of improvements
- Some makefile improvements
- Various typo fixes in the README
- Added some info on library headers to the README
libassert 2.1.4
Fixed:
- Fixed MSVC build issue due to placement of
[[noreturn]] attribute
Changed:
- Updated printing of empty stacktraces
Other:
- Added testing for more configurations
libassert 2.1.3
Added:
- Added
<libassert/version.hpp> header with version macros
- Added export set definition
- Made the default failure handler callback public, updated docs on custom failure handlers
Fixes:
- Added a flag to control -Werror instead of having it on unconditionally by default
- Added fallback for older cpptrace versions where
<cpptrace/basic.hpp> didn't exist
- Added safeguard to ensure static init order issues can never bite
Other:
- Some internal refactoring
- Bumped to cpptrace 0.7.4
libassert 2.1.2
Changes:
libassert 2.1.1
Fixed:
Other changes:
- Bumped default cpptrace to v0.7.1
libassert 2.1.0
Added:
- Added software breakpoints to make assertion failures more debugger-friendly
- Added ANSI color support for catch2 integration now that it is supported in catch v3.6.0
Fixed:
- Fixed checking of stringifiable containers for types with
operator<< overloads and fmt specializations
Other:
- Added support for gcc 8
- Improved testing
libassert 2.0.2
Fixed:
- Fixed minor issue with
LIBASSERT_USE_MAGIC_ENUM handling in libassert-config.cmake
- Fixed handling of edge case for internal string trimming utility
Other:
libassert 2.0.1
Fixed:
Other:
- Improved internal string formatting
- Improved Catch2 support
libassert 2.0.0
Changes since v1:
Assertion macros:
- Replaced the previous
ASSERT/VERIFY nomenclature with DEBUG_ASSERT and ASSERT
- Updated assertion macros to no longer return a value by default
- Added
DEBUG_ASSERT_VAL, ASSERT_VAL, and ASSUME_VAL variants that return values
- Added
PANIC and UNREACHABLE
- Added
LIBASSERT_PREFIX_ASSERTIONS option to only add assertion macros with a LIBASSERT_ prefix