Movatterモバイル変換


[0]ホーム

URL:


Issue 1275 - WG21 CWG Issues
Title
Incorrect comment in example of template parameter pack restriction
Status
cd3
Section
13.2 [temp.param]
Submitter
Johannes Schaub

Created on2011-03-25.00:00:00 last changed145 months ago

Messages

msg4013 (view)
Date: 2012-02-15.00:00:00

[Voted into the WP at the February, 2012 meeting;moved to DR at the October, 2012 meeting.]

msg3830 (view)
Date: 2011-08-15.00:00:00

Proposed resolution (August, 2011):

Change 13.2 [temp.param] paragraph 11 as follows:

...A template parameter pack of a function template shall not befollowed by another template parameter unless that template parametercan be deducedfrom theparameter-type-list of thefunction template or has a default argument (13.10.3 [temp.deduct]). [Example:

  template<class T1 = int, class T2> class B;   // error  //U cannot be deducedfrom theparameter-type-list or specified  template<class... T, class... U> void f() { }// error  template<class... T, class U> void g() { }// error

end example]

msg3489 (view)
Date: 2012-09-24.00:00:00

The following example from 13.2 [temp.param] paragraph 11is incorrect:

  //U cannot be deduced or specified  template<class... T, class... U> void f() { }  template<class... T, class U> void g() { }

In fact,U can be deduced to an empty sequence by13.10.2 [temp.arg.explicit] paragraph 3:

A trailing template parameter pack (13.7.4 [temp.variadic]) nototherwise deduced will be deduced to an empty sequence of templatearguments.
History
DateUserActionArgs
2014-03-03 00:00:00adminsetstatus: drwp -> cd3
2012-11-03 00:00:00adminsetstatus: dr -> drwp
2012-09-24 00:00:00adminsetmessages: +msg4013
2012-02-27 00:00:00adminsetmessages: +msg3830
2012-02-27 00:00:00adminsetstatus: ready -> dr
2011-03-25 00:00:00admincreate

[8]ページ先頭

©2009-2026 Movatter.jp