public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/110030] New: recursive template leads to long compilation time
@ 2023-05-29 22:21 stevenxia990430 at gmail dot com
0 siblings, 0 replies; only message in thread
From: stevenxia990430 at gmail dot com @ 2023-05-29 22:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110030
Bug ID: 110030
Summary: recursive 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 invalid program is very slow to compile (>40 seconds) and return
error. Compared to clang which can quickly reject the program. Tested on gcc
trunk.
To quickly reproduce: https://gcc.godbolt.org/z/TeP69vrne
```
#include <tuple>
template<typename... Args>
auto take_arguments(Args &&...args) {
return take_arguments(std::index_sequence_for<Args...>{},
std::forward<Args>(args)...);
}
auto bytes_as_string(const BytesView &input) {
return call_fun(&std::string::append, take_arguments(input));
}
int main(){
}
```
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-29 22:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-29 22:21 [Bug c++/110030] New: recursive template leads to long compilation time 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).