public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/97055] New: Copy and move constructors shadowed by templatized constructor
@ 2020-09-15  5:26 amir.ahmed.ansari at outlook dot com
  2020-09-20 20:15 ` [Bug c++/97055] " redi at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: amir.ahmed.ansari at outlook dot com @ 2020-09-15  5:26 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97055
           Summary: Copy and move constructors shadowed by templatized
                    constructor
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: amir.ahmed.ansari at outlook dot com
  Target Milestone: ---

Created attachment 49219
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49219&action=edit
Failing program

The attached simple program fails to compile on GCC 10.2. It compiles on both
clang 10.0.1 and MSVC 19.24. The error produced on godbolt.org with no
compilation options given:

<source>: In function 'int main()':

<source>:20:43: error: use of deleted function 'C::C(const U&) [with U =
std::vector<C>]'

   20 |     auto v2 = std::vector<C>{std::move(v1)};

      |                                           ^

<source>:14:5: note: declared here

   14 |     C(const U&) = delete;

      |     ^

<source>:21:32: error: use of deleted function 'C::C(const U&) [with U =
std::vector<C>]'

   21 |     auto v3 = std::vector<C>{v1};

      |                                ^

<source>:14:5: note: declared here

   14 |     C(const U&) = delete;

      |     ^

Compiler returned: 1

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

* [Bug c++/97055] Copy and move constructors shadowed by templatized constructor
  2020-09-15  5:26 [Bug c++/97055] New: Copy and move constructors shadowed by templatized constructor amir.ahmed.ansari at outlook dot com
@ 2020-09-20 20:15 ` redi at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2020-09-20 20:15 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Looks like another dup of PR 85577, see the comments there.

*** This bug has been marked as a duplicate of bug 85577 ***

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

end of thread, other threads:[~2020-09-20 20:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-15  5:26 [Bug c++/97055] New: Copy and move constructors shadowed by templatized constructor amir.ahmed.ansari at outlook dot com
2020-09-20 20:15 ` [Bug c++/97055] " 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).