ryanhaining / cppitertools

Implementation of python itertools and builtin iteration functions for C++17
https://twitter.com/cppitertools
BSD 2-Clause "Simplified" License
1.37k stars 115 forks source link

enumerate.hpp mixes class and struct #82

Closed hmoffatt closed 3 years ago

hmoffatt commented 3 years ago

g++-8 is giving me this warning from enumerate.h

cppitertools/enumerate.hpp:41:3: warning: 'tuple_size' defined as a class template here but previously declared as a struct template [-Wmismatched-tags]
  class tuple_size<iter::impl::EnumIterYield<Index, Elem>>
  ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/array:350:5: note: did you mean class here?
    struct tuple_size;
    ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/utility:84:5: note: did you mean class here?
    struct tuple_size;
    ^
ryanhaining commented 3 years ago

This output looks like it's from clang with gcc's library (libstdc++). You're right though, tuple_size and tuple_element should be struct