Title
Ambiguous partial specializations of member class templates
Status
c++11
Section
13.7.6 [temp.spec.partial]
Submitter
Doug Gregor

Created on 2009-10-28.00:00:00 last changed 131 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

Notes from the November, 2010 meeting:

The instantiation of Outer<int,int> results in duplicate declarations of the partial specialization, which are ill-formed by 11.4 [class.mem] paragraph 1. No normative change is required, but it might be helpful to add an example like this somewhere.

Date: 2022-06-11.20:21:09

Given an example like

  template<typename T, typename U>
  struct Outer {
    template<typename X, typename Y> struct Inner;
    template<typename Y> struct Inner<T, Y> {};
    template<typename Y> struct Inner<U, Y> {};
  };
  Outer<int, int> outer;                      // #1
  Outer<int, int>::Inner<int, float> inner;   // #2

Is #1 ill-formed because of the identical partial specializations? If not, presumably #2 is ill-formed because of the resulting ambiguity (13.7.6.2 [temp.spec.partial.match] paragraph 1).

History
Date User Action Args
2014-03-03 00:00:00adminsetstatus: fdis -> c++11
2011-04-10 00:00:00adminsetmessages: + msg3387
2011-04-10 00:00:00adminsetstatus: drafting -> fdis
2010-11-29 00:00:00adminsetmessages: + msg3126
2010-11-29 00:00:00adminsetstatus: open -> drafting
2009-10-28 00:00:00admincreate