summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/include
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-27 16:33:06 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-27 16:33:06 +0000
commit09ba4b3e9192d96297c05ad42ba5393183d6c3cf (patch)
tree0c661130c2db880fb60e16b2d2286a78d823e86c /libstdc++-v3/include
parentb57647c87efbb165071dbe8678aaf0c68bdafc26 (diff)
downloadppe42-gcc-09ba4b3e9192d96297c05ad42ba5393183d6c3cf.tar.gz
ppe42-gcc-09ba4b3e9192d96297c05ad42ba5393183d6c3cf.zip
2014-04-27 Lars Gullik Bjønnes <larsbj@gullik.org>
PR libstdc++/60710 * include/experimental/optional (operator!=): Implement in terms of operator==. * testsuite/experimental/optional/relops/1.cc: Remove operator!=. * testsuite/experimental/optional/relops/2.cc: Likewise. * testsuite/experimental/optional/relops/3.cc: Likewise. * testsuite/experimental/optional/relops/4.cc: Likewise. * testsuite/experimental/optional/relops/5.cc: Likewise. * testsuite/experimental/optional/relops/6.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@209841 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r--libstdc++-v3/include/experimental/optional4
1 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/include/experimental/optional b/libstdc++-v3/include/experimental/optional
index 5f2d93fb7f6..2a3f29dcd70 100644
--- a/libstdc++-v3/include/experimental/optional
+++ b/libstdc++-v3/include/experimental/optional
@@ -736,12 +736,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp>
constexpr bool
operator!=(const optional<_Tp>& __lhs, _Tp const& __rhs)
- { return !__lhs || *__lhs != __rhs; }
+ { return !__lhs || !(*__lhs == __rhs); }
template<typename _Tp>
constexpr bool
operator!=(const _Tp& __lhs, const optional<_Tp>& __rhs)
- { return !__rhs || __lhs != *__rhs; }
+ { return !__rhs || !(__lhs == *__rhs); }
template<typename _Tp>
constexpr bool
OpenPOWER on IntegriCloud