[Bug c++/52824] New: [C++11] expanding variadic template arguments into non-variadic template
zeratul976 at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Apr 1 21:29:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52824
Bug #: 52824
Summary: [C++11] expanding variadic template arguments into
non-variadic template
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: zeratul976@hotmail.com
The fix to PR 35722 fixed many cases of expanding variadic template arguments
into a non-variadic template.
However, the following example (a simple modification of the PR 35722 example,
I just removed the default template arguments from 'foo') gives a bogus error:
template<typename G, typename H>
struct foo
{};
template<typename... G>
struct bar : foo<G...>
{};
int main() {
bar<int, float> f;
}
The error is:
test.cpp:6:22: error: wrong number of template arguments (1, should be 2)
test.cpp:2:8: error: provided for 'template<class G, class H> struct foo'
More information about the Gcc-bugs
mailing list