Topic: Specify implementation of reference member


Author: "D. B." <db0451@gmail.com>
Date: Mon, 1 Aug 2016 21:57:03 +0100
Raw View
--001a114ba7d4a8e2fd053908d7b0
Content-Type: text/plain; charset=UTF-8

The OP doesn't seem to want to directly meet any objections, but for the
sake of others reading who might otherwise be misled: Allow myself to
repeat myself. *Per the Standard*:

That references are implemented as pointers in extant compilers is an
*implementation
detail* and hence completely irrelevant to this, any other proposal, or
absolutely any interpretation of the Standard. You think that you can take
this implementation detail and argue that it should be extended, but
according to the Standard, it doesn't exist. *There is nothing to extend.*

*Union members must have the same address*. A reference is an alias to an
object and hence *has no address* of its own.

No, really: It doesn't. And it *can't*:* "There shall be no pointers to
references."*

Why not? Because then *how would you disambiguate between the address of
the reference versus the address of its referred-to object?* Pointer and
array arithmetic would fall to pieces. *The very physics of the language
would melt* at the sight of pointers-to- or arrays-of-references. They both
depend on the addresses of their elements. And again, a reference doesn't
and can't have an address.

The common objection to such rules is 'A-ha! But I can make a struct
containing a reference and take ITS address, put IT in a container, etc.
QED!' Yeah... but b*y now having both the name of the reference and the
name of the struct, you can disambiguate* between the two aforementioned
addresses. And again, the fact that the reference takes up space in the
struct is an implementation detail.

All of which completely disqualify unions from containing references.
Besides, unions are meant for efficiently holding one of several possible
*values*, not as aliases to other objects. (A pointer is a value.)

Anyway, your struct with a pointer member that you set, in a union with a
reference that you read, is (A) *ill-formed* code due to having a reference
in a union, and (B) terrible, awful *undefined behaviour* due to
type-punning between (incompatible) union members. The fact that g++
compiles this and does what you expect only means that you haven't *yet*
felt the full force of the UB you're invoking. Give it time.

Or just use *std::reference_wrapper,* since I have no idea what you're
trying to do here, that hasn't already been done - properly - already by
the Committee. Why do you need them to throw out several fundamental,
well-reasoned, and extremely important core precepts of the language - just
to de-UBify such code - merely to enable you to reinvent a wheel which they
already made? Do you have any other, actual use-case? I doubt it.

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhHqbKW8dN-02__Gb-J_jemrVUMX0bW-4KJkkY8%3Djt-jmg%40mail.gmail.com.

--001a114ba7d4a8e2fd053908d7b0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>The OP doesn&#39;t seem to want to directly meet any =
objections, but for the sake of others reading who might otherwise be misle=
d: Allow myself to repeat myself. <b>Per the Standard</b>:<br><br>That refe=
rences are implemented as pointers in extant compilers is an <b>implementat=
ion detail</b> and hence completely irrelevant to this, any other proposal,=
 or absolutely any interpretation of the Standard. You think that you can t=
ake this implementation detail and argue that it should be extended, but ac=
cording to the Standard, it doesn&#39;t exist. <i>There is nothing to exten=
d.</i><br><br><b>Union members must have the same address</b>. A reference =
is an alias to an object and hence <b>has no address</b> of its own.<br><br=
>No, really: It doesn&#39;t. And it <i>can&#39;t</i>:<b> &quot;There shall =
be no pointers to references.&quot;</b><br><br>Why not? Because then <b>how=
 would you disambiguate between the address of the reference versus the add=
ress of its referred-to object?</b> Pointer and array arithmetic would fall=
 to pieces. <i>The very physics of the language would melt</i> at the sight=
 of pointers-to- or arrays-of-references. They both depend on the addresses=
 of their elements. And again, a reference doesn&#39;t and can&#39;t have a=
n address.<br><br>The common objection to such rules is &#39;A-ha! But I ca=
n make a struct containing a reference and take ITS address, put IT in a co=
ntainer, etc. QED!&#39; Yeah... but b<b>y now having both the name of the r=
eference and the name of the struct, you can disambiguate</b> between the t=
wo aforementioned addresses. And again, the fact that the reference takes u=
p space in the struct is an implementation detail.<br><br></div><div>All of=
 which completely disqualify unions from containing references. Besides, un=
ions are meant for efficiently holding one of several possible <i>values</i=
>, not as aliases to other objects. (A pointer is a value.)<br></div><div><=
br>Anyway, your struct with a pointer member that you set, in a union with =
a reference that you read, is (A) <b>ill-formed</b> code due to having a re=
ference in a union, and (B) terrible, awful <b>undefined behaviour</b> due =
to type-punning between (incompatible) union members. The fact that g++ com=
piles this and does what you expect only means that you haven&#39;t <b>yet<=
/b> felt the full force of the UB you&#39;re invoking. Give it time.<br><br=
>Or just use <b>std::reference_wrapper,</b> since I have no idea what you&#=
39;re trying to do here, that hasn&#39;t already been done - properly - alr=
eady by the Committee. Why do you need them to throw out several fundamenta=
l, well-reasoned, and extremely important core precepts of the language - j=
ust to de-UBify such code - merely to enable you to reinvent a wheel which =
they already made? Do you have any other, actual use-case? I doubt it.<br><=
br></div><br></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CACGiwhHqbKW8dN-02__Gb-J_jemrVUMX0bW-=
4KJkkY8%3Djt-jmg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhHqbKW8dN=
-02__Gb-J_jemrVUMX0bW-4KJkkY8%3Djt-jmg%40mail.gmail.com</a>.<br />

--001a114ba7d4a8e2fd053908d7b0--

.


Author: "D. B." <db0451@gmail.com>
Date: Mon, 1 Aug 2016 21:59:05 +0100
Raw View
--001a11468e08e69cdf053908de1f
Content-Type: text/plain; charset=UTF-8

I can't believe I've typed so much today against a proposal that basically
says 'Legitimise UB so that I don't have to type a * to dereference, unless
I can be bothered.' Just wow.

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhH9bZEXwdqV2ifbSe5DOCwv44VK_buRsvUkxe4sP-nZGw%40mail.gmail.com.

--001a11468e08e69cdf053908de1f
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I can&#39;t believe I&#39;ve typed so much today against a=
 proposal that basically says &#39;Legitimise UB so that I don&#39;t have t=
o type a * to dereference, unless I can be bothered.&#39; Just wow.<br></di=
v>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CACGiwhH9bZEXwdqV2ifbSe5DOCwv44VK_buR=
svUkxe4sP-nZGw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhH9bZEXwdqV=
2ifbSe5DOCwv44VK_buRsvUkxe4sP-nZGw%40mail.gmail.com</a>.<br />

--001a11468e08e69cdf053908de1f--

.


Author: Antonio Perez <antonio@perezexcelsior.com>
Date: Mon, 1 Aug 2016 14:10:21 -0700 (PDT)
Raw View
------=_Part_5669_715351333.1470085821101
Content-Type: multipart/alternative;
 boundary="----=_Part_5670_1337984552.1470085821111"

------=_Part_5670_1337984552.1470085821111
Content-Type: text/plain; charset=UTF-8

The proposed change would NOT take the address of a reference. It would
provide a method to alias the value referenced by a pointer within classes
and structs. Provided is two sets of code written before I realized this
was undefined behavior, one of which makes use of this UB to eliminate a
significant chunk of code.

#define MakeGenericOperator(name, operation) \
template<typename Out, typename In1, typename In2> struct name : Unit<Out>
{\
    template<typename In1_t, typename In2_t> struct Optimized : Unit<Out> {\
        In1_t input1;\
        In2_t input2;\
        operator Out() const { return input1 operation input2; }\
        Optimized(In1_t in1, In2_t in2) : input1(in1), input2(in2) {}\
    };\
    union { Unit<In1>& input1; Unit<In1>* ptr1; };\
    union { Unit<In2>& input2; Unit<In2>* ptr2; };\
    operator Out() const { return input1 operation input2; }\
    name(Unit<In1>* in1, Unit<In2>* in2) : input1(*in1), input2(*in2) {}\
    Unit<Out>* optimize(MemoryManager& m)\
    {\
        Unit<In1>& input1 = *this->input1.optimize(m);\
        Unit<In2>& input2 = *this->input2.optimize(m);\
        if(auto& const1 = dynamic_cast<ConstU<In1>&>(input1))\
        {\
            if(auto& const2 = dynamic_cast<ConstU<In2>&>(input2))\
            {\
                return m.New<ConstU<Out>>(input1 operation input2);\
            }\
            else if(auto& ref2 = dynamic_cast<RefU<In2>&>(input2))\
            {\
                return m.New<Optimized<In1, In2&>>(const1.value, ref2.ref);\
            }\
            else\
            {\
                return m.New<Optimized<In1, Unit<In2>&>>(const1.value,
input2);\
            }\
        }\
        else if(auto& ref1 = dynamic_cast<RefU<In1>&>(input1))\
        {\
            if(auto& const2 = dynamic_cast<ConstU<In2>&>(input2))\
            {\
                return m.New<Optimized<In1&, In2>>(ref1, const2.value);\
            }\
            else if(auto& ref2 = dynamic_cast<RefU<In2>&>(input2))\
            {\
                return m.New<Optimized<In1&, In2&>>(ref1.ref, ref2.ref);\
            }\
            else\
            {\
                return m.New<Optimized<In1&, Unit<In2>&>>(ref1.ref, input2
);\
            }\
        }\
        else if(auto& const2 = dynamic_cast<ConstU<In2>&>(input2))\
        {\
            return m.New<Optimized<Unit<In1>&, In2>>(input1, const2.value);\
        }\
        else if(auto& ref2 = dynamic_cast<RefU<In2>&>(input2))\
        {\
            return m.New<Optimized<Unit<In1>&, In2&>>(input1, ref2.ref);\
        }\
        this->ptr1 = &input1;\
        this->ptr2 = &input2;\
        return this;\
    }\
};

