1
<?xml version=
"1.0" encoding=
"utf-8"?>
3 Copyright 2012 Eric Niebler
5 Distributed under the Boost
6 Software License, Version 1.0. (See accompanying
7 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 <header name=
"boost/proto/deep_copy.hpp">
10 <para>Replace all nodes stored by reference by nodes stored by value.
</para>
11 <namespace name=
"boost">
12 <namespace name=
"proto">
14 <namespace name=
"result_of">
15 <!-- proto::result_of::deep_copy -->
16 <struct name=
"deep_copy">
18 <template-type-parameter name=
"Expr"/>
20 <purpose>A metafunction for calculating the return type of
<computeroutput>
21 <functionname alt=
"proto::deep_copy">proto::deep_copy()
</functionname></computeroutput>.
</purpose>
24 A metafunction for calculating the return type of
<computeroutput>
25 <functionname alt=
"proto::deep_copy">proto::deep_copy()
</functionname></computeroutput>. The type
26 parameter
<computeroutput>Expr
</computeroutput> should be the type of a Proto expression tree.
27 It should not be a reference type, nor should it be cv-qualified.
31 <type><emphasis>unspecified
</emphasis></type>
36 <namespace name=
"functional">
37 <!-- proto::functional::deep_copy -->
38 <struct name=
"deep_copy">
40 <type><classname>proto::callable
</classname></type>
42 <purpose>A
<conceptname>PolymorphicFunctionObject
</conceptname> type for deep-copying Proto
43 expression trees.
</purpose>
46 A
<conceptname>PolymorphicFunctionObject
</conceptname> type for deep-copying Proto expression trees.
47 When a tree is deep-copied, all internal nodes and terminals held by reference are instead held by value.
48 The only exception is function references, which continue to be held by reference.
51 <struct-specialization name=
"result">
53 <template-type-parameter name=
"This"/>
54 <template-type-parameter name=
"Expr"/>
57 <template-arg>This(Expr)
</template-arg>
60 <type><classname>result_of::deep_copy
</classname><Expr
></type>
62 </struct-specialization>
63 <method-group name=
"public member functions">
64 <method name=
"operator()" cv=
"const">
65 <type><classname>result_of::deep_copy
</classname><Expr
>::type
</type>
67 <template-type-parameter name=
"Expr"/>
69 <parameter name=
"expr">
70 <paramtype>Expr const
&</paramtype>
72 <purpose>Deep-copies a Proto expression tree, turning all nodes and terminals held by
73 reference into ones held by value.
</purpose>
79 <!-- proto::deep_copy() -->
80 <function name=
"deep_copy">
81 <type>typename
<classname>proto::result_of::deep_copy
</classname><Expr
>::type
</type>
83 <template-type-parameter name=
"Expr"/>
85 <parameter name=
"expr">
86 <paramtype>Expr const
&</paramtype>
88 <purpose>A function for deep-copying Proto expression trees.
</purpose>
91 A function for deep-copying Proto expression trees. When a tree is deep-copied, all internal
92 nodes and terminals held by reference are instead held by value.
</para>
96 Terminals of reference-to-function type are left unchanged.
99 Equivalent to
<computeroutput><classname>proto::functional::deep_copy
</classname>()(expr)