Go to file
2022-11-02 14:00:33 +01:00
include/awesome refactor: use C++14's std::equal_to<void> and friends specializations 2022-11-02 14:00:33 +01:00
src refactor: use C++14's std::equal_to<void> and friends specializations 2022-11-02 14:00:33 +01:00
test Actually permit using unary expressions in assertions 2017-02-26 14:58:21 +01:00
.gitignore Ignore some development files 2016-12-18 03:39:17 +01:00
.travis.sh chore!: drop C++11 support, requiring C++14 at least 2022-10-14 14:16:07 +02:00
.travis.yml chore!: drop C++11 support, requiring C++14 at least 2022-10-14 14:16:07 +02:00
appveyor.yml Verify VS 2017's claim to support constexpr 2018-06-10 14:51:50 +02:00
CMakeLists.txt feat: support NO_COLOR color suppression environment variable 2022-11-01 16:48:59 +01:00
COPYING initial commit: license + project description 2016-12-17 15:39:43 +01:00
COPYING.LESSER initial commit: license + project description 2016-12-17 15:39:43 +01:00
README.md Last copyright version bump of this year 2018-06-10 22:37:54 +02:00

AwesomeAssert

Linux and OSX build Status Windows build status

An assert implementation that aims to provide usable information while maintaining as small a performance footprint as possible when not failing.

Requirements

Capture and Log Context When Failing

For binary comparisons, don't just log the stringified expression, log the values of the two operands. For unary expressions, i.e. convertible-to-bool, log the value of that expression.

This should work without having to use separate macros for every comparison operator.

Code Locality for Non-Failing Path

The compiler-generated code (assembly) should not branch to a distant site when the asserted condition is met. Preferably no branch at all should occur when the asserted condition is met.

Don't Waste Cycles on Diagnostics for Non-Failing Path

No preparation of diagnostic information should happen at all when the asserted condition is met.

The largest performance impact permitted when not failing the condition is register spill-over. Specifically the register spill-over caused by the need to retain the values of the comparison expression is permitted.

TODO: Look into compiler optimizations capable of reconstructing the values instead of storing them.

Customizable Handling

Permit the user to override the failure handler. It should stay [[noreturn]] though. Preferrably noexcept as well, although that should probably be customizable.

License

Copyright (C) 2016-2018 Giel van Schijndel

AwesomeAssert is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

AwesomeAssert is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with AwesomeAssert. If not, see http://www.gnu.org/licenses/.