#define MakeGenericOperator(name, operation) \
template<typename Out, typename In1, typename In2> struct name : Evaluatable
<Out> {\
    template<typename In1_t, typename In2_t> struct ReferenceCase :
Evaluatable<Out> {\
        In1_t* input1;\
        In2_t* input2;\
        operator Out() const { return (*input1) operation (*input2); }\
        ReferenceCase(In1_t* in1, In2_t* in2) : input1(in1), input2(in2) {}\
    };\
    template<typename In2_type> struct ConstCase1 : Evaluatable<Out> {\
        In1 input1;\
        In2_type* input2;\
        operator Out() const { return input1 operation (*input2); }\
        ConstCase1(In1 in1, In2_type* in2) : input1(in1), input2(in2) {}\
    };\
    template<typename In1_type> struct ConstCase2 : Evaluatable<Out> {\
        In1_type* input1;\
        In2 input2;\
        operator Out() const { return (*input1) operation input2; }\
        ConstCase2(In1_type* in1, In2 in2) : input1(in1), input2(in2) {}\
    };\
    Evaluatable<In1>* input1;\
    Evaluatable<In2>* input2;\
    operator Out() const { return (*input1) operation (*input2); }\
    name(Evaluatable<In1>* in1, Evaluatable<In2>* in2) : input1(in1), input2
(in2) {}\
    Evaluatable<Out>* optimize(MemoryManager& m)\
    {\
        Evaluatable<In1>* input1 = this->input1->optimize(m);\
        Evaluatable<In2>* input2 = this->input2->optimize(m);\
        if(auto const1 = dynamic_cast<GenericConstant<In1>*>(input1))\
        {\
            if(auto const2 = dynamic_cast<GenericConstant<In2>*>(input2))\
                return m.New<GenericConstant<Out>>((*input1) operation (*
input2));\
            else if(auto ref2 = dynamic_cast<GenericReference<In2>*>(input2
))\
                return m.New<ConstCase1<In2>>(const1->value, ref2->value);\
            else\
                return m.New<ConstCase1<Evaluatable<In2>>>(const1->value,
input2); \
        }\
        else if(auto ref1 = dynamic_cast<GenericReference<In1>*>(input1)){\
            if(auto const2 = dynamic_cast<GenericConstant<In2>*>(input2))\
                return m.New<ConstCase2<In1>>(ref1->value, const2->value);\
            else if(auto ref2 = dynamic_cast<GenericReference<In2>*>(input2
))\
                return m.New<ReferenceCase<In1, In2>>(ref1->value, ref2->
value);\
            else\
                return m.New<ReferenceCase<In1, Evaluatable<In2>>>(ref1->
value, input2); \
        }\
        else if(auto const2 = dynamic_cast<GenericConstant<In2>*>(input2))\
            return m.New<ConstCase2<Evaluatable<In1>>>(input1, const2->value
);\
        else if(auto ref2 = dynamic_cast<GenericReference<In2>*>(input2))\
            return m.New<ReferenceCase<Evaluatable<In1>, In2>>(input1, ref2
->value);\
        this->input1 = input1;\
        this->input2 = input2;\
        return this;\
    }\
};



On Monday, August 1, 2016 at 2:57:06 PM UTC-6, D. B. wrote:
>
> The OP doesn't seem to want to directly meet any objections, but for the
> sake of others reading who might otherwise be misled: Allow myself to
> repeat myself. *Per the Standard*:
>
> That references are implemented as pointers in extant compilers is an *implementation
> detail* and hence completely irrelevant to this, any other proposal, or
> absolutely any interpretation of the Standard. You think that you can take
> this implementation detail and argue that it should be extended, but
> according to the Standard, it doesn't exist. *There is nothing to extend.*
>
> *Union members must have the same address*. A reference is an alias to an
> object and hence *has no address* of its own.
>
> No, really: It doesn't. And it *can't*:* "There shall be no pointers to
> references."*
>
> Why not? Because then *how would you disambiguate between the address of
> the reference versus the address of its referred-to object?* Pointer and
> array arithmetic would fall to pieces. *The very physics of the language
> would melt* at the sight of pointers-to- or arrays-of-references. They
> both depend on the addresses of their elements. And again, a reference
> doesn't and can't have an address.
>
> The common objection to such rules is 'A-ha! But I can make a struct
> containing a reference and take ITS address, put IT in a container, etc.
> QED!' Yeah... but b*y now having both the name of the reference and the
> name of the struct, you can disambiguate* between the two aforementioned
> addresses. And again, the fact that the reference takes up space in the
> struct is an implementation detail.
>
> All of which completely disqualify unions from containing references.
> Besides, unions are meant for efficiently holding one of several possible
> *values*, not as aliases to other objects. (A pointer is a value.)
>
> Anyway, your struct with a pointer member that you set, in a union with a
> reference that you read, is (A) *ill-formed* code due to having a
> reference in a union, and (B) terrible, awful *undefined behaviour* due
> to type-punning between (incompatible) union members. The fact that g++
> compiles this and does what you expect only means that you haven't *yet*
> felt the full force of the UB you're invoking. Give it time.
>
> Or just use *std::reference_wrapper,* since I have no idea what you're
> trying to do here, that hasn't already been done - properly - already by
> the Committee. Why do you need them to throw out several fundamental,
> well-reasoned, and extremely important core precepts of the language - just
> to de-UBify such code - merely to enable you to reinvent a wheel which they
> already made? Do you have any other, actual use-case? I doubt it.
>
>
>

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/4576ad7b-1073-40dc-a8a0-caebc9e9df71%40isocpp.org.

