CWG Issue 1471 (original) (raw)

This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 117a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2025-04-13


1471. Nested type of non-dependent base

Section: 13.8.3.2 [temp.dep.type]Status: CD3Submitter: Johannes SchaubDate: 2012-02-26

[Moved to DR at the April, 2013 meeting.]

Even though A::C is a nested type and member of the current instantiation, and thus dependent by the rules of 13.8.3.2 [temp.dep.type] paragraph 8, there does not seem to be a good reason for making it so:

struct B { struct C { }; };

template struct A : B { A::C c; };

Proposed resolution (October, 2012):

[Some existing uses of the term “member of the current instantiation” are consistent with the definition in 13.8.3.2 [temp.dep.type] paragraph 4; others are intended to refer to members of the “current instantiation,” as defined in paragraph 1. The following resolution changes the latter to use the phrase “member of a class that is the current instantiation.”]

  1. Change 13.8.3.2 [temp.dep.type] paragraph 4 as follows:

A name is a member of the current instantiation if it is

[Example: ... —_end example_]

A name is a _dependent member of the current instantiation_if it is a member of the current instantiation which, when looked up, refers to at least one member of a class that is the current instantiation.

  1. Change 13.8.3.2 [temp.dep.type] paragraph 5 as follows:

A name is a member of an unknown specialization if it is

  1. Change 13.8.3.2 [temp.dep.type] paragraph 8 as follows:

A type is dependent if it is

  1. Change 13.8.3.3 [temp.dep.expr] paragraph 3 as follows:

An id-expression is type-dependent if it contains

or if it names a static data dependent member of the current instantiation that has is a static data member of type “array of unknown bound ofT” for some T (13.7.2.5 [temp.static]). Expressions of the following forms...

  1. Change 13.8.3.4 [temp.dep.constexpr] paragraph 2 as follows (assumes the base text is as modified by issue 1413):

An id-expression is value-dependent if:

Expressions of the following form...

  1. Change 13.8.3.4 [temp.dep.constexpr] paragraph 5 as follows (assumes the base text is as modified by issue 1413):

An expression of the form &qualified-id where the_qualified-id_'s nested-name-specifier namesa dependent member of the current instantiation is value-dependent.