[Bug c++/54126] ICE on constexpr move ctor with const ref type instead of error

morpheby at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Jul 30 14:56:00 GMT 2012


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

--- Comment #3 from Ilya Mikhaltsou <morpheby at gmail dot com> 2012-07-30 14:56:31 UTC ---
Reduced source:

namespace std {
template<class _E> class initializer_list {
};
}
using namespace std;

class ClassB {
public:
   constexpr ClassB(int x) {}
};

template<class T1> struct ClassA {
   template<class U1> constexpr ClassA(U1 &&a)
      : a_(a) {}
   T1 a_;
};

void f(std::initializer_list<ClassA<const ClassB&>> l) {
   f({
      {1}
   });
}



More information about the Gcc-bugs mailing list