constexpr-contracts
constexpr-contracts copied to clipboard
Pre-conditions, post-conditions, and assertions, all available at compile-time
As mentioned in the original PR #9 , fixes a potential issue when the user has called `std::ios_base::sync_with_stdio(false)`
Extends #11 by taking advantage of compile-time information to generate a single error message string (instead of 3) before printing.
Once `std::format` and constexpr `std::string` are supported by the implementation, move to those, and possibly even `fmt::print`.
libc++ doesn't support `source_location` yet. Once it does, move away from `__FILE__` and `__LINE__`.
clang-tidy doesn't seem to respect feature-test macros, but part of the design is done so that clang-tidy doesn't see through attempts to force a compile-time error (e.g. not using `static_assert`...