Giel van Schijndel
* Unused variable 'file': using it also gets rid of repetition * No return value, when enum didn't match, from operator<<
|1 year ago|
|include/awesome||1 year ago|
|src||1 year ago|
|test||2 years ago|
|.gitignore||2 years ago|
|.travis.sh||1 year ago|
|.travis.yml||1 year ago|
|CMakeLists.txt||1 year ago|
|COPYING||2 years ago|
|COPYING.LESSER||2 years ago|
|README.md||1 year ago|
|appveyor.yml||1 year ago|
An assert implementation that aims to provide usable information while maintaining as small a performance footprint as possible when not 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.
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.
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.
Permit the user to override the failure handler.
It should stay
noexcept as well, although that should probably be customizable.
Copyright © 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/.