Menu

#54 assertion requirements don't work when all types known

1.0.0
accepted
None
Implementation
minor
0.4.0
defect
2012-09-10
2012-05-24
No

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.

Discussion

  • Lorenzo Caminiti

    • priority changed from critical to minor
     
  • Lorenzo Caminiti

    • status changed from new to accepted

    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.

     
  • Lorenzo Caminiti

    • milestone changed from Future to 1.0.0
     

Log in to post a comment.