https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96416
--- Comment #13 from Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> --- > And are you recommending that everyone who defines their custom contiguous > iterators specializes pointer_traits for them? Call it _quite_ annoying... Definitely not! When you define a contiguous iterator type, you should just give it a sixth nested typedef alongside the other five (or three in C++20): `using element_type = value_type;`. This enables contiguous-iterator machinery. See https://stackoverflow.com/questions/65712091/in-c20-how-do-i-write-a-contiguous-iterator/66050521#66050521 You should never specialize std::pointer_traits for your own type. ("Can" you? Yes. "Should" you? No.)