std::atomic_is_lock_free(shared_ptr<T>*) didn't compile
问题 My simple code like this: #include <iostream> #include <atomic> #include <memory> int main(void) { std::shared_ptr<int> p = std::make_shared<int>(5); std::cout << std::boolalpha << std::atomic_is_lock_free(&p) << std::endl; return 0; } But compile error: a.cpp: In function 'int main()': a.cpp:7:60: error: no matching function for call to 'atomic_is_lock_free(std::shared_ptr*)' std::cout << std::boolalpha << std::atomic_is_lock_free(&p) << std::endl; ^ a.cpp:7:60: note: candidates are: In file