[Bug c++/57565] New: variadic template and type inference failure
anass.lasram at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Jun 7 23:12:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57565
Bug ID: 57565
Summary: variadic template and type inference failure
Product: gcc
Version: 4.8.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: anass.lasram at gmail dot com
Created attachment 30279
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30279&action=edit
sources, compiler details and command line
#include<iostream>
#include<tuple>
// #define DISABLE_COMPILE_ERROR
template<int... t>
void bug()
{
#ifndef DISABLE_COMPILE_ERROR
auto tpl = std::make_tuple(t...); // doesn't compile but it should
#else
std::tuple<int,int,int> tpl = std::make_tuple(t...);
#endif
std::cout << std::get<0>(tpl) << " , " << std::get<1>(tpl) << " , " <<
std::get<2>(tpl) << std::endl;
}
int main()
{
bug<10,20,30>();
return 0;
}
More information about the Gcc-bugs
mailing list