assertion requirements don't work when all types known
Contract Programming Library for C++
Status: Pre-Alpha
Brought to you by:
lcaminiti
Assertion requirements seem to not work when all types are known even if the function that actually asserts the condition is internally implemented as a template... why?
When all types are know, compilation of the function template is not delayed, so the asserted condition will error if the requirements are not met, instead of just being disabled :(
Is there a way to delay compilation of the assertion condition even in a scope where all types are known?
The most important use of assertion requirements is to disable compilation in type-depended context where types are not know, so this is a limitation but not a blocking one.
Technically, when all types are known programmers can (and probably should) just omit the assertion and maybe use a code comment to capture the assertion because such an assertion will always be disabled by the assertion requirement.
However, I should still fix this if it is possible to delay compilation in this case.