This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/33091] [c++0x] ICE using remove_reference on variadic param pack



------- Comment #5 from chris dot fairles at gmail dot com  2007-08-28 12:32 -------
The following code snippet also causes an ICE (g++43 (GCC) 4.3.0 20070828
(experimental) with -Wall, -g and -std=c++0x)
test4.cpp: In instantiation of ?A<int>?:
test4.cpp:11:   instantiated from here
test4.cpp:7: internal compiler error: tree check: expected tree_vec, have
type_pack_expansion in tsubst_copy_and_build, at cp/pt.c:10434


#include <type_traits>

template <typename... T>
struct A {
    template <typename... U>
    typename std::enable_if<(sizeof...(T) == sizeof...(U)),A&>::type
    operator=(A<U...> const&) {}
};

int main() {
    A<int> a;
    A<int,double> b;
    a = b;
}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33091


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]