Title
Clarifying compatibility during partial ordering
Status
cd4
Section
13.10.3.6 [temp.deduct.type]
Submitter
Jason Merrill

Created on 2014-01-30.00:00:00 last changed 49 months ago

Messages

Date: 2015-10-15.00:00:00

[Moved to DR at the October, 2015 meeting.]

Date: 2015-05-15.00:00:00

Proposed resolution (May, 2015):

This issue is resolved by the resolution of issue 1391.

Date: 2014-01-30.00:00:00

There is implementation divergence in the handling of an example like

  template<typename D> struct A { };
  template<typename T> struct Wrap1 { typedef T type; };
  template<typename T> struct Wrap2 { typedef T type; };

  template<typename T1>
  A<typename Wrap1<T1>::type>
  fn(const A<T1>& x, const A<T1>& y);

  template<typename T2, typename U>
  A<typename Wrap2<T2>::type>
  fn(const A<T2>& x, const A<U>& y);

  A<int> (*p)(const A<int>&, const A<int>&) = fn;

The implementations that accept this example do so by not comparing the return types of the two templates during partial ordering, which seems to make sense given that partial ordering would not have been performed if the candidate specializations were not indistinguishable from the perspective of overload resolution. However, the existing wording is not clear that that is how such types are be handled.

History
Date User Action Args
2017-02-06 00:00:00adminsetstatus: dr -> cd4
2015-11-10 00:00:00adminsetmessages: + msg6082
2015-11-10 00:00:00adminsetstatus: ready -> dr
2015-05-25 00:00:00adminsetmessages: + msg5467
2015-05-25 00:00:00adminsetstatus: drafting -> ready
2014-01-30 00:00:00admincreate