You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Generalize _string-literal_ of contract like C++26's static_assert #751
Custom text output after a contract failure isn't part of the Contracts' MVP.
If Cpp2's contracts feature is going to have this anyways,
we could craft better diagnostics messages
if its second argument behaved like that of static_assert in C++26.
// After P2361R6 and P2741R3:
static_assert(std::is_same_v<int, decltype(0)>, std::string("0") + " was not `int`.");
main: () = {
[[assert: std::is_same_v<int, decltype(0)>, std::string("0") + " was not `int`."]]
}
Activity
Add attempted/actual bounds to default bounds checks messages
gregmarr commentedon Dec 19, 2023
Unless/until we have the ability to have an argument that is not evaluated, you could just protect the
v.front()in the string as well.hsutter commentedon Dec 20, 2023
Fixed, thanks!
Allow non-literal strings (incl. interpolations) in contract violatio…