Title
Deducing a function parameter pack before ellipsis
Status
c++14
Section
13.10.3.6 [temp.deduct.type]
Submitter
Michael Wong

Created on 2012-02-06.00:00:00 last changed 122 months ago

Messages

Date: 2013-09-15.00:00:00

[Moved to DR at the September, 2013 meeting.]

Date: 2013-06-15.00:00:00

Proposed resolution (June, 2013):

Change 13.10.3.6 [temp.deduct.type] paragraph 5 as follows

The non-deduced contexts are:

  • ...

  • A function parameter pack that does not occur at the end of the parameter-declaration-clause parameter-declaration-list.

Date: 2013-05-03.00:00:00

According to 13.10.3.6 [temp.deduct.type] paragraph 5, one of the non-deduced contexts is

A function parameter pack that does not occur at the end of the parameter-declaration-clause.

This would make the following example ill-formed:

  template <typename R, typename ...P>
  void foo(R (&)(P ..., ...)) { }

  void bar(int, ...) { }

  void zip() {
   foo(bar);
  }

It is not clear whether this is intentional; if the wording referred to parameter-declaration-list instead of parameter-declaration-clause, the example would be accepted.

History
Date User Action Args
2014-11-24 00:00:00adminsetstatus: drwp -> c++14
2014-03-03 00:00:00adminsetstatus: dr -> drwp
2013-10-14 00:00:00adminsetmessages: + msg4701
2013-10-14 00:00:00adminsetstatus: tentatively ready -> dr
2013-09-03 00:00:00adminsetmessages: + msg4468
2013-09-03 00:00:00adminsetstatus: drafting -> tentatively ready
2013-05-03 00:00:00adminsetstatus: open -> drafting
2012-02-06 00:00:00admincreate