August 2012
Intermediate to advanced
976 pages
30h 17m
English
Under the new standard, we can use variadic templates together with forward to write functions that pass their arguments unchanged to some other function. To illustrate such functions, we’ll add an emplace_back member to our StrVec class (§ 13.5, p. 526). The emplace_back member of the library containers is a variadic member template (§ 16.1.4, p. 673) that uses its arguments to construct an element directly in space managed by the container.
Our version of emplace_back for StrVec will also have to be variadic, ...
Read now
Unlock full access