//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // allocator: // pointer address(reference x) const; // const_pointer address(const_reference x) const; #include #include template void test_address() { T* tp = new T(); const T* ctp = tp; const std::allocator a; assert(a.address(*tp) == tp); assert(a.address(*ctp) == tp); delete tp; } struct A { void operator&() const {} }; int main() { test_address(); test_address(); }