1 // PR sanitizer/61272 2 // { dg-do compile } 3 // { dg-options "-fsanitize=undefined -std=c++11" } 4 5 namespace std 6 { 7 template < typename _Tp > class allocator; 8 template < typename _Alloc > struct allocator_traits { 9 private: 10 template < typename _Tp > auto construct ( _Alloc & __a, _Tp * __p)-> // { dg-message "private" } 11 decltype (_S_construct (__a, __p)) { } 12 }; 13 namespace __gnu_cxx 14 { 15 template < typename _Alloc > struct __alloc_traits:std::allocator_traits < _Alloc > 16 { 17 typedef std::allocator_traits < _Alloc > _Base_type; 18 using _Base_type::construct; // { dg-error "within this context" } 19 }; 20 template < typename _Tp, typename _Alloc > struct _Vector_base { typedef typename __gnu_cxx::__alloc_traits < _Alloc >::template rebind < _Tp >::other _Tp_alloc_type; }; // { dg-error "no class template" } 21 template < typename _Tp, typename _Alloc = std::allocator < _Tp > >class vector : protected _Vector_base < _Tp, _Alloc > { }; 22 template < typename NumberT > struct Point2d { }; 23 typedef Point2d < int >GdsPoint; 24 class GdsPointList : public vector < GdsPoint > {};}} 25