Parameter Types in Constructors -- Scott Meyers

From the keyboard of Scott Meyers:

Parameter Types in Constructors

by Scott Meyers

I recently went through Sumant Tambe's presentation materials from his Silicon Valley Code Camp presentation, "C++11 Idioms."  He argues that an emerging idiom is to pass arguments to constructors by value, because this takes advantage of move opportunities when they are available.

I was surprised to read about this emerging idiom, in part because I had not heard of it (I'm supposed to be clued in about this kind of stuff) and in part because it runs contrary to my own thinking on the subject, which is to use perfect forwarding...

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.