Similarly to https://reviews.llvm.org/rL350972 this revision changes std::tuple_element from class to struct. Fixes PR#41331.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Did you check the places that inherit from tuple_element? The public/private bits change between class and struct.
Never mind. I was thinking of something else; I don't think that anything inherits from tuple_element
Right, there shouldn't be any inheritance. Some of the public: access specifications are now redundant, though. Instead of
template <size_t I, class... Types> struct tuple_element<I, tuple<Types...> > { public: typedef Ti type; };
we could now simply say
template <size_t I, class... Types> struct tuple_element<I, tuple<Types...> > { typedef Ti type; };
I'm less enthusiastic about this change than the one for PR39871, because there we were being inconsistent with ourselves.
However, my lack of enthusiasm is no reason not to land this.
Thank you for accepting. I understand your point, but you could argue that this change fixes a inconsistency between tuple_size and tuple_element. As I don't think I have commit access, could one of you commit this change for me?