why are these std::set iterators of different type when compiling with -D_GLIBCXX_DEBUG

2024-07-24 Thread Dennis Luehring via Gcc
using latest gcc/STL - #include using int_set1 = std::set>; using int_set2 = std::set; static_assert(std::is_same()); - the two iterators are equal when not using _GLIBCXX_DEBUG but become different when using the define?

Re: why are these std::set iterators of different type when compiling with -D_GLIBCXX_DEBUG

2024-07-24 Thread Jonathan Wakely via Gcc
On Wed, 24 Jul 2024 at 11:38, Dennis Luehring via Gcc wrote: > > using latest gcc/STL > > - > #include > > using int_set1 = std::set>; > using int_set2 = std::set; > > static_assert(std::is_same()); > - > > > the two iterators are equal when not using _GLIBCXX_DEBUG but become > d

Re: why are these std::set iterators of different type when compiling with -D_GLIBCXX_DEBUG

2024-07-24 Thread Dennis Luehring via Gcc
Am 24.07.2024 um 12:41 schrieb Jonathan Wakely: The standard says it's unspecified whether those types are the same, so portable code should not assume they are/aren't the same. I don't know for sure, but I assume somebody thought that making them different was helpful to avoid non-portable code.