cpp/iterator/counted iterator/iterator traits

Inherits the properties from customized (generated from either a standard partial specialization or a program-defined specialization), with the member type adjusted, where  models.

Notably, the (if present) and  are inherited from.

The condition in the requires-clause is if and only if  is not generated from the primary template.

Note
Before, this specialization is used even if is generated from the primary template. As a result, when testing against an iterator concept (e.g. ), the determination of  does not take  into account, and thus  sometimes erroneously behaves as if it cannot model that concept. This incorrect behavior is implemented in libstdc++ prior to 10.4, and in MSVC STL prior to VS 2022 17.0 Preview 3.

The standard library provides partial specializations of std for pointer types, std, and std.