I noticed that the use of std::map::reverse_iterator in the below example doesn't work with C++20 but works with C++17 in all compilers.
#include <map>
class C; //incomplete type
class Something
{
//THIS WORKS IN C++17 as well as C++20 in all compilers
std::map<int, C>::iterator obj1;
//THIS DOESN'T WORK in C++20 in all compilers but works in C++17 in all compilers
std::map<int, C>::reverse_iterator obj2;
};
int main()
{
Something s;
return 0;
}
My question is what changed in C++20 so(such) that the use of std::map::reverse_iterator stopped working in all C++20 compilers.