http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60710
Bug ID: 60710 Summary: experimental::optional<T> is using T::operator!= Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: larsbj at gullik dot net When looking at n3793 it states that operator!= should be implemented with !(t1 == t2), and not t1 != t2 as the implementation in gcc 4.9 is doing. This is the case for both the operator!= implementations where optional<T> is compared against T. Also since optional should not put requirements on the contained type other than operator== and operator>, operator!= are removed from the tests in the suggested patch.