[PATCH] D58201: Make std::memory_order an enum class (P0439R0)
Zoe Carver via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 5 08:29:42 PST 2019
zoecarver marked an inline comment as done.
zoecarver added inline comments.
================
Comment at: include/atomic:613
+
+static_assert(_VSTD::is_same<typename _VSTD::underlying_type<memory_order>::type,
+ unsigned>::value, "Underlying type differs from unsigned unexpectedly");
----------------
ldionne wrote:
> ldionne wrote:
> > `typename` is not needed here, this is not a dependent context.
> Also, you need to wrap the `is_same<underlying_type<...>::type, unsigned>::value` into parenthesis because this will otherwise trip up our `static_assert` emulation. This could have been noticed by running the test suite in c++03 mode with `./build/bin/llvm-lit -sv libcxx/test/std/atomics --param=std=c++03` (assuming a standard CMake setup).
Thanks for fixing this! I will make sure to test C++03 next time. Is there a param to run with GCC?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58201/new/
https://reviews.llvm.org/D58201
More information about the llvm-commits
mailing list