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

2024-11-11


1844. Defining “immediate context”

Section: 13.10.3  [temp.deduct]     Status: open     Submitter: Richard Smith     Date: 2014-01-28     Liaison: EWG

The handling of an example like

  template<typename T, std::size_t S = sizeof(T)> struct X {};
  template<typename T> X<T> foo(T*);
  void foo(...);

  void test() { struct S *s; foo(s); }

varies among implementations, presumably because the meaning of “immediate context” in determining whether an error is a substitution failure or a hard error is not clearly defined.

Notes from the February, 2016 meeting:

See also issue 1554; the resolution of this issue should also deal with alias templates.

CWG 2024-06-28

See also issue 2296.