Movatterモバイル変換


[0]ホーム

URL:


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

2025-11-05


2109. Value dependence underspecified

Section:13.8.3.4  [temp.dep.constexpr]    Status:CD4    Submitter:Maxim Kartashev    Date:2015-03-26

[Adopted at the February, 2016 meeting.]

In the following example,

  struct A {};  struct X {     template <typename Q>     int memfunc();  };  template <int (X::* P) ()> int foo(...);  template<class T> struct B {     static int bar() {       A a;       return foo<&X::memfunc<T> >(a);     }  };  template <int (X::* P) ()>  int foo(A a) { return 0; }  int main()  {     return B<int>::bar();  }

the callfoo<&X::memfunc<T> >(a); isdependent only if the template argument is dependent, which isonly true because of the use of the template parameterT.Implementations generally agree that this is dependent, but theredoes not appear to be wording to support this determination.

Proposed resolution (September, 2015):

Change 13.8.3.4 [temp.dep.constexpr] paragraph 2 as follows:

Anid-expression is value-dependent if:

This resolution also resolvesissue 2066.




[8]ページ先頭

©2009-2025 Movatter.jp