This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD status.

2884. Relational operators for containers should sfinae; if the underlying type is not comparable, neither should the container be

Section: 23 [containers], 22 [utilities] Status: NAD Submitter: Finland Opened: 2017-02-03 Last modified: 2026-06-09

Priority: 4

View other active issues in [containers].

View all other issues in [containers].

View all issues with NAD status.

Discussion:

Addresses FI 16

Relational operators for containers should sfinae; if the underlying type is not comparable, neither should the container be. Same applies to tuple and pair.

Proposed change: Make the relational operators of containers and utility components reflect the validity of the underlying element types.

[ 2017-06-27 Moved to LEWG after 5 positive votes on c++std-lib. ]

[2025-10-21; Priority set to 4 based on age of issue and lack of activity.]

[Brno 2026-06-09 Status changed: LEWG → NAD.]

LEWG recommended closing as NAD. This is difficult in general because of support for incomplete types in some containers.

Proposed resolution: