[libcxx-commits] [PATCH] D65370: libcxx: Define __STDCPP_THREADS__ to 1, not to __cplusplus.
Eric Fiselier via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jul 28 09:19:45 PDT 2019
EricWF added inline comments.
================
Comment at: libcxx/include/thread:17
-#define __STDCPP_THREADS__ __cplusplus
+#define __STDCPP_THREADS__ 1
----------------
This doesn't actually appear in the header synopsis, since it's supposed to be predefined by the compiler.
And if it's supposed to be predefined, I think `__config` may be a more appropriate place for it to live.
================
Comment at: libcxx/include/thread:110
-#define __STDCPP_THREADS__ __cplusplus
+#define __STDCPP_THREADS__ 1
----------------
This should be defined by the compiler, not the library. So we should only define it if it hasn't already been defined.
================
Comment at: libcxx/test/std/thread/macro.pass.cpp:21
{
#ifndef __STDCPP_THREADS__
#error __STDCPP_THREADS__ is not defined
----------------
Can you add a test that it's defined to `1` specifically?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65370/new/
https://reviews.llvm.org/D65370
More information about the libcxx-commits
mailing list