• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" ?>
2<concept name="BasicPrimitiveTransform" category="utility">
3  <!--
4  Copyright 2008 Eric Niebler
5
6  Distributed under the Boost
7  Software License, Version 1.0. (See accompanying
8  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9  -->
10  <param name="Fn" role="basic-primitive-transform-type" />
11  <param name="Expr" role="expression-type" />
12  <param name="State" role="state-type" />
13  <param name="Data" role="data-type" />
14
15  <models-sentence>
16    The type <arg num="1" /> must be a model of <self/>.
17  </models-sentence>
18
19  <description>
20    <para>
21      A BasicPrimitiveTransform is class type that
22      has a nested class template called impl that takes
23      three template parameters representing an expression
24      type, a state type and a data type. Specializations
25      of the nested impl template are ternary monomorphic
26      function objects that accept expression, state, and
27      data parameters.
28    </para>
29  </description>
30
31  <notation variables="fn">
32    <sample-value>
33      <type name="Fn" />
34    </sample-value>
35  </notation>
36
37  <notation variables="expr">
38    <sample-value>
39      <type name="Expr" />
40    </sample-value>
41  </notation>
42
43  <notation variables="state">
44    <sample-value>
45      <type name="State" />
46    </sample-value>
47  </notation>
48
49  <notation variables="data">
50    <sample-value>
51      <type name="Data" />
52    </sample-value>
53  </notation>
54
55  <associated-type name="result_type">
56    <get-member-type name="result_type">
57      <apply-template name="typename Fn::template impl">
58        <type name="Expr"/>
59        <type name="State"/>
60        <type name="Data"/>
61      </apply-template>
62    </get-member-type>
63    <description>
64      <simpara>The return type of the overloaded function call operator.</simpara>
65    </description>
66  </associated-type>
67
68  <valid-expression name="Monomorphic Function Call">
69    <apply-function name="typename Fn::template impl&lt; Expr, State, Data &gt;()">
70      <sample-value>
71        <type name="Expr" />
72      </sample-value>
73      <sample-value>
74        <type name="State" />
75      </sample-value>
76      <sample-value>
77        <type name="Data" />
78      </sample-value>
79    </apply-function>
80    <return-type>
81      <require-same-type testable="yes">
82        <type name="result_type"/>
83      </require-same-type>
84    </return-type>
85    <semantics>Applies the transform.</semantics>
86  </valid-expression>
87
88  <example-model>
89    <type name="boost::proto::terminal&lt; int &gt;" />
90  </example-model>
91
92</concept>
93