This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/53862] [C++11] sorry, unimplemented: use of 'type_pack_expansion' in template
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 05 Jul 2012 09:48:33 +0000
- Subject: [Bug c++/53862] [C++11] sorry, unimplemented: use of 'type_pack_expansion' in template
- Auto-submitted: auto-generated
- References: <bug-53862-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53862
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-07-05
Ever Confirmed|0 |1
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-07-05 09:48:33 UTC ---
It compiles OK if you just change f(Args...) to f(Args&&...)
Reduced to remove header (and C++11) dependencies:
typedef unsigned long size_t;
template<typename> struct is_scalar { static const bool value = true; };
template<bool, typename T> struct enable_if { typedef T type; };
template <size_t N, typename... Args>
void f(Args...) {}
template <size_t N, typename T, typename... Args>
typename enable_if<is_scalar<T>::value, void>::type f(T, Args...) {}
int main() {
f<1>(1);
}