This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/82647] std::tuple_size_v is missing from <array> and <utility>
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 25 Oct 2017 10:55:30 +0000
- Subject: [Bug libstdc++/82647] std::tuple_size_v is missing from <array> and <utility>
- Auto-submitted: auto-generated
- References: <bug-82647-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82647
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
FWIW libc++ only accepts this code because <array> includes the whole of
<algorithm> which includes <memory> which includes <tuple>. So libc++ also
accepts:
#include <array>
int
main()
{
std::tuple<int, int> t;
std::shared_ptr<int> s;
}
And clearly that isn't valid. Libstdc++ headers try to be more careful about
transitive includes, so to use a library feature you need to include the right
header.