[PATCH] D55466: Change `tuple_size` from a `class` to a `struct` (see PR#39871)
Marshall Clow via Phabricator
reviews at reviews.llvm.org
Fri Dec 7 17:11:47 PST 2018
mclow.lists created this revision.
mclow.lists added reviewers: EricWF, ldionne.
In the standard, it's a mix of things.
libc++ currently consistently implements this as a `class`.
I talked to the editors, and Jonathan believes that this can be fixed editorially.
I'm assuming that it will end up as a struct, and so here's a patch to implement that.
This will affect people who have specialized `std::tuple_size` for their own uses, and compile with -Wmismatched-tags.
It will also affect people who use libc++ with MS compilers, where the ABI is different between `struct` and `class`
I don't recommend landing this until the change goes into the standard - which will probably be a week or so.
But I was in the neighborhood, and I figured I'd write this up.
https://reviews.llvm.org/D55466
Files:
include/__tuple
include/array
include/tuple
include/utility
test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.fail.cpp
test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.pass.cpp
test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55466.177358.patch
Type: text/x-patch
Size: 7527 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20181208/fed0ac2b/attachment.bin>
More information about the libcxx-commits
mailing list