------=_Part_5670_1337984552.1470085821111
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">The proposed change would NOT take the address of a refere=
nce. It would provide a method to alias the value referenced by a pointer w=
ithin classes and structs. Provided is two sets of code written before I re=
alized this was undefined behavior, one of which makes use of this UB to el=
iminate a significant chunk of code.<br><br><div class=3D"prettyprint" styl=
e=3D"background-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187)=
; border-style: solid; border-width: 1px; word-wrap: break-word;"><code cla=
ss=3D"prettyprint"><div class=3D"subprettyprint"><span style=3D"color: #800=
;" class=3D"styled-by-prettify">#define</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"> </span><span style=3D"color: #606;" class=3D"=
styled-by-prettify">MakeGenericOperator</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">(</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify">name</span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"> operation</span><span style=3D"color: #660;" class=3D"styled-by-prett=
ify">)</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">\</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">template</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"co=
lor: #008;" class=3D"styled-by-prettify">typename</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #606;"=
 class=3D"styled-by-prettify">Out</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-pret=
tify">typename</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> </span><span style=3D"color: #606;" class=3D"styled-by-prettify">In1</=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">typename</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #606;" class=3D"styled-by-prettify">In2</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">&gt;</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"styl=
ed-by-prettify">struct</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"> name </span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">:</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
</span><span style=3D"color: #606;" class=3D"styled-by-prettify">Unit</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span=
 style=3D"color: #606;" class=3D"styled-by-prettify">Out</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&gt;</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">{\</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"color: #008=
;" class=3D"styled-by-prettify">template</span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">typename</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #606;" class=3D"style=
d-by-prettify">In1_t</span><span style=3D"color: #660;" class=3D"styled-by-=
prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"=
> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">typename=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><s=
pan style=3D"color: #606;" class=3D"styled-by-prettify">In2_t</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">&gt;</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #008;" class=3D"styled-by-prettify">struct</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> </span><span style=3D"color: #606;" clas=
s=3D"styled-by-prettify">Optimized</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">:</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> </span><span style=3D"color: #606;" class=3D"styled-by-prettify">Uni=
t</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</spa=
n><span style=3D"color: #606;" class=3D"styled-by-prettify">Out</span><span=
 style=3D"color: #660;" class=3D"styled-by-prettify">&gt;</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">{\</span><span style=3D"color: #000;"=
 class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span =
style=3D"color: #606;" class=3D"styled-by-prettify">In1_t</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> input1</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">;\</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span>=
<span style=3D"color: #606;" class=3D"styled-by-prettify">In2_t</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> input2</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">;\</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 <=
/span><span style=3D"color: #008;" class=3D"styled-by-prettify">operator</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span=
 style=3D"color: #606;" class=3D"styled-by-prettify">Out</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">()</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;"=
 class=3D"styled-by-prettify">const</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">{</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">re=
turn</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> input=
1 operation input2</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">}\</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 </span><span style=3D"color: #606;" class=3D"styled-by-pretti=
fy">Optimized</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">(</span><span style=3D"color: #606;" class=3D"styled-by-prettify">In1_t<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"> in1</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"col=
or: #606;" class=3D"styled-by-prettify">In2_t</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> in2</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">)</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">:</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"> input1</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify">in1</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">),</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> input2</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify">in2</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">)</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">{}\</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"><br>=C2=A0 =C2=A0 </span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">};\</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"><br>=C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"sty=
led-by-prettify">union</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">{</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </spa=
n><span style=3D"color: #606;" class=3D"styled-by-prettify">Unit</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span styl=
e=3D"color: #606;" class=3D"styled-by-prettify">In1</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">&gt;&amp;</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> input1</span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">;</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> </span><span style=3D"color: #606;" class=3D"s=
tyled-by-prettify">Unit</span><span style=3D"color: #660;" class=3D"styled-=
by-prettify">&lt;</span><span style=3D"color: #606;" class=3D"styled-by-pre=
ttify">In1</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
&gt;*</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> ptr1=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">};\</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span styl=
e=3D"color: #008;" class=3D"styled-by-prettify">union</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">{</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> </span><span style=3D"color: #606;" class=3D"styl=
ed-by-prettify">Unit</span><span style=3D"color: #660;" class=3D"styled-by-=
prettify">&lt;</span><span style=3D"color: #606;" class=3D"styled-by-pretti=
fy">In2</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&gt=
;&amp;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> inp=
ut2</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span st=
yle=3D"color: #606;" class=3D"styled-by-prettify">Unit</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color=
: #606;" class=3D"styled-by-prettify">In2</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">&gt;*</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify"> ptr2</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">;</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">};\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=
=C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">operator</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"> </span><span style=3D"color: #606;" class=3D"styled-by-prettify">Out</sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">()</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D=
"color: #008;" class=3D"styled-by-prettify">const</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">{</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-b=
y-prettify">return</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> input1 operation input2</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">;</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">}\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><b=
r>=C2=A0 =C2=A0 name</span><span style=3D"color: #660;" class=3D"styled-by-=
prettify">(</span><span style=3D"color: #606;" class=3D"styled-by-prettify"=
>Unit</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;<=
/span><span style=3D"color: #606;" class=3D"styled-by-prettify">In1</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">&gt;*</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> in1</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #606;" =
class=3D"styled-by-prettify">Unit</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D"st=
yled-by-prettify">In2</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">&gt;*</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> in2</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
)</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">:</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"> input1</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">(*</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify">in1</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">),</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> input2</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">(*</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify">in2</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">)</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">{}\</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 <=
/span><span style=3D"color: #606;" class=3D"styled-by-prettify">Unit</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span =
style=3D"color: #606;" class=3D"styled-by-prettify">Out</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&gt;*</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> optimize</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #606=
;" class=3D"styled-by-prettify">MemoryManager</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">&amp;</span><span style=3D"color: #000;"=
 class=3D"styled-by-prettify"> m</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">)\</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">{\</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color=
: #606;" class=3D"styled-by-prettify">Unit</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" cla=
ss=3D"styled-by-prettify">In1</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">&gt;&amp;</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> input1 </span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">=3D</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
*</span><span style=3D"color: #008;" class=3D"styled-by-prettify">this</spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">-&gt;</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify">input1</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">.</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify">optimize</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify">m</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">);\</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"colo=
r: #606;" class=3D"styled-by-prettify">Unit</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" cl=
ass=3D"styled-by-prettify">In2</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">&gt;&amp;</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"> input2 </span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">=3D</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>*</span><span style=3D"color: #008;" class=3D"styled-by-prettify">this</sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">-&gt;</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify">input2</span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">.</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify">optimize</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify">m</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">);\</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"colo=
r: #008;" class=3D"styled-by-prettify">if</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">(</span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">auto</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">&amp;</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> const1 </span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">=3D</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">dynam=
ic_cast</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt=
;</span><span style=3D"color: #606;" class=3D"styled-by-prettify">ConstU</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><s=
pan style=3D"color: #606;" class=3D"styled-by-prettify">In1</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">&gt;&amp;&gt;(</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify">input1</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">))\</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 <=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">{\</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"st=
yled-by-prettify">if</span><span style=3D"color: #660;" class=3D"styled-by-=
prettify">(</span><span style=3D"color: #008;" class=3D"styled-by-prettify"=
>auto</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&amp;=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> const2 </=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">dynamic_cast</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"=
color: #606;" class=3D"styled-by-prettify">ConstU</span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #60=
6;" class=3D"styled-by-prettify">In2</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">&gt;&amp;&gt;(</span><span style=3D"color: #000;"=
 class=3D"styled-by-prettify">input2</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">))\</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">{\</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">return</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify"> m</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">.</span><span style=3D"color: #606;" class=3D"styled-by-prettif=
y">New</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;=
</span><span style=3D"color: #606;" class=3D"styled-by-prettify">ConstU</sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><sp=
an style=3D"color: #606;" class=3D"styled-by-prettify">Out</span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">&gt;&gt;(</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify">input1 operation input2</spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">);\</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">}\</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"=
color: #008;" class=3D"styled-by-prettify">else</span><span style=3D"color:=
 #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" c=
lass=3D"styled-by-prettify">if</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">(</span><span style=3D"color: #008;" class=3D"styled-by=
-prettify">auto</span><span style=3D"color: #660;" class=3D"styled-by-prett=
ify">&amp;</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
 ref2 </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><sp=
an style=3D"color: #008;" class=3D"styled-by-prettify">dynamic_cast</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span s=
tyle=3D"color: #606;" class=3D"styled-by-prettify">RefU</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"co=
lor: #606;" class=3D"styled-by-prettify">In2</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">&gt;&amp;&gt;(</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify">input2</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">))\</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">{\</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008=
;" class=3D"styled-by-prettify">return</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> m</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">.</span><span style=3D"color: #606;" class=3D"styled-by=
-prettify">New</span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">&lt;</span><span style=3D"color: #606;" class=3D"styled-by-prettify">Op=
timized</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt=
;</span><span style=3D"color: #606;" class=3D"styled-by-prettify">In1</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"co=
lor: #606;" class=3D"styled-by-prettify">In2</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">&amp;&gt;&gt;(</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify">const1</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">.</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify">value</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> ref2</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">.</span><span style=3D"color: #008;" class=3D"styled-by-prettify">ref=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">);\</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">}\</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">else</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">\</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 </span><span style=3D"color: #660;" class=3D"styled-by-prettify">{\</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: =
#008;" class=3D"styled-by-prettify">return</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify"> m</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">.</span><span style=3D"color: #606;" class=3D"style=
d-by-prettify">New</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">&lt;</span><span style=3D"color: #606;" class=3D"styled-by-prettify=
">Optimized</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>&lt;</span><span style=3D"color: #606;" class=3D"styled-by-prettify">In1</=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #606;" class=3D"styled-by-prettify">Unit</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #=
606;" class=3D"styled-by-prettify">In2</span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">&gt;&amp;&gt;&gt;(</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify">const1</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">.</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">value</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> input2</span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">);\</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">}\</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">}\</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 <=
/span><span style=3D"color: #008;" class=3D"styled-by-prettify">else</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span sty=
le=3D"color: #008;" class=3D"styled-by-prettify">if</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #008=
;" class=3D"styled-by-prettify">auto</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">&amp;</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"> ref1 </span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">=3D</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify"=
>dynamic_cast</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">&lt;</span><span style=3D"color: #606;" class=3D"styled-by-prettify">Ref=
U</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</spa=
n><span style=3D"color: #606;" class=3D"styled-by-prettify">In1</span><span=
 style=3D"color: #660;" class=3D"styled-by-prettify">&gt;&amp;&gt;(</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify">input1</span><span=
 style=3D"color: #660;" class=3D"styled-by-prettify">))\</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 </span><span style=3D"color: #660;" class=3D"styled-by-prettify">{\</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">if</span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">(</span><span style=3D"color: #008;" class=3D"styled-by-pre=
ttify">auto</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>&amp;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> con=
st2 </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span=
 style=3D"color: #008;" class=3D"styled-by-prettify">dynamic_cast</span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span sty=
le=3D"color: #606;" class=3D"styled-by-prettify">ConstU</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"co=
lor: #606;" class=3D"styled-by-prettify">In2</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">&gt;&amp;&gt;(</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify">input2</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">))\</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">{\</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008=
;" class=3D"styled-by-prettify">return</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> m</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">.</span><span style=3D"color: #606;" class=3D"styled-by=
-prettify">New</span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">&lt;</span><span style=3D"color: #606;" class=3D"styled-by-prettify">Op=
timized</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt=
;</span><span style=3D"color: #606;" class=3D"styled-by-prettify">In1</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">&amp;,</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #606;" class=3D"styled-by-prettify">In2</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">&gt;&gt;(</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify">ref1</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> const2</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">.</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify">value</span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">);\</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">}\</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <=
/span><span style=3D"color: #008;" class=3D"styled-by-prettify">else</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span sty=
le=3D"color: #008;" class=3D"styled-by-prettify">if</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #008=
;" class=3D"styled-by-prettify">auto</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">&amp;</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"> ref2 </span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">=3D</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify"=
>dynamic_cast</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">&lt;</span><span style=3D"color: #606;" class=3D"styled-by-prettify">Ref=
U</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</spa=
n><span style=3D"color: #606;" class=3D"styled-by-prettify">In2</span><span=
 style=3D"color: #660;" class=3D"styled-by-prettify">&gt;&amp;&gt;(</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify">input2</span><span=
 style=3D"color: #660;" class=3D"styled-by-prettify">))\</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">{\</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span st=
yle=3D"color: #008;" class=3D"styled-by-prettify">return</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> m</span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">.</span><span style=3D"color: #606;"=
 class=3D"styled-by-prettify">New</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D"st=
yled-by-prettify">Optimized</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D"styled-by=
-prettify">In1</span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">&amp;,</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
 </span><span style=3D"color: #606;" class=3D"styled-by-prettify">In2</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">&amp;&gt;&gt;(</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify">ref1</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">.</span><span styl=
e=3D"color: #008;" class=3D"styled-by-prettify">ref</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify"> ref2</span><span style=3D"color: #660;" cl=
ass=3D"styled-by-prettify">.</span><span style=3D"color: #008;" class=3D"st=
yled-by-prettify">ref</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">);\</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">}\</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 </span><span style=3D"color: #008;" class=3D"styled-by-prettify">else</=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">\</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">{\</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><=
span style=3D"color: #008;" class=3D"styled-by-prettify">return</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> m</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">.</span><span style=3D"color=
: #606;" class=3D"styled-by-prettify">New</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" clas=
s=3D"styled-by-prettify">Optimized</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D"st=
yled-by-prettify">In1</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">&amp;,</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"> </span><span style=3D"color: #606;" class=3D"styled-by-prettify">Un=
it</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</sp=
an><span style=3D"color: #606;" class=3D"styled-by-prettify">In2</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">&gt;&amp;&gt;&gt;(</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify">ref1</span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">.</span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">ref</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> input2</span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">);\</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">}\</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 </span><span style=3D"color: #660;" class=3D"styled-by-prettify">}\<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by=
-prettify">else</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">if</=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><spa=
n style=3D"color: #008;" class=3D"styled-by-prettify">auto</span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">&amp;</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> const2 </span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" clas=
s=3D"styled-by-prettify">dynamic_cast</span><span style=3D"color: #660;" cl=
ass=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D=
"styled-by-prettify">ConstU</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D"styled-by=
-prettify">In2</span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">&gt;&amp;&gt;(</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify">input2</span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">))\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br=
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">{\</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">return</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> m</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">.</span><span style=3D"color: #606;" cla=
ss=3D"styled-by-prettify">New</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D"styled-=
by-prettify">Optimized</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">&lt;</span><span style=3D"color: #606;" class=3D"styled-by-pret=
tify">Unit</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
&lt;</span><span style=3D"color: #606;" class=3D"styled-by-prettify">In1</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">&gt;&amp;,</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span=
 style=3D"color: #606;" class=3D"styled-by-prettify">In2</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&gt;&gt;(</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify">input1</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> const2</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">.</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">value</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">);\</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">}\</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span styl=
e=3D"color: #008;" class=3D"styled-by-prettify">else</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #00=
8;" class=3D"styled-by-prettify">if</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">(</span><span style=3D"color: #008;" class=3D"styl=
ed-by-prettify">auto</span><span style=3D"color: #660;" class=3D"styled-by-=
prettify">&amp;</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"> ref2 </span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>=3D</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </spa=
n><span style=3D"color: #008;" class=3D"styled-by-prettify">dynamic_cast</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><s=
pan style=3D"color: #606;" class=3D"styled-by-prettify">RefU</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D=
"color: #606;" class=3D"styled-by-prettify">In2</span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">&gt;&amp;&gt;(</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify">input2</span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">))\</span><span style=3D"color: #000;"=
 class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">{\</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-prett=
ify">return</span><span style=3D"color: #000;" class=3D"styled-by-prettify"=
> m</span><span style=3D"color: #660;" class=3D"styled-by-prettify">.</span=
><span style=3D"color: #606;" class=3D"styled-by-prettify">New</span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=
=3D"color: #606;" class=3D"styled-by-prettify">Optimized</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"co=
lor: #606;" class=3D"styled-by-prettify">Unit</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" =
class=3D"styled-by-prettify">In1</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">&gt;&amp;,</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #606;" class=3D"style=
d-by-prettify">In2</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">&amp;&gt;&gt;(</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify">input1</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
ref2</span><span style=3D"color: #660;" class=3D"styled-by-prettify">.</spa=
n><span style=3D"color: #008;" class=3D"styled-by-prettify">ref</span><span=
 style=3D"color: #660;" class=3D"styled-by-prettify">);\</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 </span><span style=3D"color: #660;" class=3D"styled-by-prettify">}\</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-pr=
ettify">this</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">-&gt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify">ptr=
1 </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">&amp;</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify">input1</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">;\</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><=
span style=3D"color: #008;" class=3D"styled-by-prettify">this</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">-&gt;</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify">ptr2 </span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">&amp;</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify">input2</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">;\</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;=
" class=3D"styled-by-prettify">return</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"st=
yled-by-prettify">this</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">;\</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"><br>=C2=A0 =C2=A0 </span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">}\</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"><br></span><span style=3D"color: #660;" class=3D"styled-by-prettify">};=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br><br></=
span><span style=3D"color: #800;" class=3D"styled-by-prettify">#define</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span s=
tyle=3D"color: #606;" class=3D"styled-by-prettify">MakeGenericOperator</spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify">name</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> operation</span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">)</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">\</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"><br></span><span style=3D"color: #008;" class=3D"styled-by-prett=
ify">template</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">&lt;</span><span style=3D"color: #008;" class=3D"styled-by-prettify">typ=
ename</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </sp=
an><span style=3D"color: #606;" class=3D"styled-by-prettify">Out</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #008;" class=3D"styled-by-prettify">typename</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #606;" cl=
ass=3D"styled-by-prettify">In1</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify=
">typename</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
 </span><span style=3D"color: #606;" class=3D"styled-by-prettify">In2</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">&gt;</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D=
