//===----------------------------------------------------------------------===// // // 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. // //===----------------------------------------------------------------------===// // // template // bool // atomic_is_lock_free(const volatile atomic* obj); // // template // bool // atomic_is_lock_free(const atomic* obj); #include template void test() { typedef std::atomic A; A t; bool b1 = std::atomic_is_lock_free(static_cast(&t)); volatile A vt; bool b2 = std::atomic_is_lock_free(static_cast(&vt)); } struct A { char _[4]; }; int main() { test(); test(); test(); test(); test(); test(); test(); test(); test(); test(); test(); test(); test(); #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS test(); test(); #endif // _LIBCPP_HAS_NO_UNICODE_CHARS test(); test(); }