public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/84849] Ambiguous resolution of braze initializer list to a class with explicit constructors
       [not found] <bug-84849-4@http.gcc.gnu.org/bugzilla/>
@ 2021-12-14  5:55 ` pinskia at gcc dot gnu.org
  2023-05-31 20:59 ` [Bug c++/84849] [DR1228] " jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-14  5:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84849

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=97220

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
PR 97220 looks similar and might be a dup of this bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/84849] [DR1228] Ambiguous resolution of braze initializer list to a class with explicit constructors
       [not found] <bug-84849-4@http.gcc.gnu.org/bugzilla/>
  2021-12-14  5:55 ` [Bug c++/84849] Ambiguous resolution of braze initializer list to a class with explicit constructors pinskia at gcc dot gnu.org
@ 2023-05-31 20:59 ` jason at gcc dot gnu.org
  2023-06-01  3:00 ` jason at gcc dot gnu.org
  2024-04-23 22:29 ` mpolacek at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: jason at gcc dot gnu.org @ 2023-05-31 20:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84849

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Ambiguous resolution of     |[DR1228] Ambiguous
                   |braze initializer list to a |resolution of braze
                   |class with explicit         |initializer list to a class
                   |constructors                |with explicit constructors
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=cwg1228
             Status|ASSIGNED                    |SUSPENDED
           Assignee|mpolacek at gcc dot gnu.org        |unassigned at gcc dot gnu.org
                 CC|                            |jason at gcc dot gnu.org

--- Comment #9 from Jason Merrill <jason at gcc dot gnu.org> ---
I'm not marking this as a dup of PR60027 because of the specific case of
copy/move constructors, which cannot be constrained to avoid this problem.  The
patch in PR109247 fixes the first three testcases, which fall into that
category, but not the testcase in #5, which does not.

The testcase in #6 is unrelated; there is no "explicit".

Unassigning from Marek.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/84849] [DR1228] Ambiguous resolution of braze initializer list to a class with explicit constructors
       [not found] <bug-84849-4@http.gcc.gnu.org/bugzilla/>
  2021-12-14  5:55 ` [Bug c++/84849] Ambiguous resolution of braze initializer list to a class with explicit constructors pinskia at gcc dot gnu.org
  2023-05-31 20:59 ` [Bug c++/84849] [DR1228] " jason at gcc dot gnu.org
@ 2023-06-01  3:00 ` jason at gcc dot gnu.org
  2024-04-23 22:29 ` mpolacek at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: jason at gcc dot gnu.org @ 2023-06-01  3:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84849

--- Comment #10 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to ensadc from comment #7)
> (In reply to Zhihao Yuan from comment #6)
> 
> I think this is a different bug. GCC thinks the implicitly-deleted move
> assignment operator `pair<int&>& pair<int&>::operator=(pair<int&>&&)` is a
> candidate for the assignment, which causes ambiguity with
> `operator=(value_type&&)` (where value_type = pair<int>). But as part of
> resolution of CWG 1402, [class.copy.assign] specifies that "A defaulted move
> assignment operator that is defined as deleted is ignored by overload
> resolution".

Incidentally, no: GCC mentions it, but considers it worse than any other
candidate.  The real ambiguity is with
operator=(const pair<int&>&), the implicitly-deleted *copy* assignment.  I
don't think this is a bug; if you disagree, please open another PR for it.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/84849] [DR1228] Ambiguous resolution of braze initializer list to a class with explicit constructors
       [not found] <bug-84849-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2023-06-01  3:00 ` jason at gcc dot gnu.org
@ 2024-04-23 22:29 ` mpolacek at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2024-04-23 22:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84849

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #11 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
DR1228 was closed as NAD.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-04-23 22:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-84849-4@http.gcc.gnu.org/bugzilla/>
2021-12-14  5:55 ` [Bug c++/84849] Ambiguous resolution of braze initializer list to a class with explicit constructors pinskia at gcc dot gnu.org
2023-05-31 20:59 ` [Bug c++/84849] [DR1228] " jason at gcc dot gnu.org
2023-06-01  3:00 ` jason at gcc dot gnu.org
2024-04-23 22:29 ` mpolacek 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).