Title
decltype and the current instantiation
Status
c++11
Section
13.8.3.2 [temp.dep.type]
Submitter
Mike Miller

Created on 2010-03-18.00:00:00 last changed 96 months ago

Messages

Date: 2011-03-15.00:00:00

[Voted into the WP at the March, 2011 meeting as part of paper N3262.]

Date: 2010-11-15.00:00:00

Proposed resolution (November, 2010) [SUPERSEDED]:

This issue is resolved by the resolution of issue 1056.

Date: 2010-11-15.00:00:00

Notes from the November, 2010 meeting:

The example is not well-formed; if T is an rvalue reference type, for example, decltype(T()) is not equivalent to T.

Date: 2010-03-18.00:00:00

According to 13.8.3.2 [temp.dep.type] paragraph 3,

A template argument that is equivalent to a template parameter (i.e., has the same constant value or the same type as the template parameter) can be used in place of that template parameter in a reference to the current instantiation.

This would presumably include something like

    template<typename T> struct A {
        struct B { };
        A<decltype(T())>::B b;    // no typename
    };

However, this example is rejected by current implementations. Does this need to be clarified in the existing wording?

History
Date User Action Args
2014-03-03 00:00:00adminsetstatus: fdis -> c++11
2011-04-10 00:00:00adminsetmessages: + msg3394
2011-04-10 00:00:00adminsetstatus: review -> fdis
2010-11-29 00:00:00adminsetmessages: + msg3108
2010-11-29 00:00:00adminsetmessages: + msg3107
2010-11-29 00:00:00adminsetstatus: open -> review
2010-03-18 00:00:00admincreate