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

2024-12-19


2265. Delayed pack expansion and member redeclarations

Section: 13.9.2  [temp.inst]     Status: drafting     Submitter: Hubert Tong     Date: 2016-05-11

It is not clear how to handle parameter packs that are expanded during instantiation in parallel with those that are not yet concrete. In particular, does the following example require a diagnostic?

  template<typename ...T> struct Tuple;
  template<class T, class U> struct Outer;
  template<class ...T, class ...U>
  struct Outer<Tuple<T ...>, Tuple<U ...> > {
    template<class X, class Y> struct Inner;
    template<class ...Y> struct Inner<Tuple<T, Y> ...> { };
    template<class ...Y> struct Inner<Tuple<U, Y> ...> { };
  };
  Outer<Tuple<int, void>, Tuple<int, void> > outer;

Notes from the March, 2018 meeting:

CWG felt that ill-formed, no diagnostic required was the correct approach.