~ubuntu-branches/ubuntu/trusty/c++-annotations/trusty

« back to all changes in this revision

Viewing changes to yo/classtemplates/perfect.yo

  • Committer: Package Import Robot
  • Author(s): Frank B. Brokken
  • Date: 2012-01-20 11:53:17 UTC
  • mfrom: (1.1.18)
  • Revision ID: package-import@ubuntu.com-20120120115317-v4wiq9sttx72fabk
Tags: 9.1.0-1
New upstream release (covering C++11 to a large extend)

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
Another example is found in em(factory functions) that also frequently forward
19
19
their parameters to the constructors of objects that they return.
20
20
 
21
 
Before the C++0x standard the interfaces of overloaded functions needed to
 
21
Before the C++11 standard the interfaces of overloaded functions needed to
22
22
be duplicated by the forwarding entity: tt(Inserter) needed to duplicate the
23
23
interfaces of all five tt(string::insert) members; a factory function needed
24
24
to duplicate the interfaces of the constructors of the class of the objects it
25
25
returned.
26
26
 
27
 
The C++0x standard simplifies and generalizes forwarding of parameters by
 
27
The C++11 standard simplifies and generalizes forwarding of parameters by
28
28
offering emi(perfect forwarding), implemented through rvalue references and
29
29
variadic templates. With perfect forwarding the arguments passed to functions
30
30
are `perfectly forwarded' to nested functions. Forwarding is called