diff options
author | Jason Merrill <jason@redhat.com> | 2014-05-14 12:48:07 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2014-05-14 12:48:07 -0400 |
commit | d02f620dc0bb3bea393d04b8639a1f4748ad8821 (patch) | |
tree | fa4f8d8bc938c26bfd454f1b030d115993baceb9 /libstdc++-v3 | |
parent | 89606913ce096b28d0a822fedf4a6333468a66cd (diff) | |
download | gcc-d02f620dc0bb3bea393d04b8639a1f4748ad8821.zip gcc-d02f620dc0bb3bea393d04b8639a1f4748ad8821.tar.gz gcc-d02f620dc0bb3bea393d04b8639a1f4748ad8821.tar.bz2 |
re PR c++/20332 (poor diagnostic when bind non lvalue to a reference for default arguments)
PR c++/20332
PR c++/21631
* call.c (reference_binding): Treat lvalue/rvalue mismatch and
dropped cv-quals as a bad conversion.
(convert_like_real) [ck_ref_bind]: Explain them.
(compare_ics): Check badness before stripping reference
bindings. Handle comparing bad reference bindings.
* typeck.c (comp_cv_qualification): Add overload that just takes
integers.
* cp-tree.h: Declare it.
From-SVN: r210436
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/testsuite/20_util/forward/1_neg.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/testsuite/20_util/forward/1_neg.cc b/libstdc++-v3/testsuite/20_util/forward/1_neg.cc index 06f7bcb..f34fc8a 100644 --- a/libstdc++-v3/testsuite/20_util/forward/1_neg.cc +++ b/libstdc++-v3/testsuite/20_util/forward/1_neg.cc @@ -28,7 +28,7 @@ template<class T, class A1, class A2> factory(A1&& a1, A2&& a2) { return std::shared_ptr<T>(new T(std::forward<A1>(a1), - std::forward<A2>(a2))); // { dg-error "no matching function" } + std::forward<A2>(a2))); // { dg-error "rvalue" } } struct A |