[cfe-users] How to check for std::atomic availability?

Jeffrey Walton via cfe-users cfe-users at lists.llvm.org
Mon May 2 18:13:53 PDT 2016


I'm having trouble parsing docs like
http://llvm.org/releases/3.3/tools/clang/docs/LanguageExtensions.html
and http://clang.llvm.org/docs/LanguageExtensions.html.

I see there's a 'has_feature(c_atomic)'. Its not quite what I am looking for.

How do I check for the availability of c++ atomic so I can use:

    std::atomic_thread_fence(std::memory_order_acq_rel);

Thanks in advance.



More information about the cfe-users mailing list