public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/114106] New: Wrong result of decltype
@ 2024-02-25 21:59 egor.pugin at gmail dot com
2024-02-25 22:01 ` [Bug c++/114106] " pinskia at gcc dot gnu.org
2024-04-13 8:36 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: egor.pugin at gmail dot com @ 2024-02-25 21:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114106
Bug ID: 114106
Summary: Wrong result of decltype
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: egor.pugin at gmail dot com
Target Milestone: ---
https://godbolt.org/z/ojbzGYqbW
MSVC works.
template <typename>
struct Type {};
template <typename... Ts>
struct ImplT : Ts...
{ using Ts::operator()...; };
template <typename... Ts>
using ImplA = ImplT<decltype([](Type<Ts>){})...>;
template <typename... Ts>
constexpr bool allUnique{
([]( ImplA<Ts...> x, Type<Ts> t )
{ x.operator()(t); return true;} && ...)}; // <- error is here
//static_assert(allUnique<int>); // also does not work
<source>: In lambda function:
<source>:16:18: error: request for member 'operator()' in 'x', which is of
non-class type 'int'
16 | { x.operator()(t); return true;} && ...)};
| ^
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-13 8:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-25 21:59 [Bug c++/114106] New: Wrong result of decltype egor.pugin at gmail dot com
2024-02-25 22:01 ` [Bug c++/114106] " pinskia at gcc dot gnu.org
2024-04-13 8:36 ` 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).