When trying to convert some code using boost::optional to using
std::experimental::optional instead if come over the issue that I had to
implement operator!= for the contained types.
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!= implementation where
optional<T> is compared against T.
The other operators look ok, and only operator== and operator< are used
in their implementations.
Can this be fixed before 4.9?
(changelog not done)
From 6a93dcb458f055d94d13386ef68a39893327be84 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lars=20Gullik=20Bj=C3=B8nnes?= <[hidden email]>
Date: Sat, 29 Mar 2014 15:46:47 +0100
Subject: [PATCH] optional: implement operator!= in terms of operator==