1 //===----------------------------------------------------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is dual licensed under the MIT and the University of Illinois Open 6 // Source Licenses. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 // <memory> 11 12 // void declare_reachable(void* p); 13 // template <class T> T* undeclare_reachable(T* p); 14 15 #include <memory> 16 #include <cassert> 17 18 int main() 19 { 20 int* p = new int; 21 std::declare_reachable(p); 22 assert(std::undeclare_reachable(p) == p); 23 delete p; 24 } 25