public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/110856] New: GCC rejects template alias of function type as invalid template parameter
@ 2023-07-31 8:44 hewillk at gmail dot com
2024-04-13 8:27 ` [Bug c++/110856] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: hewillk at gmail dot com @ 2023-07-31 8:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110856
Bug ID: 110856
Summary: GCC rejects template alias of function type as invalid
template parameter
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
GCC rejects the following valid case:
#include <utility>
#include <type_traits>
#include <functional>
template<std::size_t, class T>
using identity = T;
template<class R, class Arg, std::size_t N>
using MakeFunType = decltype(
[]<std::size_t... Is>(std::index_sequence<Is...>) {
return std::type_identity<R(identity<Is, Arg>...)>{};
}(std::make_index_sequence<N>{})
)::type;
template<std::size_t N>
class S {
using F1 = std::function<MakeFunType<void, int, 3>>; // ok
using F2 = std::function<MakeFunType<void, int, N>>; // syntax error
};
https://godbolt.org/z/fc638b4Y1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/110856] GCC rejects template alias of function type as invalid template parameter
2023-07-31 8:44 [Bug c++/110856] New: GCC rejects template alias of function type as invalid template parameter hewillk at gmail dot com
@ 2024-04-13 8:27 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-13 8:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110856
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Target Milestone|--- |14.0
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed on the trunk for GCC 14 by the recent lambda template patches.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-13 8:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-31 8:44 [Bug c++/110856] New: GCC rejects template alias of function type as invalid template parameter hewillk at gmail dot com
2024-04-13 8:27 ` [Bug c++/110856] " pinskia 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).