Title
“instantiation-dependent” constructs
Status
drafting
Section
13.10.3 [temp.deduct]
Submitter
Adamczyk

Created on 2010-08-05.00:00:00 last changed 160 months ago

Messages

Date: 2011-08-15.00:00:00

Notes from the August, 2011 meeting:

The following example (from issue 1273) was deemed relevant for this issue:

    template <class T> struct C;

    class A {
       int i;
       friend struct C<int>;
    } a;

    class B {
       int i;
       friend struct C<float>;
    } b;

    template <class T>
    struct C {
       template <class U> decltype (a.i) f() { } // #1
       template <class U> decltype (b.i) f() { } // #2
    };

    int main() {
       C<int>().f<int>();     // calls #1
       C<float>().f<float>(); // calls #2
    }
Date: 2011-03-15.00:00:00

Notes from the March, 2011 meeting:

The CWG reconsidered the direction from the November, 2010 meeting, as it would make more constructs dependent, thus requiring more template and typename keywords, resulting in worse error messages, etc.

Date: 2010-11-15.00:00:00

Notes from the November, 2010 meeting:

The CWG favored extending the concepts of “type-dependent” and “value-dependent” to cover these additional cases, rather than adding a new concept.

Date: 2010-08-05.00:00:00

There are certain constructs that are not covered by the existing categories of “type dependent” and “value dependent.” For example, the expression sizeof(sizeof(T())) is neither type-dependent nor value-dependent, but its validity depends on whether T can be value-constructed. We should be able to overload on such characteristics and select via deduction failure, but we need a term like “instantiation-dependent” to describe these cases in the Standard. The phrase “expression involving a template parameter” seems to come pretty close to capturing this idea.

History
Date User Action Args
2011-09-06 00:00:00adminsetmessages: + msg3549
2011-04-10 00:00:00adminsetmessages: + msg3275
2010-11-29 00:00:00adminsetmessages: + msg3129
2010-11-29 00:00:00adminsetstatus: open -> drafting
2010-08-05 00:00:00admincreate