Version 2.0.0-alpha
·
279 commits
to main
since this release
This is the first pre-release for version 2. Version 2 is an overhaul of the library taking lessons learned.
Major changes:
- Replaced the previous
ASSERT/VERIFYnomenclature withDEBUG_ASSERTandASSERT - Updated assertion macros to no longer return a value by default
- Debug-only assertions no longer have to evaluate the assertion expression, and removed
NO_ASSERT_RELEASE_EVAL
- Debug-only assertions no longer have to evaluate the assertion expression, and removed
- Added
DEBUG_ASSERT_VAL,ASSERT_VAL, andASSUME_VALvariants that return values - Added
PANICandUNREACHABLE - Removed default throwing behavior for some assertion failures, all assertions now abort by default
- Removed non-fatal assertions
- Improved stringification generation to handle more types and better decide when there is useful information to print
- Added stringification customization point instead of relying on
operator<<(std::ostream, const T&) - Removed macro-based custom assertion failure handler system
- Added
libassert::set_failure_handler - Removed default safe signed-unsigned comparison behavior
- Added
LIBASSERT_SAFE_COMPARISONSto opt into safe signed-unsigned comparisons - Added color palette configuration
- Added configuration for literal formatting
- Reworked structures used to represent assertion information
- Cleaned up
binary_diagnostics_descriptor - Removed up
extra_diagnosticsstruct trying to do too much - Renamed
assertion_printertoassertion_info - Made more information available in the
assertion_infostruct - Removed lifetime funniness with the
assertion_infostruct
- Cleaned up
- Type prettifying
std::__cxx11::is simplified tostd::
Core changes:
- Cleaned up assertion macro expansion
- Cleaned up handling of literal formatting
- Cleaned up stringification generation
- Cleaned up assertion processing logic
- Removed the global lock used while processing assertions
- Lots of internal refactoring, cleanup, and changes to improve maintainability
- Overhauled CMake thanks to a contributor, fixing a lot of issues
- Removed need for user to manually specify
ASSERT_STATICif using the project with cmake and a static build - Magic enum is now grabbed with FetchContent or externally from an existing install or package manager
- Reworked
README.md - Added
CONTRIBUTING.md - Resolved inconsistent use of
ASSERTvsLIBASSERTfor the library's macro prefix - Fixed inconsistent use of
assertvslibassertfor referring to the library - Updated the library's cmake target name to
libassert::assert - Updated the library's header to
<libasssert/assert.hpp> - Updated internal error handling to use cpptrace exceptions
- Added cmake integration testing on mingw to CI
- General CI improvements
- General testing improvements