The attached C++ source is AFAICS legal C++. However it doesn't compile with the debug libstdc++, as the debug code assumes that each given set can be compared with the passed compare operator.
-- Summary: Legal program doesn't compile with -D_GLIBCXX_DEBUG Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dominik dot strasser at onespin-solutions dot com GCC build triplet: x86_64-redhat-linux GCC host triplet: x86_64-redhat-linux GCC target triplet: x86_64-redhat-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34730