Topic: Possible to access invented template parameters in
Author: rob.desbois@gmail.com
Date: Wed, 24 Apr 2013 03:55:24 -0700 (PDT)
Raw View
------=_Part_4851_13886290.1366800924281
Content-Type: text/plain; charset=ISO-8859-1
As far as I can tell from the wording of N3649, perfect forwarding is not
currently possible via generic lambdas, as the invented type
template-parameter names are not accessible:
// utterly contrived example
template< class T >
auto make_factory() // using N3638 return type deduction
{
return []( auto&&... args ) {
return std::unique_ptr<T>( new T( std::forward<???>(args)... ));
}
}
Am I correct in this conclusion?
If so I'm guessing this wasn't merely an oversight, and is the reason just
practicality of exposing the invented parameter names?
TIA -- Rob
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en.
------=_Part_4851_13886290.1366800924281
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
As far as I can tell from the wording of N3649, perfect forwarding is not c=
urrently possible via generic lambdas, as the invented type template-parame=
ter names are not accessible:<div><br></div><div> // utterly c=
ontrived example</div><div> template< class T ></div><di=
v> auto make_factory() // using N3638 return type deduction</d=
iv><div> {</div><div> return []( au=
to&&... args ) {</div><div>  =
; return std::unique_ptr<T>( new T( std::forward<???>(args)... =
));</div><div> }</div><div> }</div>=
<div><br></div><div>Am I correct in this conclusion?</div><div>If so I'm gu=
essing this wasn't merely an oversight, and is the reason just practicality=
of exposing the invented parameter names?</div><div><br></div><div>TIA -- =
Rob</div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
<br />
<br />
------=_Part_4851_13886290.1366800924281--
.