1 //===----------------------------------------------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 // <memory> 10 11 // template <class T> 12 // struct pointer_traits<T*> 13 // { 14 // template <class U> using rebind = U*; 15 // ... 16 // }; 17 18 #include <memory> 19 #include <type_traits> 20 21 #include "test_macros.h" 22 main(int,char **)23int main(int, char**) 24 { 25 #if TEST_STD_VER >= 11 26 static_assert((std::is_same<std::pointer_traits<int*>::rebind<double>, double*>::value), ""); 27 #else 28 static_assert((std::is_same<std::pointer_traits<int*>::rebind<double>::other, double*>::value), ""); 29 #endif 30 31 return 0; 32 } 33