A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/CWG/issues/1847.html below:

CWG Issue 1847

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

2025-08-11

1847. Clarifying compatibility during partial orderingSection: 13.10.3.6  [temp.deduct.type]     Status: CD4     Submitter: Jason Merrill     Date: 2014-01-30

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

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.

Proposed resolution (May, 2015):

This issue is resolved by the resolution of issue 1391.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4