Bug 56427 - [C++11] template template parameter template parameter pack that depends on another parameter pack
Summary: [C++11] template template parameter template parameter pack that depends on a...
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: rejects-valid
Depends on: 35022 54440
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-22 17:53 UTC by Jason Merrill
Modified: 2021-08-02 03:38 UTC (History)
6 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail: 4.8.1, 4.9.0
Last reconfirmed: 2021-08-01 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Merrill 2013-02-22 17:53:14 UTC
+++ This bug was initially created as a clone of Bug #35022 +++

This code snippet should be accepted:

  template<typename... T, template<T...> class X> void foo(X<0>);

but it fails with

  sorry, unimplemented: use of ‘type_pack_expansion’ in template

This is related to bug 54440.
Comment 1 Jason Merrill 2013-02-25 19:48:18 UTC
More testcase:

template<typename... T, template<T...> class X> void foo(X<0>);
template<typename... T, template<T> class... X> void bar(X<0>...);

template <int I> struct A { };
template <unsigned U> struct B { };

int main()
{
  foo<int>(A<0>());
  bar<int,unsigned>(A<0>(),B<0>());
}
Comment 2 Marek Polacek 2013-07-25 08:33:46 UTC
Well, confirmed.
Comment 3 Jakub Jelinek 2014-04-22 11:36:18 UTC
GCC 4.9.0 has been released
Comment 4 Jakub Jelinek 2014-07-16 13:28:55 UTC
GCC 4.9.1 has been released.
Comment 5 Jakub Jelinek 2014-10-30 10:39:01 UTC
GCC 4.9.2 has been released.
Comment 6 Jakub Jelinek 2015-06-26 19:59:15 UTC
GCC 4.9.3 has been released.
Comment 7 Andrew Pinski 2021-08-02 03:38:01 UTC
GCC, ICC and MSVC all rejects this.
Clang accepts this.