1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 // template <ObjectType T> T* addressof(T& r);
19 void operator&() const {}
35 assert(std::addressof(i) == &i);
36 assert(std::addressof(d) == &d);
39 assert(std::addressof(*tp) == tp);
40 assert(std::addressof(*ctp) == tp);
49 assert(std::addressof(n) == (void*)std::addressof(i));