Skip to content

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

Description

@aury6623

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions