mclow.lists closed this revision.
mclow.lists added a comment.
Committed as revision 323296
https://reviews.llvm.org/D35472
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
lebedev.ri added inline comments.
Comment at: test/std/utilities/meta/meta.type.synop/endian.pass.cpp:10
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14, c++1z
+
c++17, not c++1z
At least grep says there are no c++1z left in the libc++ tests.
https://reviews.llvm
mclow.lists updated this revision to Diff 130991.
mclow.lists added a comment.
Update macro checks.
https://reviews.llvm.org/D35472
Files:
include/type_traits
test/std/utilities/meta/meta.type.synop/endian.pass.cpp
Index: test/std/utilities/meta/meta.type.synop/endian.pass.cpp
===
EricWF requested changes to this revision.
EricWF added inline comments.
This revision now requires changes to proceed.
Comment at: include/type_traits:4746
+big= 0xFACE,
+#if _LIBCPP_LITTLE_ENDIAN
+native = little
These macros have been changed to be
mclow.lists updated this revision to Diff 115714.
mclow.lists added a comment.
Fixed test and #ifdef guard
https://reviews.llvm.org/D35472
Files:
include/type_traits
test/std/utilities/meta/meta.type.synop/endian.pass.cpp
Index: test/std/utilities/meta/meta.type.synop/endian.pass.cpp
majnemer added inline comments.
Comment at: test/std/utilities/meta/meta.type.synop/endian.pass.cpp:39-42
+union {
+uint32_t i;
+char c[4];
+} u = {0x01020304};
This is undefined behavior as-is because you are reading from a union member
mclow.lists added inline comments.
Comment at: include/type_traits:4740
+#if _LIBCPP_STD_VER > 14
+enum class endian
lebedev.ri wrote:
> (Apologies for double commenting, did not notice that it was in phab until
> after replying)
>
> I'm probably wrong, but i
lebedev.ri added inline comments.
Comment at: include/type_traits:4740
+#if _LIBCPP_STD_VER > 14
+enum class endian
(Apologies for double commenting, did not notice that it was in phab until
after replying)
I'm probably wrong, but if this is a C++2a proposal,
On Mon, Jul 17, 2017 at 6:08 AM, Marshall Clow via Phabricator via
cfe-commits wrote:
> mclow.lists created this revision.
>
> Implement the C++2a feature "A compile time endian-ness detection idiom"
> Howard's suggested implementation is:
>
> enum class endian
> {
> #ifdef _WIN32
mclow.lists created this revision.
Implement the C++2a feature "A compile time endian-ness detection idiom"
Howard's suggested implementation is:
enum class endian
{
#ifdef _WIN32
little = 0,
big= 1,
native = little
#else
10 matches
Mail list logo