diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2010-10-15 17:14:57 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2010-10-15 17:14:57 +0000 |
commit | e74bf53a08b08e94ef88b0e1b0401e393efb1dac (patch) | |
tree | 5893b4dddec9f091abe606ab63e2c5c6c4d27e44 /libstdc++-v3 | |
parent | 695c3817fa94bc982394baa46a46f00609ba4c0b (diff) | |
download | gcc-e74bf53a08b08e94ef88b0e1b0401e393efb1dac.zip gcc-e74bf53a08b08e94ef88b0e1b0401e393efb1dac.tar.gz gcc-e74bf53a08b08e94ef88b0e1b0401e393efb1dac.tar.bz2 |
functional (function<>::operator==, operator!=): Remove, per LWG 1240.
2010-10-15 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/functional (function<>::operator==, operator!=):
Remove, per LWG 1240.
* testsuite/20_util/function/cmp/cmp_neg.cc: Adjust dg-* directives.
From-SVN: r165514
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/include/std/functional | 6 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/20_util/function/cmp/cmp_neg.cc | 14 |
3 files changed, 10 insertions, 16 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 8c5da55..ba5fb2b 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2010-10-15 Paolo Carlini <paolo.carlini@oracle.com> + + * include/std/functional (function<>::operator==, operator!=): + Remove, per LWG 1240. + * testsuite/20_util/function/cmp/cmp_neg.cc: Adjust dg-* directives. + 2010-10-13 Jonathan Wakely <jwakely.gcc@gmail.com> PR libstdc++/45990 diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional index 51054ac..cf178e3 100644 --- a/libstdc++-v3/include/std/functional +++ b/libstdc++-v3/include/std/functional @@ -2096,12 +2096,6 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) template<typename _Functor> const _Functor* target() const; #endif - // deleted overloads - template<typename _Res2, typename... _ArgTypes2> - void operator==(const function<_Res2(_ArgTypes2...)>&) const = delete; - template<typename _Res2, typename... _ArgTypes2> - void operator!=(const function<_Res2(_ArgTypes2...)>&) const = delete; - private: typedef _Res (*_Invoker_type)(const _Any_data&, _ArgTypes...); _Invoker_type _M_invoker; diff --git a/libstdc++-v3/testsuite/20_util/function/cmp/cmp_neg.cc b/libstdc++-v3/testsuite/20_util/function/cmp/cmp_neg.cc index bb3c25d..28c0e12 100644 --- a/libstdc++-v3/testsuite/20_util/function/cmp/cmp_neg.cc +++ b/libstdc++-v3/testsuite/20_util/function/cmp/cmp_neg.cc @@ -1,7 +1,7 @@ // { dg-options "-std=gnu++0x" } // { dg-do compile } -// Copyright (C) 2009 Free Software Foundation, Inc. +// Copyright (C) 2009, 2010 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -26,13 +26,7 @@ void test01() { std::function<void()> f1; std::function<void()> f2; - f1 == f2; // { dg-error "deleted" } - f1 != f2; // { dg-error "deleted" } -} - -int main() -{ - test01(); - - return 0; + f1 == f2; // { dg-error "no match" } + f1 != f2; // { dg-error "no match" } } +// { dg-excess-errors "candidates are" } |