//===----------------------------------------------------------------------===// // // ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚ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 // { // static pointer allocate(allocator_type& a, size_type n); // ... // }; #include #include template struct A { typedef T value_type; value_type* allocate(std::size_t n) { assert(n == 10); return (value_type*)0xDEADBEEF; } }; int main() { A a; assert(std::allocator_traits >::allocate(a, 10) == (int*)0xDEADBEEF); }