// Origin: PR c++/42797 // { dg-options "-g -O2 -std=c++0x" } template struct integral_constant { static const _Tp value = __v; }; template _Tp declval(); template class __is_constructible_helper { }; template class __is_constructible_helper<_Tp, _Arg> { template static decltype(static_cast<_Tp1>(declval<_Arg1>()), char()) __test(int); public: static const bool __value = sizeof(__test<_Tp, _Arg>(0)) == 1; }; template struct is_constructible : public integral_constant::__value> { }; template struct enable_if { }; template struct enable_if { typedef _Tp type; }; template struct pair { _T1 first; _T2 second; template::value>::type> pair(const _T1& __x, _U2&& __y) : first(__x), second(__y) { } }; namespace __gnu_cxx { template class new_allocator { public: new_allocator() throw() { } new_allocator(const new_allocator&) throw() { } }; } template class allocator: public __gnu_cxx::new_allocator<_Tp> { public: template struct rebind { typedef allocator<_Tp1> other; }; }; template struct _Vector_base { typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; struct _Vector_impl : public _Tp_alloc_type { _Vector_impl() { } }; public: _Vector_impl _M_impl; }; template > class vector : protected _Vector_base<_Tp, _Alloc> { typedef _Alloc allocator_type; public: vector() { } explicit vector(int, const allocator_type& __a = allocator_type()) { } }; template class map { typedef _Key key_type; typedef _Tp mapped_type; typedef pair value_type; public: void insert(const value_type& __x) { } mapped_type& operator[](const key_type& __k) { insert(value_type(__k, mapped_type())); } }; struct Foo { Foo() {} template Foo(Tp *p) {} }; void foo() { map > the_map; the_map[1] = vector(); }