Skip to content

Handling of post conditions in functions with place-holder return types #32

@iains

Description

@iains

Another case to check.


auto foo (int x) post (r:  r >10) { ..... }

In this case, we need to defer the processing of the post condition until the return type is known (IIRC P2900 says that this should not be done by making the function dependent - which, I suspect is what the C++2a edition of this is doing).

The most reasonable way to do this would be to carry out the relevant actions in finish_function where the return type is known (but I think that will need some re-ordering of actions in finish_function too). Perhaps, rather than special-casing this, we might just do all of the processing there for the sake of symmetry,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions