Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #80395
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: templated lambda issue |
| Date | 2021-06-14 14:58 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <sa7jp8$vsg$1@dont-email.me> (permalink) |
| References | <sa7def$tmt$1@dont-email.me> <sa7hor$brp$1@dont-email.me> |
>> int main()
>> {
>> auto f = []<typename T>() -> T
>> {
>> return 123;
>> };
>> f.operator ()<int>(); // only way ?
>> }
>>
>> Is the above code the only way to call the lambda ?
> You made a templated lambda - you have to give the type /somehow/.
No, I just want to return a value of that type.
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
templated lambda issue Bonita Montero <Bonita.Montero@gmail.com> - 2021-06-14 13:10 +0200
Re: templated lambda issue David Brown <david.brown@hesbynett.no> - 2021-06-14 14:23 +0200
Re: templated lambda issue Bonita Montero <Bonita.Montero@gmail.com> - 2021-06-14 14:58 +0200
Re: templated lambda issue "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2021-06-14 15:12 +0200
Re: templated lambda issue MrSpook_5fdc40@qvqo7xsmj4s.co.uk - 2021-06-14 13:16 +0000
csiph-web