public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101509] New: Rejects valid construction call with type inference
@ 2021-07-19 12:35 gareth@ignition-web.co.uk
2021-07-19 12:41 ` [Bug c++/101509] " gareth@ignition-web.co.uk
2021-07-19 12:49 ` mpolacek at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: gareth@ignition-web.co.uk @ 2021-07-19 12:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101509
Bug ID: 101509
Summary: Rejects valid construction call with type inference
Product: gcc
Version: 11.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: gareth@ignition-web.co.uk
Target Milestone: ---
template <typename T>
struct S { S(T); };
struct my_type{ my_type(S<int>); };
void foo(S<int>);
void test()
{
my_type(S(1)); // no issue here
my_type(S{1}); // no issue here
auto tmp1 = my_type(S(1)); // no issue here
auto tmp2 = my_type(S{1}); // no issue here
foo(S(1)); // no issue here
foo(S{1}); // no issue here
my_type tmp3(S(1)); // no issue here
my_type tmp4(S{1}); // GCC error
my_type tmp5((S{1})); // no issue here
}
https://godbolt.org/z/jb68o46fP
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-19 12:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-19 12:35 [Bug c++/101509] New: Rejects valid construction call with type inference gareth@ignition-web.co.uk
2021-07-19 12:41 ` [Bug c++/101509] " gareth@ignition-web.co.uk
2021-07-19 12:49 ` mpolacek 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).