"color: #008;" class=3D"styled-by-prettify">struct</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> name </span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">:</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> </span><span style=3D"color: #606;" class=3D"st=
yled-by-prettify">Evaluatable</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D"styled-=
by-prettify">Out</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">&gt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
 </span><span style=3D"color: #660;" class=3D"styled-by-prettify">{\</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0=
 </span><span style=3D"color: #008;" class=3D"styled-by-prettify">template<=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span>=
<span style=3D"color: #008;" class=3D"styled-by-prettify">typename</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #606;" class=3D"styled-by-prettify">In1_t</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">typename</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #606;" class=3D"style=
d-by-prettify">In2_t</span><span style=3D"color: #660;" class=3D"styled-by-=
prettify">&gt;</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">struc=
t</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><=
span style=3D"color: #606;" class=3D"styled-by-prettify">ReferenceCase</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">:</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #60=
6;" class=3D"styled-by-prettify">Evaluatable</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" c=
lass=3D"styled-by-prettify">Out</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">&gt;</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">{\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><b=
r>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #606;" class=3D"=
styled-by-prettify">In1_t</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">*</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> input1</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">;\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #606;" class=3D"st=
yled-by-prettify">In2_t</span><span style=3D"color: #660;" class=3D"styled-=
by-prettify">*</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> input2</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>;\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"style=
d-by-prettify">operator</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> </span><span style=3D"color: #606;" class=3D"styled-by-pretti=
fy">Out</span><span style=3D"color: #660;" class=3D"styled-by-prettify">()<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><sp=
an style=3D"color: #008;" class=3D"styled-by-prettify">const</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">{</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">return</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">(*</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y">input1</span><span style=3D"color: #660;" class=3D"styled-by-prettify">)=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> operation=
 </span><span style=3D"color: #660;" class=3D"styled-by-prettify">(*</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify">input2</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">);</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">}\</span><span style=3D"color: #000;"=
 class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span =
style=3D"color: #606;" class=3D"styled-by-prettify">ReferenceCase</span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=
=3D"color: #606;" class=3D"styled-by-prettify">In1_t</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">*</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"> in1</span><span style=3D"color: #660;" cl=
ass=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> </span><span style=3D"color: #606;" class=3D"styled-by-p=
rettify">In2_t</span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">*</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> in2<=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">)</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">:</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> input1</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify">in1</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">),</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> input2</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">(</span><span style=3D"color: #000;" class=3D"styled-by-prettify">i=
n2</span><span style=3D"color: #660;" class=3D"styled-by-prettify">)</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">{}\</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">};\</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span s=
tyle=3D"color: #008;" class=3D"styled-by-prettify">template</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"=
color: #008;" class=3D"styled-by-prettify">typename</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #606=
;" class=3D"styled-by-prettify">In2_type</span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">&gt;</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"style=
d-by-prettify">struct</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> </span><span style=3D"color: #606;" class=3D"styled-by-prettify=
">ConstCase1</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">:</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span st=
yle=3D"color: #606;" class=3D"styled-by-prettify">Evaluatable</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=
=3D"color: #606;" class=3D"styled-by-prettify">Out</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">&gt;</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">{\</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"colo=
r: #606;" class=3D"styled-by-prettify">In1</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify"> input1</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">;\</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"=
color: #606;" class=3D"styled-by-prettify">In2_type</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">*</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify"> input2</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">;\</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"=
color: #008;" class=3D"styled-by-prettify">operator</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #606=
;" class=3D"styled-by-prettify">Out</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">()</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-pr=
ettify">const</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">{</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span s=
tyle=3D"color: #008;" class=3D"styled-by-prettify">return</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> input1 operation </span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">(*</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify">input2</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">);</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">}\</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"col=
or: #606;" class=3D"styled-by-prettify">ConstCase1</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #606;=
" class=3D"styled-by-prettify">In1</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> in1</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> </span><span style=3D"color: #606;" class=3D"styled-by-prettify">=
In2_type</span><span style=3D"color: #660;" class=3D"styled-by-prettify">*<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"> in2</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">)</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">:</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> input1</span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">(</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify">in1</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">),</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> input2</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>(</span><span style=3D"color: #000;" class=3D"styled-by-prettify">in2</spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">)</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">{}\</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">};\</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D=
"color: #008;" class=3D"styled-by-prettify">template</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: =
#008;" class=3D"styled-by-prettify">typename</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> </span><span style=3D"color: #606;" clas=
s=3D"styled-by-prettify">In1_type</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">&gt;</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-p=
rettify">struct</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"> </span><span style=3D"color: #606;" class=3D"styled-by-prettify">Cons=
tCase2</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">:</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D=
"color: #606;" class=3D"styled-by-prettify">Evaluatable</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"co=
lor: #606;" class=3D"styled-by-prettify">Out</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">&gt;</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">{\</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #60=
6;" class=3D"styled-by-prettify">In1_type</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">*</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> input1</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">;\</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #=
606;" class=3D"styled-by-prettify">In2</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> input2</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">;\</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"colo=
r: #008;" class=3D"styled-by-prettify">operator</span><span style=3D"color:=
 #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #606;" c=
lass=3D"styled-by-prettify">Out</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">()</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">const</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">{</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">return</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">(*</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify">input1</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">)</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"> operation input2</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">;</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">}\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><b=
r>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #606;" class=3D"=
styled-by-prettify">ConstCase2</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">(</span><span style=3D"color: #606;" class=3D"styled-by=
-prettify">In1_type</span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">*</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
 in1</span><span style=3D"color: #660;" class=3D"styled-by-prettify">,</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span s=
tyle=3D"color: #606;" class=3D"styled-by-prettify">In2</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify"> in2</span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">)</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">:</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> input1</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">(</span><span style=3D"color: #000;" class=3D"styled-by-prettify">i=
n1</span><span style=3D"color: #660;" class=3D"styled-by-prettify">),</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> input2</span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify">in2</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">)</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">{}\</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">};\</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"color: #606;" cla=
ss=3D"styled-by-prettify">Evaluatable</span><span style=3D"color: #660;" cl=
ass=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D=
"styled-by-prettify">In1</span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">&gt;*</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> input1</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">;\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><b=
r>=C2=A0 =C2=A0 </span><span style=3D"color: #606;" class=3D"styled-by-pret=
tify">Evaluatable</span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">&lt;</span><span style=3D"color: #606;" class=3D"styled-by-prettify"=
>In2</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&gt;*<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"> input2</sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">;\</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </sp=
an><span style=3D"color: #008;" class=3D"styled-by-prettify">operator</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span st=
yle=3D"color: #606;" class=3D"styled-by-prettify">Out</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">()</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" cla=
ss=3D"styled-by-prettify">const</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">{</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">return=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">(*</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify">input1</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">)</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> operation </span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">(*</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify">input2</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">);</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">}\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><=
br>=C2=A0 =C2=A0 name</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">(</span><span style=3D"color: #606;" class=3D"styled-by-prettify=
">Evaluatable</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">&lt;</span><span style=3D"color: #606;" class=3D"styled-by-prettify">In1=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&gt;*</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> in1</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #606;" class=3D"styled-by-prettify">Evaluatable</span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #60=
6;" class=3D"styled-by-prettify">In2</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">&gt;*</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"> in2</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">)</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">:</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> input1</spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify">in1</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">),</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify"> input2</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">(</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">in2</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">)</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">{=
}\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=
=A0 =C2=A0 </span><span style=3D"color: #606;" class=3D"styled-by-prettify"=
>Evaluatable</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">&lt;</span><span style=3D"color: #606;" class=3D"styled-by-prettify">Out<=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">&gt;*</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> optimize</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span sty=
le=3D"color: #606;" class=3D"styled-by-prettify">MemoryManager</span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">&amp;</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> m</span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">)\</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">{\</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span=
 style=3D"color: #606;" class=3D"styled-by-prettify">Evaluatable</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span styl=
e=3D"color: #606;" class=3D"styled-by-prettify">In1</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">&gt;*</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify"> input1 </span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">=3D</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"st=
yled-by-prettify">this</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">-&gt;</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify">input1</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">-&gt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify">op=
timize</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify">m</span><span=
 style=3D"color: #660;" class=3D"styled-by-prettify">);\</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 </span><span style=3D"color: #606;" class=3D"styled-by-prettify">Evalua=
