// { dg-do compile { target c++11 } } template class _Op, typename... _Args> struct __detector { using type = _Op<_Args...>; }; template class _Op, typename... _Args> using __detected_or = __detector<_Default, void, _Op, _Args...>; template class _Op, typename... _Args> using __detected_or_t = typename __detected_or<_Default, _Op, _Args...>::type; template struct allocator_traits { template using __pointer = typename _Tp::pointer; using pointer = __detected_or_t; }; template struct _Pointer_adapter { typedef typename _Storage_policy::element_type element_type; typedef element_type& reference; }; template inline _Tp* addressof(_Tp& __r); // { dg-warning "used but never defined" } template struct __allocated_ptr { __allocated_ptr() { using pointer = typename allocator_traits<_Alloc>::pointer; typename _Pointer_adapter::reference __r = *(int*)0; addressof(__r); } }; template struct _Std_pointer_impl { typedef _Tp element_type; }; template struct CustomPointerAlloc { typedef Tp value_type; typedef _Pointer_adapter<_Std_pointer_impl> pointer; }; __allocated_ptr> __guard_ptr;