public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/110150] New: std::optional inside template leads to long compilation time
@ 2023-06-06 21:43 stevenxia990430 at gmail dot com
  2023-06-06 21:52 ` [Bug c++/110150] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: stevenxia990430 at gmail dot com @ 2023-06-06 21:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110150
           Summary: std::optional inside template leads to long
                    compilation time
           Product: gcc
           Version: 12.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: stevenxia990430 at gmail dot com
  Target Milestone: ---

The following program is very slow to compile (>40 seconds). Tested on
GCC-trunk.

To quickly reproduce: https://gcc.godbolt.org/z/rsT3n38sY
```
#include <optional>
template<typename T>
void f(T x)
{
    f(std::optional<T>(x));
}
int main()
{
    using std::optional;
    optional<int> x;
    f(x);
    return 0;
}
```

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

end of thread, other threads:[~2023-06-06 22:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-06 21:43 [Bug c++/110150] New: std::optional inside template leads to long compilation time stevenxia990430 at gmail dot com
2023-06-06 21:52 ` [Bug c++/110150] " pinskia at gcc dot gnu.org
2023-06-06 21:52 ` pinskia at gcc dot gnu.org
2023-06-06 22:01 ` stevenxia990430 at gmail dot com

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).