This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/82647] std::tuple_size_v is missing from <array> and <utility>


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]