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

« back to all changes in this revision

Viewing changes to yo/advancedtemplates/trait.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:
20
20
are used: each must be covered by potentially different specializations).
21
21
 
22
22
    Having available a trait class, the actual type can be inferred compile
23
 
time, allowing the compiler to deduct whether or not the actual type is a
24
 
pointer, a pointer to a member, a const pointer and make comparable deductions
25
 
in case the actual type is, e.g., an lvalue or rvalue reference type. This in
26
 
turn allows us to write templates that define types like
 
23
time, allowing the compiler to deduce whether or not the actual type is a
 
24
pointer, a pointer to a member, or a const pointer, and to make comparable
 
25
deductions in case the actual type is, e.g., an lvalue or rvalue reference
 
26
type. This in turn allows us to write templates that define types like
27
27
    hi(generic algorithms: required types)
28
28
 ti(argument_type), ti(first_argument_type), ti(second_argument_type) and
29
29
ti(result_type), which are required by several generic algorithms (e.g.,