table</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;<=
/span><span style=3D"color: #606;" class=3D"styled-by-prettify">In2</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">&gt;*</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> input2 </span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #0=
08;" class=3D"styled-by-prettify">this</span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">-&gt;</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">input2</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">-&gt;</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify">optimize</span><span style=3D"color: #660;" class=3D"styled-=
by-prettify">(</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy">m</span><span style=3D"color: #660;" class=3D"styled-by-prettify">);\</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by=
-prettify">if</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">(</span><span style=3D"color: #008;" class=3D"styled-by-prettify">auto</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> const1 </sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">dynamic_cast</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"=
color: #606;" class=3D"styled-by-prettify">GenericConstant</span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"c=
olor: #606;" class=3D"styled-by-prettify">In1</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">&gt;*&gt;(</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify">input1</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">))\</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">{\</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-prettify"=
>if</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span=
><span style=3D"color: #008;" class=3D"styled-by-prettify">auto</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> const2 </span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #=
008;" class=3D"styled-by-prettify">dynamic_cast</span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;=
" class=3D"styled-by-prettify">GenericConstant</span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;"=
 class=3D"styled-by-prettify">In2</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">&gt;*&gt;(</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">input2</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">))\</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </=
span><span style=3D"color: #008;" class=3D"styled-by-prettify">return</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> m</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">.</span><span style=3D"c=
olor: #606;" class=3D"styled-by-prettify">New</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" =
class=3D"styled-by-prettify">GenericConstant</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" c=
lass=3D"styled-by-prettify">Out</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">&gt;&gt;((*</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">input1</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">)</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> operation </span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">(*</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy">input2</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
));\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008=
;" class=3D"styled-by-prettify">else</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"sty=
led-by-prettify">if</span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">(</span><span style=3D"color: #008;" class=3D"styled-by-prettify">=
auto</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> ref2 =
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span sty=
le=3D"color: #008;" class=3D"styled-by-prettify">dynamic_cast</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=
=3D"color: #606;" class=3D"styled-by-prettify">GenericReference</span><span=
 style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=
=3D"color: #606;" class=3D"styled-by-prettify">In2</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">&gt;*&gt;(</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify">input2</span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">))\</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">return</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
 m</span><span style=3D"color: #660;" class=3D"styled-by-prettify">.</span>=
<span style=3D"color: #606;" class=3D"styled-by-prettify">New</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=
=3D"color: #606;" class=3D"styled-by-prettify">ConstCase1</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"co=
lor: #606;" class=3D"styled-by-prettify">In2</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">&gt;&gt;(</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify">const1</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">-&gt;</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">value</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> ref2</span><span style=3D"color: #660;" class=3D"styled-by-prett=
ify">-&gt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
value</span><span style=3D"color: #660;" class=3D"styled-by-prettify">);\</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" clas=
s=3D"styled-by-prettify">else</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">\</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </spa=
n><span style=3D"color: #008;" class=3D"styled-by-prettify">return</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"> m</span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">.</span><span style=3D"colo=
r: #606;" class=3D"styled-by-prettify">New</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" cla=
ss=3D"styled-by-prettify">ConstCase1</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D"=
styled-by-prettify">Evaluatable</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D"style=
d-by-prettify">In2</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">&gt;&gt;&gt;(</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify">const1</span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">-&gt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
">value</span><span style=3D"color: #660;" class=3D"styled-by-prettify">,</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> input2</spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">);</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">\</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">}\</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-prettify">els=
e</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><=
span style=3D"color: #008;" class=3D"styled-by-prettify">if</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"col=
or: #008;" class=3D"styled-by-prettify">auto</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> ref1 </span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">=3D</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"style=
d-by-prettify">dynamic_cast</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D"styled-by=
-prettify">GenericReference</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D"styled-by=
-prettify">In1</span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">&gt;*&gt;(</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy">input1</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
)){\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008=
;" class=3D"styled-by-prettify">if</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">(</span><span style=3D"color: #008;" class=3D"style=
d-by-prettify">auto</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> const2 </span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">=3D</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
 </span><span style=3D"color: #008;" class=3D"styled-by-prettify">dynamic_c=
ast</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</s=
pan><span style=3D"color: #606;" class=3D"styled-by-prettify">GenericConsta=
nt</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</sp=
an><span style=3D"color: #606;" class=3D"styled-by-prettify">In2</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">&gt;*&gt;(</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify">input2</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">))\</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"st=
yled-by-prettify">return</span><span style=3D"color: #000;" class=3D"styled=
-by-prettify"> m</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">.</span><span style=3D"color: #606;" class=3D"styled-by-prettify">New=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span=
><span style=3D"color: #606;" class=3D"styled-by-prettify">ConstCase2</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span=
 style=3D"color: #606;" class=3D"styled-by-prettify">In1</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&gt;&gt;(</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify">ref1</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">-&gt;</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify">value</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> const2</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">-&gt;</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify">value</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">);\</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"col=
or: #008;" class=3D"styled-by-prettify">else</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" clas=
s=3D"styled-by-prettify">if</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">(</span><span style=3D"color: #008;" class=3D"styled-by-pr=
ettify">auto</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"> ref2 </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
=3D</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
><span style=3D"color: #008;" class=3D"styled-by-prettify">dynamic_cast</sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><sp=
an style=3D"color: #606;" class=3D"styled-by-prettify">GenericReference</sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><sp=
an style=3D"color: #606;" class=3D"styled-by-prettify">In2</span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">&gt;*&gt;(</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify">input2</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">))\</span><span style=3D"color:=
 #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-b=
y-prettify">return</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> m</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
..</span><span style=3D"color: #606;" class=3D"styled-by-prettify">New</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span=
 style=3D"color: #606;" class=3D"styled-by-prettify">ReferenceCase</span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span st=
yle=3D"color: #606;" class=3D"styled-by-prettify">In1</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> </span><span style=3D"color: #606;" clas=
s=3D"styled-by-prettify">In2</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">&gt;&gt;(</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify">ref1</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">-&gt;</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify">value</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> ref2</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">-&gt;</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify">value</span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">);\</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-pr=
ettify">else</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"=
color: #008;" class=3D"styled-by-prettify">return</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"> m</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">.</span><span style=3D"color: #606;" class=
=3D"styled-by-prettify">New</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D"styled-by=
-prettify">ReferenceCase</span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D"styled-by-pr=
ettify">In1</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span>=
<span style=3D"color: #606;" class=3D"styled-by-prettify">Evaluatable</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span=
 style=3D"color: #606;" class=3D"styled-by-prettify">In2</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&gt;&gt;&gt;(</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify">ref1</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">-&gt;</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify">value</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> input2</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">);</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><b=
r>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">}\</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #0=
08;" class=3D"styled-by-prettify">else</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"s=
tyled-by-prettify">if</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">(</span><span style=3D"color: #008;" class=3D"styled-by-prettify=
">auto</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> con=
st2 </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span=
 style=3D"color: #008;" class=3D"styled-by-prettify">dynamic_cast</span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span sty=
le=3D"color: #606;" class=3D"styled-by-prettify">GenericConstant</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span styl=
e=3D"color: #606;" class=3D"styled-by-prettify">In2</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">&gt;*&gt;(</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify">input2</span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">))\</span><span style=3D"color: #000;"=
 class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 </span><span style=3D"color: #008;" class=3D"styled-by-prettify">return</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"> m</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">.</span><span style=
=3D"color: #606;" class=3D"styled-by-prettify">New</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #6=
06;" class=3D"styled-by-prettify">ConstCase2</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" c=
lass=3D"styled-by-prettify">Evaluatable</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" class=
=3D"styled-by-prettify">In1</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">&gt;&gt;&gt;(</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify">input1</span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"> const2</span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">-&gt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify">v=
alue</span><span style=3D"color: #660;" class=3D"styled-by-prettify">);\</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by=
-prettify">else</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">if</=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><spa=
n style=3D"color: #008;" class=3D"styled-by-prettify">auto</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"> ref2 </span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"color:=
 #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" c=
lass=3D"styled-by-prettify">dynamic_cast</span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" class=
=3D"styled-by-prettify">GenericReference</span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" class=
=3D"styled-by-prettify">In2</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">&gt;*&gt;(</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify">input2</span><span style=3D"color: #660;" class=3D"styled-=
by-prettify">))\</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"c=
olor: #008;" class=3D"styled-by-prettify">return</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> m</span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">.</span><span style=3D"color: #606;" class=3D=
"styled-by-prettify">New</span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D"styled-by-pr=
ettify">ReferenceCase</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">&lt;</span><span style=3D"color: #606;" class=3D"styled-by-prett=
ify">Evaluatable</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">&lt;</span><span style=3D"color: #606;" class=3D"styled-by-prettify">=
In1</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&gt;,</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><spa=
n style=3D"color: #606;" class=3D"styled-by-prettify">In2</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&gt;&gt;(</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify">input1</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> ref2</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">-&gt;</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">value</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">);\</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #0=
08;" class=3D"styled-by-prettify">this</span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">-&gt;</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">input1 </span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">=3D</span><span style=3D"color: #000;" class=3D"styled=
-by-prettify"> input1</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">;\</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" clas=
s=3D"styled-by-prettify">this</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">-&gt;</span><span style=3D"color: #000;" class=3D"styled=
-by-prettify">input2 </span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">=3D</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> input2</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>;\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"style=
d-by-prettify">return</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify=
">this</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;\</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =
=C2=A0 </span><span style=3D"color: #660;" class=3D"styled-by-prettify">}\<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">};</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"><br></span></div></code><=
/div><br><br><br>On Monday, August 1, 2016 at 2:57:06 PM UTC-6, D. B. wrote=
:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;bo=
rder-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><div>The OP =
doesn&#39;t seem to want to directly meet any objections, but for the sake =
of others reading who might otherwise be misled: Allow myself to repeat mys=
elf. <b>Per the Standard</b>:<br><br>That references are implemented as poi=
nters in extant compilers is an <b>implementation detail</b> and hence comp=
letely irrelevant to this, any other proposal, or absolutely any interpreta=
tion of the Standard. You think that you can take this implementation detai=
l and argue that it should be extended, but according to the Standard, it d=
oesn&#39;t exist. <i>There is nothing to extend.</i><br><br><b>Union member=
s must have the same address</b>. A reference is an alias to an object and =
hence <b>has no address</b> of its own.<br><br>No, really: It doesn&#39;t. =
And it <i>can&#39;t</i>:<b> &quot;There shall be no pointers to references.=
&quot;</b><br><br>Why not? Because then <b>how would you disambiguate betwe=
en the address of the reference versus the address of its referred-to objec=
t?</b> Pointer and array arithmetic would fall to pieces. <i>The very physi=
cs of the language would melt</i> at the sight of pointers-to- or arrays-of=
-references. They both depend on the addresses of their elements. And again=
, a reference doesn&#39;t and can&#39;t have an address.<br><br>The common =
objection to such rules is &#39;A-ha! But I can make a struct containing a =
reference and take ITS address, put IT in a container, etc. QED!&#39; Yeah.=
... but b<b>y now having both the name of the reference and the name of the =
struct, you can disambiguate</b> between the two aforementioned addresses. =
And again, the fact that the reference takes up space in the struct is an i=
mplementation detail.<br><br></div><div>All of which completely disqualify =
unions from containing references. Besides, unions are meant for efficientl=
y holding one of several possible <i>values</i>, not as aliases to other ob=
jects. (A pointer is a value.)<br></div><div><br>Anyway, your struct with a=
 pointer member that you set, in a union with a reference that you read, is=
 (A) <b>ill-formed</b> code due to having a reference in a union, and (B) t=
errible, awful <b>undefined behaviour</b> due to type-punning between (inco=
mpatible) union members. The fact that g++ compiles this and does what you =
expect only means that you haven&#39;t <b>yet</b> felt the full force of th=
e UB you&#39;re invoking. Give it time.<br><br>Or just use <b>std::referenc=
e_wrapper,</b> since I have no idea what you&#39;re trying to do here, that=
 hasn&#39;t already been done - properly - already by the Committee. Why do=
 you need them to throw out several fundamental, well-reasoned, and extreme=
ly important core precepts of the language - just to de-UBify such code - m=
erely to enable you to reinvent a wheel which they already made? Do you hav=
e any other, actual use-case? I doubt it.<br><br></div><br></div>
</blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/4576ad7b-1073-40dc-a8a0-caebc9e9df71%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/4576ad7b-1073-40dc-a8a0-caebc9e9df71=
%40isocpp.org</a>.<br />

------=_Part_5670_1337984552.1470085821111--

------=_Part_5669_715351333.1470085821101--

.


Author: Antonio Perez <antonio@perezexcelsior.com>
Date: Mon, 1 Aug 2016 14:11:19 -0700 (PDT)
Raw View
------=_Part_1456_1188662845.1470085880037
Content-Type: multipart/alternative;
 boundary="----=_Part_1457_394396067.1470085880040"

------=_Part_1457_394396067.1470085880040
Content-Type: text/plain; charset=UTF-8

Sorry. The code didn't post correctly.
#define MakeGenericOperator(name, operation) \
template<typename Out, typename In1, typename In2> struct name : Evaluatable
<Out> {\
    template<typename In1_t, typename In2_t> struct ReferenceCase :
Evaluatable<Out> {\
        In1_t* input1;\
        In2_t* input2;\
        operator Out() const { return (*input1) operation (*input2); }\
        ReferenceCase(In1_t* in1, In2_t* in2) : input1(in1), input2(in2) {}\
    };\
    template<typename In2_type> struct ConstCase1 : Evaluatable<Out> {\
        In1 input1;\
        In2_type* input2;\
        operator Out() const { return input1 operation (*input2); }\
        ConstCase1(In1 in1, In2_type* in2) : input1(in1), input2(in2) {}\
    };\
    template<typename In1_type> struct ConstCase2 : Evaluatable<Out> {\
        In1_type* input1;\
        In2 input2;\
        operator Out() const { return (*input1) operation input2; }\
        ConstCase2(In1_type* in1, In2 in2) : input1(in1), input2(in2) {}\
    };\
    Evaluatable<In1>* input1;\
    Evaluatable<In2>* input2;\
    operator Out() const { return (*input1) operation (*input2); }\
    name(Evaluatable<In1>* in1, Evaluatable<In2>* in2) : input1(in1), input2
(in2) {}\
    Evaluatable<Out>* optimize(MemoryManager& m)\
    {\
        Evaluatable<In1>* input1 = this->input1->optimize(m);\
        Evaluatable<In2>* input2 = this->input2->optimize(m);\
        if(auto const1 = dynamic_cast<GenericConstant<In1>*>(input1))\
        {\
            if(auto const2 = dynamic_cast<GenericConstant<In2>*>(input2))\
                return m.New<GenericConstant<Out>>((*input1) operation (*
input2));\
            else if(auto ref2 = dynamic_cast<GenericReference<In2>*>(input2
))\
                return m.New<ConstCase1<In2>>(const1->value, ref2->value);\
            else\
                return m.New<ConstCase1<Evaluatable<In2>>>(const1->value,
input2); \
        }\
        else if(auto ref1 = dynamic_cast<GenericReference<In1>*>(input1)){\
            if(auto const2 = dynamic_cast<GenericConstant<In2>*>(input2))\
                return m.New<ConstCase2<In1>>(ref1->value, const2->value);\
            else if(auto ref2 = dynamic_cast<GenericReference<In2>*>(input2
))\
                return m.New<ReferenceCase<In1, In2>>(ref1->value, ref2->
value);\
            else\
                return m.New<ReferenceCase<In1, Evaluatable<In2>>>(ref1->
value, input2); \
        }\
        else if(auto const2 = dynamic_cast<GenericConstant<In2>*>(input2))\
            return m.New<ConstCase2<Evaluatable<In1>>>(input1, const2->value
);\
        else if(auto ref2 = dynamic_cast<GenericReference<In2>*>(input2))\
            return m.New<ReferenceCase<Evaluatable<In1>, In2>>(input1, ref2
->value);\
        this->input1 = input1;\
        this->input2 = input2;\
        return this;\
    }\
};



On Monday, August 1, 2016 at 2:59:07 PM UTC-6, D. B. wrote:
>
> I can't believe I've typed so much today against a proposal that basically
> says 'Legitimise UB so that I don't have to type a * to dereference, unless
> I can be bothered.' Just wow.
>

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/6be2a521-1b3b-46a0-ba28-93aa45a750fb%40isocpp.org.

------=_Part_1457_394396067.1470085880040
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Sorry. The code didn&#39;t post correctly.<br><div class=
=3D"prettyprint" style=3D"background-color: rgb(250, 250, 250); border-colo=
r: rgb(187, 187, 187); border-style: solid; border-width: 1px; word-wrap: b=
reak-word;"><code class=3D"prettyprint"><div class=3D"subprettyprint"><span=
 style=3D"color: #800;" class=3D"styled-by-prettify">#define</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"co=
lor: #606;" class=3D"styled-by-prettify">MakeGenericOperator</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify">name</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify"> operation</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">)</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><=
br></span><span style=3D"color: #008;" class=3D"styled-by-prettify">templat=
e</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</spa=
n><span style=3D"color: #008;" class=3D"styled-by-prettify">typename</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span sty=
le=3D"color: #606;" class=3D"styled-by-prettify">Out</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">typename</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #606;" class=3D"style=
d-by-prettify">In1</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
</span><span style=3D"color: #008;" class=3D"styled-by-prettify">typename</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><spa=
n style=3D"color: #606;" class=3D"styled-by-prettify">In2</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&gt;</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008=
;" class=3D"styled-by-prettify">struct</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> name </span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">:</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"> </span><span style=3D"color: #606;" class=3D"styled-by-pret=
tify">Evaluatable</span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">&lt;</span><span style=3D"color: #606;" class=3D"styled-by-prettify"=
>Out</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&gt;</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">{\</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><sp=
an style=3D"color: #008;" class=3D"styled-by-prettify">template</span><span=
 style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">typename</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #606;" class=3D"styled-by-prettify">In1_t</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"style=
d-by-prettify">typename</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> </span><span style=3D"color: #606;" class=3D"styled-by-pretti=
fy">In2_t</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&=
gt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
><span style=3D"color: #008;" class=3D"styled-by-prettify">struct</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #606;" class=3D"styled-by-prettify">ReferenceCase</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">:</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify"> </span><span style=3D"color: #606;" class=
=3D"styled-by-prettify">Evaluatable</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D"s=
tyled-by-prettify">Out</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">&gt;</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">{\<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #606;" class=3D"styled-by=
-prettify">In1_t</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">*</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> in=
put1</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;\</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #606;" class=3D"styled-by-pr=
ettify">In2_t</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">*</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> input=
2</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;\</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0=
 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-prett=
ify">operator</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> </span><span style=3D"color: #606;" class=3D"styled-by-prettify">Out</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">()</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">const</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">{</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"style=
d-by-prettify">return</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">(*</span><span style=3D"color: #000;" class=3D"styled-by-prettify">input1=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">)</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"> operation </span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">(*</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify">input2</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">);</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">}\</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=
=3D"color: #606;" class=3D"styled-by-prettify">ReferenceCase</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"co=
lor: #606;" class=3D"styled-by-prettify">In1_t</span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">*</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> in1</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"> </span><span style=3D"color: #606;" class=3D"styled-by-prettif=
y">In2_t</span><span style=3D"color: #660;" class=3D"styled-by-prettify">*<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"> in2</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">)</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">:</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> input1</span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">(</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify">in1</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">),</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> input2</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>(</span><span style=3D"color: #000;" class=3D"styled-by-prettify">in2</spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">)</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">{}\</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">};\</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D=
"color: #008;" class=3D"styled-by-prettify">template</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: =
#008;" class=3D"styled-by-prettify">typename</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> </span><span style=3D"color: #606;" clas=
s=3D"styled-by-prettify">In2_type</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">&gt;</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-p=
rettify">struct</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"> </span><span style=3D"color: #606;" class=3D"styled-by-prettify">Cons=
tCase1</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">:</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D=
"color: #606;" class=3D"styled-by-prettify">Evaluatable</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"co=
lor: #606;" class=3D"styled-by-prettify">Out</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">&gt;</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">{\</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #60=
6;" class=3D"styled-by-prettify">In1</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify"> input1</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">;\</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color=
: #606;" class=3D"styled-by-prettify">In2_type</span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">*</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> input2</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">;\</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color=
: #008;" class=3D"styled-by-prettify">operator</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #606;" cl=
ass=3D"styled-by-prettify">Out</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">()</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettif=
y">const</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> <=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">{</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">return</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> input1 operation </span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">(*</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify">input2</span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">);</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">}\</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color=
: #606;" class=3D"styled-by-prettify">ConstCase1</span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #606;" =
class=3D"styled-by-prettify">In1</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> in1</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> </span><span style=3D"color: #606;" class=3D"styled-by-prettify">=
In2_type</span><span style=3D"color: #660;" class=3D"styled-by-prettify">*<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"> in2</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">)</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">:</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> input1</span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">(</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify">in1</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">),</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> input2</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>(</span><span style=3D"color: #000;" class=3D"styled-by-prettify">in2</spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">)</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">{}\</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">};\</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D=
"color: #008;" class=3D"styled-by-prettify">template</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: =
#008;" class=3D"styled-by-prettify">typename</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> </span><span style=3D"color: #606;" clas=
s=3D"styled-by-prettify">In1_type</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">&gt;</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-p=
rettify">struct</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"> </span><span style=3D"color: #606;" class=3D"styled-by-prettify">Cons=
tCase2</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">:</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D=
"color: #606;" class=3D"styled-by-prettify">Evaluatable</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"co=
lor: #606;" class=3D"styled-by-prettify">Out</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">&gt;</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">{\</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #60=
6;" class=3D"styled-by-prettify">In1_type</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">*</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> input1</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">;\</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #=
606;" class=3D"styled-by-prettify">In2</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> input2</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">;\</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"colo=
r: #008;" class=3D"styled-by-prettify">operator</span><span style=3D"color:=
 #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #606;" c=
lass=3D"styled-by-prettify">Out</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">()</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">const</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">{</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">return</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">(*</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify">input1</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">)</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"> operation input2</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">;</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">}\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><b=
r>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #606;" class=3D"=
styled-by-prettify">ConstCase2</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">(</span><span style=3D"color: #606;" class=3D"styled-by=
-prettify">In1_type</span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">*</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
 in1</span><span style=3D"color: #660;" class=3D"styled-by-prettify">,</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span s=
tyle=3D"color: #606;" class=3D"styled-by-prettify">In2</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify"> in2</span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">)</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">:</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> input1</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">(</span><span style=3D"color: #000;" class=3D"styled-by-prettify">i=
n1</span><span style=3D"color: #660;" class=3D"styled-by-prettify">),</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> input2</span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify">in2</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">)</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">{}\</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">};\</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"color: #606;" cla=
ss=3D"styled-by-prettify">Evaluatable</span><span style=3D"color: #660;" cl=
ass=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D=
"styled-by-prettify">In1</span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">&gt;*</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> input1</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">;\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><b=
r>=C2=A0 =C2=A0 </span><span style=3D"color: #606;" class=3D"styled-by-pret=
tify">Evaluatable</span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">&lt;</span><span style=3D"color: #606;" class=3D"styled-by-prettify"=
>In2</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&gt;*<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"> input2</sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">;\</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </sp=
an><span style=3D"color: #008;" class=3D"styled-by-prettify">operator</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span st=
yle=3D"color: #606;" class=3D"styled-by-prettify">Out</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">()</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" cla=
ss=3D"styled-by-prettify">const</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">{</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">return=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">(*</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify">input1</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">)</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> operation </span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">(*</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify">input2</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">);</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">}\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><=
br>=C2=A0 =C2=A0 name</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">(</span><span style=3D"color: #606;" class=3D"styled-by-prettify=
">Evaluatable</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">&lt;</span><span style=3D"color: #606;" class=3D"styled-by-prettify">In1=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&gt;*</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> in1</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #606;" class=3D"styled-by-prettify">Evaluatable</span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #60=
6;" class=3D"styled-by-prettify">In2</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">&gt;*</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"> in2</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">)</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">:</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> input1</spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify">in1</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">),</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify"> input2</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">(</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">in2</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">)</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">{=
}\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=
=A0 =C2=A0 </span><span style=3D"color: #606;" class=3D"styled-by-prettify"=
>Evaluatable</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">&lt;</span><span style=3D"color: #606;" class=3D"styled-by-prettify">Out<=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">&gt;*</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> optimize</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span sty=
le=3D"color: #606;" class=3D"styled-by-prettify">MemoryManager</span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">&amp;</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> m</span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">)\</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">{\</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span=
 style=3D"color: #606;" class=3D"styled-by-prettify">Evaluatable</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span styl=
