Title
Default types in requirements in auto concepts
Status
concepts
Section
_N2914_.14.10.2.2 [concept.map.assoc]
Submitter
James Widman

Created on 2009-05-28.00:00:00 last changed 179 months ago

Messages

Date: 2009-11-08.00:00:00

Given the following example:

    auto concept C<typename T, typename U> {
      Returnable U;
      typename type = T&&;
      U::U(type);
    }

_N2914_.14.10.2.2 [concept.map.assoc] paragraph 5 says,

If an associated type or class template (_N2914_.14.10.1.2 [concept.assoc]) has a default value, a concept map member satisfying the associated type or class template requirement shall be implicitly defined by substituting the concept map arguments into the default value.

It is not clear what the order of processing should be between this step and the formation of the expression in _N2914_.14.10.2.1 [concept.map.fct]. Deduction of the associated type (in _N2914_.14.10.2.2 [concept.map.assoc] paragraph 4) isn't used in this example, but in general requires the expression, but the expression can't be created without the definition of the associated type. Perhaps the approach should be to attempt to define the expression, fail for want of the associated type, apply the default, and then try to define the expression again. Whatever the answer, this needs to be spelled out more clearly.

History
Date User Action Args
2009-08-03 00:00:00adminsetstatus: open -> concepts
2009-05-28 00:00:00admincreate