//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // template // struct allocator_traits // { // template using rebind_traits = allocator_traits>; // ... // }; #include #include template struct ReboundA {}; template struct A { typedef T value_type; template struct rebind {typedef ReboundA other;}; }; template struct ReboundB {}; template struct B { typedef T value_type; template struct rebind {typedef ReboundB other;}; }; template struct C { typedef T value_type; }; template struct D { typedef T value_type; }; template struct E { typedef T value_type; template struct rebind {typedef ReboundA otter;}; }; int main() { #ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES static_assert((std::is_same >::rebind_traits, std::allocator_traits > >::value), ""); static_assert((std::is_same >::rebind_traits, std::allocator_traits > >::value), ""); static_assert((std::is_same >::rebind_traits, std::allocator_traits > >::value), ""); static_assert((std::is_same >::rebind_traits, std::allocator_traits > >::value), ""); static_assert((std::is_same >::rebind_traits, std::allocator_traits > >::value), ""); #else static_assert((std::is_same >::rebind_traits::other, std::allocator_traits > >::value), ""); static_assert((std::is_same >::rebind_traits::other, std::allocator_traits > >::value), ""); static_assert((std::is_same >::rebind_traits::other, std::allocator_traits > >::value), ""); static_assert((std::is_same >::rebind_traits::other, std::allocator_traits > >::value), ""); static_assert((std::is_same >::rebind_traits::other, std::allocator_traits > >::value), ""); #endif }