Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using a deferred-arg in a nested template REQUIRES statement #129

Open
aury6623 opened this issue May 20, 2024 · 0 comments
Open

Using a deferred-arg in a nested template REQUIRES statement #129

aury6623 opened this issue May 20, 2024 · 0 comments

Comments

@aury6623
Copy link
Contributor

aury6623 commented May 20, 2024

This is an issue we discussed during today's meeting. See this example:

template tmpl{C}
    integer, constant :: C
    temlplate tmpl{T}
        requires my_rqmt{C, T}
    end template
end template

The REQUIRES statement "provides specifications of deferred arguments by associating them with the deferred arguments of a REQUIREMENT."
Furthermore, "Each <deferred-const> shall appear in <deferred-arg-list> of the innermost scoping unit." (reworded in #119).

Both of these things indicate that C is not permitted in the requires statement. C is host-associated, so the requires statement can't provide specifications for it.

However, it might be really useful to be able to use C in that requires statement.

This issue also applies to deferred types or procedures, not just constants.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant