public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99885] New: CTAD fails for auto const& NTTP
@ 2021-04-02 21:47 ldalessandro at gmail dot com
  2021-04-13 19:14 ` [Bug c++/99885] " ppalka at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: ldalessandro at gmail dot com @ 2021-04-02 21:47 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99885
           Summary: CTAD fails for auto const& NTTP
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ldalessandro at gmail dot com
  Target Milestone: ---

Following (much-reduced) code causes a CTAD failure in gcc but not clang
(https://godbolt.org/z/zWhWGj7PE) with both C++17 and C++20.

template <auto const& A>
struct Foo {};

template <auto const& A>
struct Bar {
    constexpr auto foo() const -> Foo<A> {
        return {};
    }
};

constexpr int a = 1;
constexpr Bar<a> bar;
Foo foo = bar.foo(); // <-- CTAD failure

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

end of thread, other threads:[~2022-05-11 15:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-02 21:47 [Bug c++/99885] New: CTAD fails for auto const& NTTP ldalessandro at gmail dot com
2021-04-13 19:14 ` [Bug c++/99885] " ppalka at gcc dot gnu.org
2021-04-14 12:55 ` cvs-commit at gcc dot gnu.org
2021-04-14 14:07 ` ppalka at gcc dot gnu.org
2021-04-14 14:39 ` ppalka at gcc dot gnu.org
2021-04-20 16:09 ` cvs-commit at gcc dot gnu.org
2022-05-11 14:59 ` cvs-commit at gcc dot gnu.org
2022-05-11 15:01 ` ppalka at gcc dot gnu.org
2022-05-11 15:02 ` ppalka 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).