Skip to content

22-120r2 Generics formal requirements: Overcoming strong concept clunkiness #73

Open
@zjibben

Description

@zjibben

L. A template may not use any procedures or operators except those
that have been specified in a REQUIRES statement.
Rationale: This is the notion of a "strong concept" which allows
template developers to ensure that a template does not
have any implicit requirements that might not be
detected for some unanticipated template parameters.

A colleague at LANL recently told me strong concepts sound cumbersome, in certain scenarios. For instance, if you have a deep tree of templated code, and you need to call a new function at the bottom, it's necessary to add a requirement for that interface at every level of the call stack. In some sense this is like passing data by argument, but this would be especially tedious when temporarily introducing extra operations for debugging purposes. Has subgroup discussed ways to mitigate this?

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