public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/90102] Incorrect ambiguous overload with _GLIBCXX_DEBUG
[not found] <bug-90102-4@http.gcc.gnu.org/bugzilla/>
@ 2020-06-02 6:31 ` redi at gcc dot gnu.org
2020-06-02 17:13 ` cvs-commit at gcc dot gnu.org
2020-06-02 17:19 ` redi at gcc dot gnu.org
2 siblings, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2020-06-02 6:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90102
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libstdc++/90102] Incorrect ambiguous overload with _GLIBCXX_DEBUG
[not found] <bug-90102-4@http.gcc.gnu.org/bugzilla/>
2020-06-02 6:31 ` [Bug libstdc++/90102] Incorrect ambiguous overload with _GLIBCXX_DEBUG redi at gcc dot gnu.org
@ 2020-06-02 17:13 ` cvs-commit at gcc dot gnu.org
2020-06-02 17:19 ` redi at gcc dot gnu.org
2 siblings, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-06-02 17:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90102
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:
https://gcc.gnu.org/g:eca833b81289438ec5ae3ed4c77ffb49cfb65f34
commit r11-832-geca833b81289438ec5ae3ed4c77ffb49cfb65f34
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue Jun 2 18:13:08 2020 +0100
libstdc++: Make debug containers prefer copy ctor to base ctor (PR 90102)
When given a type which can convert to any container-like type, the
C(const C&) copy constructor and C(const C::_Base&) converting
constructor are ambiguous. This change replaces the converting
constructor's parameter with a reference_wrapper-like type so that
calling that constructor requires an additional user-defined conversion.
This gives it a lower rank than the copy constructor, avoiding the
ambiguity.
While testing this change I discovered that __gnu_debug::forward_list
doesn't have a convering constructor from the std::forward_list base, so
this adds it.
We should probably consider whether the converting constructors should
be 'explicit' but I'm not changing that now.
libstdc++-v3/ChangeLog:
PR libstdc++/90102
* include/debug/deque (deque(const _Base&)): Replace parameter
with a struct that wraps a const _Base&.
* include/debug/forward_list (forward_list(_Base_ref)): New
constructor.
* include/debug/list (list(const _Base&)): Replace parameter
with a struct that wraps a const _Base&.
* include/debug/map.h (map(const _Base&)): Likewise.
* include/debug/multimap.h (multimap(const _Base&)): Likewise.
* include/debug/multiset.h (multiset(const _Base&)): Likewise.
* include/debug/set.h (set(const _Base&)): Likewise.
* include/debug/unordered_map (unordered_map(const _Base&))
(unordered_multimap(const _Base&)): Likewise.
* include/debug/unordered_set (unordered_set(const _Base&))
(unordered_multiset(const _Base&)): Likewise.
* testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
Adjust dg-error line number.
* include/debug/vector (vector(const _Base&)): Likewise.
* testsuite/23_containers/deque/debug/90102.cc: New test.
* testsuite/23_containers/forward_list/debug/90102.cc: New test.
* testsuite/23_containers/list/debug/90102.cc: New test.
* testsuite/23_containers/map/debug/90102.cc: New test.
* testsuite/23_containers/multimap/debug/90102.cc: New test.
* testsuite/23_containers/multiset/debug/90102.cc: New test.
* testsuite/23_containers/set/debug/90102.cc: New test.
* testsuite/23_containers/unordered_map/debug/90102.cc: New test.
* testsuite/23_containers/unordered_multimap/debug/90102.cc: New
test.
* testsuite/23_containers/unordered_multiset/debug/90102.cc: New
test.
* testsuite/23_containers/unordered_set/debug/90102.cc: New test.
* testsuite/23_containers/vector/debug/90102.cc: New test.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libstdc++/90102] Incorrect ambiguous overload with _GLIBCXX_DEBUG
[not found] <bug-90102-4@http.gcc.gnu.org/bugzilla/>
2020-06-02 6:31 ` [Bug libstdc++/90102] Incorrect ambiguous overload with _GLIBCXX_DEBUG redi at gcc dot gnu.org
2020-06-02 17:13 ` cvs-commit at gcc dot gnu.org
@ 2020-06-02 17:19 ` redi at gcc dot gnu.org
2 siblings, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2020-06-02 17:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90102
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Target Milestone|--- |11.0
Resolution|--- |FIXED
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed on master.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-02 17:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-90102-4@http.gcc.gnu.org/bugzilla/>
2020-06-02 6:31 ` [Bug libstdc++/90102] Incorrect ambiguous overload with _GLIBCXX_DEBUG redi at gcc dot gnu.org
2020-06-02 17:13 ` cvs-commit at gcc dot gnu.org
2020-06-02 17:19 ` redi at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).