Bug 56679 - [C++11] Cannot take sizeof... a template template parameter pack
Summary: [C++11] Cannot take sizeof... a template template parameter pack
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.6.4
: P3 normal
Target Milestone: 4.9.0
Assignee: Jason Merrill
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2013-03-21 15:22 UTC by Jonathan Wakely
Modified: 2013-03-28 20:13 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Wakely 2013-03-21 15:22:43 UTC
All versions from 4.4 to trunk reject this:

  template <template <typename> class... Args>
  struct Foo {
    static const int value = sizeof...(Args);
  };

  template <typename> struct Bar { };

  const int test = Foo<Bar>::value;


v.cc:3:44: error: missing template arguments before ')' token
     static const int value = sizeof...(Args);
                                            ^


Clang and ICC compile it ok.
Comment 1 Jason Merrill 2013-03-28 20:04:12 UTC
Fixed for 4.9.
Comment 2 Paolo Carlini 2013-03-28 20:13:17 UTC
Indeed. Thanks again!