Title
Explicitly-specified non-deduced parameter packs
Status
drafting
Section
13.10.2 [temp.arg.explicit]
Submitter
Jonathan Caves

Created on 2014-12-09.00:00:00 last changed 87 months ago

Messages

Date: 2014-12-09.00:00:00

According to 13.10.2 [temp.arg.explicit] paragraph 3,

Trailing template arguments that can be deduced (13.10.3 [temp.deduct]) or obtained from default template-arguments may be omitted from the list of explicit template-arguments. A trailing template parameter pack (13.7.4 [temp.variadic]) not otherwise deduced will be deduced to an empty sequence of template arguments. If all of the template arguments can be deduced, they may all be omitted; in this case, the empty template argument list <> itself may also be omitted. In contexts where deduction is done and fails, or in contexts where deduction is not done, if a template argument list is specified and it, along with any default template arguments, identifies a single function template specialization, then the template-id is an lvalue for the function template specialization.

It is not clear that this permits an example like:

  template<typename... T> void f(typename T::type...)   {
  }

  int main() {
    f<>();
  }

See also issue 2105.

History
Date User Action Args
2017-02-06 00:00:00adminsetstatus: open -> drafting
2014-12-09 00:00:00admincreate