Quantcast
Channel: User HolyBlackCat - Stack Overflow
Viewing all articles
Browse latest Browse all 1270

Comment by HolyBlackCat on Is it possible to create a perfect pass-through function?

$
0
0
"Is it possible to differentiate between prvalues and xvalues in function parameters" Not directly. You could pass decltype of the argument as a template parameter (using a macro to avoid typing the argument twice). "would require copy elision of the parameter into the return value" Even if possible (I'm not sure), it's not guaranteed, so will require the object to be movable.

Viewing all articles
Browse latest Browse all 1270

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>