public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/100979] New: Nested CTAD fails when the outer object is direct initialized and the inner object is list initialized
@ 2021-06-08 22:45 brycelelbach at gmail dot com
  2021-06-09  0:46 ` [Bug c++/100979] " mpolacek at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: brycelelbach at gmail dot com @ 2021-06-08 22:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100979
           Summary: Nested CTAD fails when the outer object is direct
                    initialized and the inner object is list initialized
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: brycelelbach at gmail dot com
  Target Milestone: ---

template <typename T> struct X { X(T t) {} };

int main() {
  auto t00 = X(1);
  auto t01 = X{1};
  X t02{1};
  X t03(1);

  auto t04 = X(X{1});
  auto t05 = X{X{1}};
  auto t06 = X(X(1));
  auto t07 = X{X(1)};
  X t08(X{1}); // GCC 11.x and up rejects this; MSVC and Clang accept it.
  X t09{X{1}};
  X t10(X(1));
  X t11{X(1)};
}

https://godbolt.org/z/Pbx6cjE7q

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

* [Bug c++/100979] Nested CTAD fails when the outer object is direct initialized and the inner object is list initialized
  2021-06-08 22:45 [Bug c++/100979] New: Nested CTAD fails when the outer object is direct initialized and the inner object is list initialized brycelelbach at gmail dot com
@ 2021-06-09  0:46 ` mpolacek at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-06-09  0:46 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I think it's a dup.

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

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

end of thread, other threads:[~2021-06-09  0:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08 22:45 [Bug c++/100979] New: Nested CTAD fails when the outer object is direct initialized and the inner object is list initialized brycelelbach at gmail dot com
2021-06-09  0:46 ` [Bug c++/100979] " 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).