e=3D"color: #606;" class=3D"styled-by-prettify">In1</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">&gt;*</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify"> input1 </span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">=3D</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"st=
yled-by-prettify">this</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">-&gt;</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify">input1</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">-&gt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify">op=
timize</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify">m</span><span=
 style=3D"color: #660;" class=3D"styled-by-prettify">);\</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 </span><span style=3D"color: #606;" class=3D"styled-by-prettify">Evalua=
table</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;<=
/span><span style=3D"color: #606;" class=3D"styled-by-prettify">In2</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">&gt;*</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> input2 </span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #0=
08;" class=3D"styled-by-prettify">this</span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">-&gt;</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">input2</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">-&gt;</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify">optimize</span><span style=3D"color: #660;" class=3D"styled-=
by-prettify">(</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy">m</span><span style=3D"color: #660;" class=3D"styled-by-prettify">);\</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by=
-prettify">if</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">(</span><span style=3D"color: #008;" class=3D"styled-by-prettify">auto</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> const1 </sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">dynamic_cast</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"=
color: #606;" class=3D"styled-by-prettify">GenericConstant</span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"c=
olor: #606;" class=3D"styled-by-prettify">In1</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">&gt;*&gt;(</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify">input1</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">))\</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">{\</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-prettify"=
>if</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span=
><span style=3D"color: #008;" class=3D"styled-by-prettify">auto</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> const2 </span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #=
008;" class=3D"styled-by-prettify">dynamic_cast</span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;=
" class=3D"styled-by-prettify">GenericConstant</span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;"=
 class=3D"styled-by-prettify">In2</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">&gt;*&gt;(</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">input2</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">))\</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </=
span><span style=3D"color: #008;" class=3D"styled-by-prettify">return</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> m</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">.</span><span style=3D"c=
olor: #606;" class=3D"styled-by-prettify">New</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" =
class=3D"styled-by-prettify">GenericConstant</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" c=
lass=3D"styled-by-prettify">Out</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">&gt;&gt;((*</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">input1</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">)</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> operation </span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">(*</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy">input2</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
));\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008=
;" class=3D"styled-by-prettify">else</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"sty=
led-by-prettify">if</span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">(</span><span style=3D"color: #008;" class=3D"styled-by-prettify">=
auto</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> ref2 =
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span sty=
le=3D"color: #008;" class=3D"styled-by-prettify">dynamic_cast</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=
=3D"color: #606;" class=3D"styled-by-prettify">GenericReference</span><span=
 style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=
=3D"color: #606;" class=3D"styled-by-prettify">In2</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">&gt;*&gt;(</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify">input2</span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">))\</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">return</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
 m</span><span style=3D"color: #660;" class=3D"styled-by-prettify">.</span>=
<span style=3D"color: #606;" class=3D"styled-by-prettify">New</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=
=3D"color: #606;" class=3D"styled-by-prettify">ConstCase1</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"co=
lor: #606;" class=3D"styled-by-prettify">In2</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">&gt;&gt;(</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify">const1</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">-&gt;</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">value</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> ref2</span><span style=3D"color: #660;" class=3D"styled-by-prett=
ify">-&gt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
value</span><span style=3D"color: #660;" class=3D"styled-by-prettify">);\</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" clas=
s=3D"styled-by-prettify">else</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">\</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </spa=
n><span style=3D"color: #008;" class=3D"styled-by-prettify">return</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"> m</span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">.</span><span style=3D"colo=
r: #606;" class=3D"styled-by-prettify">New</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" cla=
ss=3D"styled-by-prettify">ConstCase1</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D"=
styled-by-prettify">Evaluatable</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D"style=
d-by-prettify">In2</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">&gt;&gt;&gt;(</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify">const1</span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">-&gt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
">value</span><span style=3D"color: #660;" class=3D"styled-by-prettify">,</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> input2</spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">);</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">\</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">}\</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-prettify">els=
e</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><=
span style=3D"color: #008;" class=3D"styled-by-prettify">if</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"col=
or: #008;" class=3D"styled-by-prettify">auto</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> ref1 </span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">=3D</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"style=
d-by-prettify">dynamic_cast</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D"styled-by=
-prettify">GenericReference</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D"styled-by=
-prettify">In1</span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">&gt;*&gt;(</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy">input1</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
)){\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008=
;" class=3D"styled-by-prettify">if</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">(</span><span style=3D"color: #008;" class=3D"style=
d-by-prettify">auto</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> const2 </span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">=3D</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
 </span><span style=3D"color: #008;" class=3D"styled-by-prettify">dynamic_c=
ast</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</s=
pan><span style=3D"color: #606;" class=3D"styled-by-prettify">GenericConsta=
nt</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</sp=
an><span style=3D"color: #606;" class=3D"styled-by-prettify">In2</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">&gt;*&gt;(</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify">input2</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">))\</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"st=
yled-by-prettify">return</span><span style=3D"color: #000;" class=3D"styled=
-by-prettify"> m</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">.</span><span style=3D"color: #606;" class=3D"styled-by-prettify">New=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span=
><span style=3D"color: #606;" class=3D"styled-by-prettify">ConstCase2</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span=
 style=3D"color: #606;" class=3D"styled-by-prettify">In1</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&gt;&gt;(</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify">ref1</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">-&gt;</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify">value</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> const2</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">-&gt;</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify">value</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">);\</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"col=
or: #008;" class=3D"styled-by-prettify">else</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" clas=
s=3D"styled-by-prettify">if</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">(</span><span style=3D"color: #008;" class=3D"styled-by-pr=
ettify">auto</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"> ref2 </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
=3D</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
><span style=3D"color: #008;" class=3D"styled-by-prettify">dynamic_cast</sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><sp=
an style=3D"color: #606;" class=3D"styled-by-prettify">GenericReference</sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><sp=
an style=3D"color: #606;" class=3D"styled-by-prettify">In2</span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">&gt;*&gt;(</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify">input2</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">))\</span><span style=3D"color:=
 #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-b=
y-prettify">return</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> m</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
..</span><span style=3D"color: #606;" class=3D"styled-by-prettify">New</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span=
 style=3D"color: #606;" class=3D"styled-by-prettify">ReferenceCase</span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span st=
yle=3D"color: #606;" class=3D"styled-by-prettify">In1</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> </span><span style=3D"color: #606;" clas=
s=3D"styled-by-prettify">In2</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">&gt;&gt;(</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify">ref1</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">-&gt;</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify">value</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> ref2</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">-&gt;</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify">value</span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">);\</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-pr=
ettify">else</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"=
color: #008;" class=3D"styled-by-prettify">return</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"> m</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">.</span><span style=3D"color: #606;" class=
=3D"styled-by-prettify">New</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D"styled-by=
-prettify">ReferenceCase</span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D"styled-by-pr=
ettify">In1</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span>=
<span style=3D"color: #606;" class=3D"styled-by-prettify">Evaluatable</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span=
 style=3D"color: #606;" class=3D"styled-by-prettify">In2</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&gt;&gt;&gt;(</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify">ref1</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">-&gt;</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify">value</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> input2</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">);</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><b=
r>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">}\</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #0=
08;" class=3D"styled-by-prettify">else</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"s=
tyled-by-prettify">if</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">(</span><span style=3D"color: #008;" class=3D"styled-by-prettify=
">auto</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> con=
st2 </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span=
 style=3D"color: #008;" class=3D"styled-by-prettify">dynamic_cast</span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span sty=
le=3D"color: #606;" class=3D"styled-by-prettify">GenericConstant</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span styl=
e=3D"color: #606;" class=3D"styled-by-prettify">In2</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">&gt;*&gt;(</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify">input2</span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">))\</span><span style=3D"color: #000;"=
 class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 </span><span style=3D"color: #008;" class=3D"styled-by-prettify">return</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"> m</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">.</span><span style=
=3D"color: #606;" class=3D"styled-by-prettify">New</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #6=
06;" class=3D"styled-by-prettify">ConstCase2</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" c=
lass=3D"styled-by-prettify">Evaluatable</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" class=
=3D"styled-by-prettify">In1</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">&gt;&gt;&gt;(</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify">input1</span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"> const2</span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">-&gt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify">v=
alue</span><span style=3D"color: #660;" class=3D"styled-by-prettify">);\</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by=
-prettify">else</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">if</=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><spa=
n style=3D"color: #008;" class=3D"styled-by-prettify">auto</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"> ref2 </span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"color:=
 #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" c=
lass=3D"styled-by-prettify">dynamic_cast</span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" class=
=3D"styled-by-prettify">GenericReference</span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" class=
=3D"styled-by-prettify">In2</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">&gt;*&gt;(</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify">input2</span><span style=3D"color: #660;" class=3D"styled-=
by-prettify">))\</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"c=
olor: #008;" class=3D"styled-by-prettify">return</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> m</span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">.</span><span style=3D"color: #606;" class=3D=
"styled-by-prettify">New</span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D"styled-by-pr=
ettify">ReferenceCase</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">&lt;</span><span style=3D"color: #606;" class=3D"styled-by-prett=
ify">Evaluatable</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">&lt;</span><span style=3D"color: #606;" class=3D"styled-by-prettify">=
In1</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&gt;,</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><spa=
n style=3D"color: #606;" class=3D"styled-by-prettify">In2</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&gt;&gt;(</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify">input1</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> ref2</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">-&gt;</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">value</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">);\</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #0=
08;" class=3D"styled-by-prettify">this</span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">-&gt;</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">input1 </span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">=3D</span><span style=3D"color: #000;" class=3D"styled=
-by-prettify"> input1</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">;\</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" clas=
s=3D"styled-by-prettify">this</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">-&gt;</span><span style=3D"color: #000;" class=3D"styled=
-by-prettify">input2 </span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">=3D</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> input2</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>;\</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"style=
d-by-prettify">return</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify=
">this</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;\</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =
=C2=A0 </span><span style=3D"color: #660;" class=3D"styled-by-prettify">}\<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">};</span></div></=
code></div><br><br><br>On Monday, August 1, 2016 at 2:59:07 PM UTC-6, D. B.=
 wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.=
8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">I can&=
#39;t believe I&#39;ve typed so much today against a proposal that basicall=
y says &#39;Legitimise UB so that I don&#39;t have to type a * to dereferen=
ce, unless I can be bothered.&#39; Just wow.<br></div>
</blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/6be2a521-1b3b-46a0-ba28-93aa45a750fb%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/6be2a521-1b3b-46a0-ba28-93aa45a750fb=
%40isocpp.org</a>.<br />

------=_Part_1457_394396067.1470085880040--

------=_Part_1456_1188662845.1470085880037--

.


Author: "D. B." <db0451@gmail.com>
Date: Mon, 1 Aug 2016 22:16:07 +0100
Raw View
--001a114cc2a0d302300539091b14
Content-Type: text/plain; charset=UTF-8

So the supposed justification is... to enable abusing the template system
by wrapping it in the very same macros that it largely exists to replace?
....ohhhhkay.

Rather than the wall of text, please explain in simple, legible terms: Why
can't you just store a pointer and dereference it when you need an lvalue?

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhFT9q2MdQyNS3h6FXN-d6TjZpsGhiLoQq8idiheccv%2BZw%40mail.gmail.com.

--001a114cc2a0d302300539091b14
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div>So the supposed justification is... to enable ab=
using the template system by wrapping it in the very same macros that it la=
rgely exists to replace? ...ohhhhkay.<br><br></div>Rather than the wall of =
text, please explain in simple, legible terms: Why can&#39;t you just store=
 a pointer and dereference it when you need an lvalue?<br><br></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CACGiwhFT9q2MdQyNS3h6FXN-d6TjZpsGhiLo=
Qq8idiheccv%2BZw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhFT9q2MdQ=
yNS3h6FXN-d6TjZpsGhiLoQq8idiheccv%2BZw%40mail.gmail.com</a>.<br />

--001a114cc2a0d302300539091b14--

.


Author: Nicol Bolas <jmckesson@gmail.com>
Date: Mon, 1 Aug 2016 14:35:53 -0700 (PDT)
Raw View
------=_Part_1232_580563411.1470087353188
Content-Type: multipart/alternative;
 boundary="----=_Part_1233_161085863.1470087353188"

------=_Part_1233_161085863.1470087353188
Content-Type: text/plain; charset=UTF-8

On Monday, August 1, 2016 at 5:10:21 PM UTC-4, Antonio Perez wrote:
>
> The proposed change would NOT take the address of a reference. It would
> provide a method to alias the value referenced by a pointer within classes
> and structs. Provided is two sets of code written before I realized this
> was undefined behavior, one of which makes use of this UB to eliminate a
> significant chunk of code.
>

Maybe I don't understand the meaning of this code correctly, but I fail to
find this legitimate justification for the feature. It seems to me that you
can rewrite this code so that it just uses pointers. The `dynamic_cast`s
would get a little oddball (though C++17's initializers in if statements
will fix that), but that's pretty much it.

Can you come up with a use for this feature that doesn't boil down to "I
don't want to use pointers, except for when I do?" Or, as D. B. pointed
out, something you couldn't do with a `reference_wrapper`?

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/6e3fba26-34c5-446a-94c8-537aa9ec5aa7%40isocpp.org.

------=_Part_1233_161085863.1470087353188
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Monday, August 1, 2016 at 5:10:21 PM UTC-4, Antonio Per=
ez wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: =
0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">The =
proposed change would NOT take the address of a reference. It would provide=
 a method to alias the value referenced by a pointer within classes and str=
ucts. Provided is two sets of code written before I realized this was undef=
ined behavior, one of which makes use of this UB to eliminate a significant=
 chunk of code.<br></div></blockquote><div><br>Maybe I don&#39;t understand=
 the meaning of this code correctly, but I fail to find this legitimate jus=
tification for the feature. It seems to me that you can rewrite this code s=
o that it just uses pointers. The `dynamic_cast`s would get a little oddbal=
l (though C++17&#39;s initializers in if statements will fix that), but tha=
t&#39;s pretty much it.<br><br>Can you come up with a use for this feature =
that doesn&#39;t boil down to &quot;I don&#39;t want to use pointers, excep=
t for when I do?&quot; Or, as D. B. pointed out, something you couldn&#39;t=
 do with a `reference_wrapper`?<br></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/6e3fba26-34c5-446a-94c8-537aa9ec5aa7%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/6e3fba26-34c5-446a-94c8-537aa9ec5aa7=
%40isocpp.org</a>.<br />

------=_Part_1233_161085863.1470087353188--

------=_Part_1232_580563411.1470087353188--

.


Author: Richard Smith <richard@metafoo.co.uk>
Date: Sun, 9 Oct 2016 11:18:33 -0700
Raw View
--001a11444802e146af053e72ab7b
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 9 Oct 2016 10:12 am, <szollosi.lorand@gmail.com> wrote:

Hi,

Loosely related. Is it UB to placement new into non-polymorphic base class
this ptr? I.e., new((Base*)this) Base(...); . Technically this works and I
fail to see why a given implementation would do anything to prevent it,


It doesn't work. For instance, the implementation can put derived class
members in the tail padding of the base class, and this can trample those
members. If the class has a vptr, this will put the wrong value in it. And
so on. You can do this in most cases for complete objects and class members
(and also array elements, but I'm not sure we explicitly say that's OK in
the standard), but not for base class subobjects.

but still.. Because, if we allow for this, we have reassignable reference
*member* variables with sort of proper syntax.

Thanks,
-lorro


2016. augusztus 1., h=C3=A9tf=C5=91 22:38:57 UTC+2 id=C5=91pontban Antonio =
Perez a
k=C3=B6vetkez=C5=91t =C3=ADrta:
>
> Specify that
>
>    1. Unions may store references
>    2. A reference stored inside a union must be implemented as a pointer
>    3. If a union contains a pointer T* and a reference T&, then setting
>    the location of the pointer, and then reading from the reference, is
>    DEFINED BEHAVIOR which will read the value stored at the pointer
>
> template<typename T> union PtrOrRef
> {
> T* ptr;
> T& ref;
> };
> #include <iostream>
> int main(){
> int x =3D 0;
> PtrOrRef<int> p{x};//Sets p.ref=3Dx
> int y =3D 5;
> p.ptr =3D &y;
> std::cout << p.ref << std::endl; //Defined as being equivalent to
> std::cout << (*p.ptr) << std::endl;
> }
>
> Example implementation: g++ compiler
>
> --
You received this message because you are subscribed to the Google Groups
"ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/
isocpp.org/d/msgid/std-proposals/7fad3a1d-fd6b-477c-
84fd-fed45de6d2ca%40isocpp.org
<https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7fad3a1d-fd6b=
-477c-84fd-fed45de6d2ca%40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter=
>
..

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CAOfiQqk2mayQmrF3TKwWXw7xMkm-_85%2BkpizcYTp4vkbS=
yajvQ%40mail.gmail.com.

--001a11444802e146af053e72ab7b
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div><div class=3D"gmail_extra"><div class=3D"gmail_quote=
">On 9 Oct 2016 10:12 am,  &lt;<a href=3D"mailto:szollosi.lorand@gmail.com"=
>szollosi.lorand@gmail.com</a>&gt; wrote:<br type=3D"attribution"><blockquo=
te class=3D"quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pa=
dding-left:1ex"><div dir=3D"ltr">Hi,<br><br>Loosely related. Is it UB to pl=
acement new into non-polymorphic base class this ptr? I.e., new((Base*)this=
) Base(...); . Technically this works and I fail to see why a given impleme=
ntation would do anything to prevent it,</div></blockquote></div></div></di=
v><div><br></div><div>It doesn&#39;t work. For instance, the implementation=
 can put derived class members in the tail padding of the base class, and t=
his can trample those members. If the class has a vptr, this will put the w=
rong value in it. And so on. You can do this in most cases for complete obj=
ects and class members (and also array elements, but I&#39;m not sure we ex=
plicitly say that&#39;s OK in the standard), but not for base class subobje=
cts.</div><div><br></div><div><div class=3D"gmail_extra"><div class=3D"gmai=
l_quote"><blockquote class=3D"quote" style=3D"margin:0 0 0 .8ex;border-left=
:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">but still.. Because, if =
we allow for this, we have reassignable reference <i>member</i> variables w=
ith sort of proper syntax.<br><br>Thanks,<br>-lorro<div class=3D"elided-tex=
t"><br><br>2016. augusztus 1., h=C3=A9tf=C5=91 22:38:57 UTC+2 id=C5=91pontb=
an Antonio Perez a k=C3=B6vetkez=C5=91t =C3=ADrta:<blockquote class=3D"gmai=
l_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;pad=
ding-left:1ex"><div dir=3D"ltr">Specify that<br><ol><li>Unions may store re=
ferences</li><li>A reference stored inside a union must be implemented as a=
 pointer</li><li>If a union contains a pointer T* and a reference T&amp;, t=
hen setting the location of the pointer, and then reading from the referenc=
e, is DEFINED BEHAVIOR which will read the value stored at the pointer<br><=
/li></ol><div style=3D"background-color:rgb(250,250,250);border-color:rgb(1=
87,187,187);border-style:solid;border-width:1px;word-wrap:break-word"><code=
><div><span style=3D"color:#008">template</span><span style=3D"color:#660">=
&lt;</span><span style=3D"color:#008">typename</span><span style=3D"color:#=
000"> T</span><span style=3D"color:#660">&gt;</span><span style=3D"color:#0=
00"> </span><span style=3D"color:#008">union</span><span style=3D"color:#00=
0"> </span><span style=3D"color:#606">PtrOrRef</span><span style=3D"color:#=
000"> <br></span><span style=3D"color:#660">{</span><span style=3D"color:#0=
00"><br></span><div style=3D"margin-left:40px"><span style=3D"color:#000">T=
</span><span style=3D"color:#660">*</span><span style=3D"color:#000"> ptr</=
span><span style=3D"color:#660">;</span><span style=3D"color:#000"><br>T</s=
pan><span style=3D"color:#660">&amp;</span><span style=3D"color:#000"> </sp=
an><span style=3D"color:#008">ref</span><span style=3D"color:#660">;</span>=
<span style=3D"color:#000"><br></span></div><span style=3D"color:#660">};</=
span><span style=3D"color:#000"><br></span><span style=3D"color:#800">#incl=
ude</span><span style=3D"color:#000"> </span><span style=3D"color:#080">&lt=
;iostream&gt;</span><span style=3D"color:#000"><br></span><span style=3D"co=
lor:#008">int</span><span style=3D"color:#000"> main</span><span style=3D"c=
olor:#660">(){</span><span style=3D"color:#000"><br></span><div style=3D"ma=
rgin-left:40px"><span style=3D"color:#008">int</span><span style=3D"color:#=
000"> x </span><span style=3D"color:#660">=3D</span><span style=3D"color:#0=
00"> </span><span style=3D"color:#066">0</span><span style=3D"color:#660">;=
</span><span style=3D"color:#000"><br></span></div><div style=3D"margin-lef=
t:40px"><span style=3D"color:#606">PtrOrRef</span><span style=3D"color:#080=
">&lt;int&gt;</span><span style=3D"color:#000"> p</span><span style=3D"colo=
r:#660">{</span><span style=3D"color:#000">x</span><span style=3D"color:#66=
0">};</span><span style=3D"color:#800">//Sets p.ref=3Dx</span><span style=
=3D"color:#000"><br></span><span style=3D"color:#008">int</span><span style=
=3D"color:#000"> y </span><span style=3D"color:#660">=3D</span><span style=
=3D"color:#000"> </span><span style=3D"color:#066">5</span><span style=3D"c=
olor:#660">;</span><span style=3D"color:#000"><br>p</span><span style=3D"co=
lor:#660">.</span><span style=3D"color:#000">ptr </span><span style=3D"colo=
r:#660">=3D</span><span style=3D"color:#000"> </span><span style=3D"color:#=
660">&amp;</span><span style=3D"color:#000">y</span><span style=3D"color:#6=
60">;</span><span style=3D"color:#000"><br>std</span><span style=3D"color:#=
660">::</span><span style=3D"color:#000">cout </span><span style=3D"color:#=
660">&lt;&lt;</span><span style=3D"color:#000"> p</span><span style=3D"colo=
r:#660">.</span><span style=3D"color:#008">ref</span><span style=3D"color:#=
000"> </span><span style=3D"color:#660">&lt;&lt;</span><span style=3D"color=
:#000"> std</span><span style=3D"color:#660">::</span><span style=3D"color:=
#000">endl</span><span style=3D"color:#660">;</span><span style=3D"color:#0=
00"> </span><span style=3D"color:#800">//Defined as being equivalent to std=
::cout &lt;&lt; (*p.ptr) &lt;&lt; std::endl;</span><span style=3D"color:#00=
0"><br></span></div><span style=3D"color:#660">}</span><span style=3D"color=
:#000"><br></span></div></code></div><br>Example implementation: g++ compil=
er<br><br></div></blockquote></div></div><div class=3D"elided-text">

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br></div>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/7fad3a1d-fd6b-477c-84fd-fed45de6d2ca%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/7fad=
3a1d-fd6b-477c-<wbr>84fd-fed45de6d2ca%40isocpp.org</a><wbr>.<br>
</blockquote></div><br></div></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAOfiQqk2mayQmrF3TKwWXw7xMkm-_85%2Bkp=
izcYTp4vkbSyajvQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOfiQqk2mayQmr=
F3TKwWXw7xMkm-_85%2BkpizcYTp4vkbSyajvQ%40mail.gmail.com</a>.<br />

--001a11444802e146af053e72ab7b--

.