Title
Template template arguments with default arguments
Status
drafting
Section
13.4.4 [temp.arg.template]
Submitter
Jonathan Caves

Created on 2014-12-12.00:00:00 last changed 94 months ago

Messages

Date: 2016-02-15.00:00:00

Notes from the February, 2016 meeting:

CWG felt that this usage should be permitted, but only for template template parameters with a parameter pack.. Furthermore, if the template template parameter has a default argument followed by a parameter pack, the parameter's default argument would be used, followed by any remaining default arguments from the template template argument.

Date: 2014-12-12.00:00:00

It is not clear how to handle an example like:

  template<typename T1, typename T2 = char> class A { };

  template<template<typename... T> class X> class S {
    X<int> x;
  };

  S<A> a;

Issue 184 dealt with a similar question but did so in the era before variadic templates. This usage should be permitted in modern C++.

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