-
Notifications
You must be signed in to change notification settings - Fork 265
Closed
Labels
Description
This is minor one.
When skimming through some snippets, I got impression that you can write
[[assert: 42]]
Which is actually not checking for value, (say, of short-syntax function), and just implicit converted to bool
According to this note at ES.87, checking for pointers is good, but checking integers without comparison can be suspicious.
Probably assert accepting only bools or pointers can be implemented with the help of concepts like std::is_arithmetic_v and std::is_pointer_v instead of simply bool
Line 325 in f83ca9b
| constexpr auto expects (bool b, CPP2_MESSAGE_PARAM msg = "" CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT) |