[Bug libstdc++/82647] std::tuple_size_v is missing from <array> and <utility>
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Oct 25 10:55:00 GMT 2017
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.
More information about the Gcc-bugs
mailing list