Summary: | Template partial ordering considered non-ambiguous with deduced and non-deduced parameter packs | ||
---|---|---|---|
Product: | gcc | Reporter: | Barry Revzin <barry.revzin> |
Component: | c++ | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | daniel.kruegler, ed, marxin, webrown.cpp |
Priority: | P3 | Keywords: | accepts-invalid |
Version: | 7.1.0 | ||
Target Milestone: | 10.2 | ||
See Also: |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67928 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85612 |
||
Host: | Target: | ||
Build: | Known to work: | 10.2.0, 11.1.0 | |
Known to fail: | 10.1.0 | Last reconfirmed: | 2022-01-25 00:00:00 |
Description
Barry Revzin
2017-05-23 21:29:55 UTC
Got hit again today, while trying to write an `overload(...)` class: template <typename... Ts> struct overload : Ts... { template <typename... TFwds> constexpr overload(TFwds&&... xs) : Ts{FWD(xs)}... { } using Ts::operator()...; }; template <typename... TFwds> overload(TFwds&&...) -> overload<std::decay_t<TFwds>...>; With the code above auto o = overload{[]{}}; fails to compile. See: https://godbolt.org/g/Rb3ZKt See also #80438 Sorry. See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80438 Confirmed, though seems fixed for GCC 10.2.0 and 11.1.0; I suspect r11-1571 fixed it. Fixed with r11-1571-g57b4daf8dc4ed7b6. Fixed in GCC 10.2/11. |