Topic: Proposal: Class Frames to inject prefabricated
Author: Mikhail Semenov <mikhailsemenov1957@gmail.com>
Date: Tue, 1 Oct 2013 11:33:12 -0700 (PDT)
Raw View
------=_Part_28_29558813.1380652392376
Content-Type: text/plain; charset=ISO-8859-1
I propose to introduce class frames, which allow to inject features into
classes, which in most cases are not available through inheritance. In
addition, they
don't require virtual functions, which makes them more efficient.
*Part I*
The frame provides features that are required for a class to be
constructed; it and starts with a header:
*class FrameName(class T)
*or
*struct FrameName(class T)*
For example:
*class MoveInjection(class T)
{
public:
T(); // to be defined in the class
T(const T&);// to be defined in the class
virtual ~T();// to be defined in the class
void swap(T&);// to be defined in the class
*
* T(T&& b):T() // is provided for the class
{
swap(b);
}*
* T& operator=(const T& b) // is provided for the class
{
T c(b);
swap(c);
return *this;
}*
* T& operator=(T&& b) // is provided for the class
{
swap(b);
return *this;
}
};*
The MoveInjection frame allows to create a class with a move constructor
and assignment much easier: the programmer
has to provide the definitions for T(), T(const& T&), ~T() and swap:
*class A using MoveInjection
{
public:
A() {...}
A(const A& a) { ... }
virtual ~A() { ... }
void swap(T& a) { ... }
};*
The class frame may contain static objects:
*class AddInjection(class T)
{
static friend T operator+(class T& a, class T& b);
};*
*Part II*
If the parameter inside a frame is not used, it can be dropped. In this
case,
it is possible to write:
*class IntegralInjection()
{
public:
double integral(std::function<double(double)>, double a, double b);
};*
Such class frames can be used in a similar way:
*class B using IntegralInjection
{
public:
double integral(std::function<double(double)>, double a, double b)
{
...
}
...
};*
But it is also possible to use such class frames in templates:
*template Integrate<class A using IntegralInjection>
....*
which means that this template requires the class to contain an integral
function, which the given header.
*Additional features of class frames*
(1) It should be possible to use several frames to inject various features
into a class.
(2) A class frame itself can be defined in a template:
*template<class A>*
*class SpecialInjection(class B)*
*{*
*....*
*};*
**
--
---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
------=_Part_28_29558813.1380652392376
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>I propose to introduce class frames, which allow to i=
nject features into classes, which in most cases are not available through =
inheritance. In addition, they</div><div>don't require virtual functions, w=
hich makes them more efficient.</div><div> </div><div><strong><u>Part =
I</u></strong><font face=3D"trebuchet ms,sans-serif" style=3D"background-co=
lor: rgb(153, 0, 255);"><br></font></div><div>The frame provides features t=
hat are required for a class to be constructed; it and starts with a header=
:<br><strong>class FrameName(class T)<br></strong>or<br><strong>struct Fram=
eName(class T)</strong></div><p><br>For example:</p><p><strong>class MoveIn=
jection(class T)<br>{<br>public:<br> T(); &nbs=
p; // to be defined in the class<br> T(const T&);// t=
o be defined in the class<br> virtual ~T();// to be defined in the cl=
ass<br> void swap(T&);// to be defined in the class<br> </s=
trong></p><p><strong> T(T&& b):T() // is provided for the cla=
ss<br> {<br> swap(b);<br> }</strong></p=
><p><strong> T& operator=3D(const T& b) // is provided for th=
e class<br> {<br> T c(b);<br> &nbs=
p; swap(c);<br> return *this;<br> }</st=
rong></p><p><strong> T& operator=3D(T&& b) // is provided=
for the class<br> {<br> swap(b);<br> &n=
bsp; return *this;<br> }<br>};</strong></p><p><br>The Mov=
eInjection frame allows to create a class with a move constructor and assig=
nment much easier: the programmer<br>has to provide the definitions for T()=
, T(const& T&), ~T() and swap:</p><p><strong>class A using MoveInje=
ction<br>{<br>public:<br> A() {...}<br> A(const A&a=
mp; a) { ... }<br> virtual ~A() { ... }<br> void sw=
ap(T& a) { ... }<br>};</strong></p><p> </p><p>The class frame may =
contain static objects:</p><p><strong>class AddInjection(class T)<br>{<br>&=
nbsp; static friend T operator+(class T& a, class T& b);<br>}=
;</strong></p><p><br><strong><u>Part II</u></strong></p><p>If the parameter=
inside a frame is not used, it can be dropped. In this case,<br>it is poss=
ible to write:</p><p><strong>class IntegralInjection()<br>{<br>public:<br>&=
nbsp; double integral(std::function<double(double)>, doub=
le a, double b);<br>};</strong></p><p>Such class frames can be used in a si=
milar way:<br><strong>class B using IntegralInjection<br>{<br>public:<br>&n=
bsp; double integral(std::function<double(double)>, doubl=
e a, double b)<br> {<br> ..=
..<br> }<br> ...<br>};</strong></p><p>Bu=
t it is also possible to use such class frames in templates:</p><p><strong>=
template Integrate<class A using IntegralInjection><br>...</strong></=
p><div>which means that this template requires the class to contain an inte=
gral function, which the given header.</div><div> </div><div><strong><=
u>Additional features of class frames</u></strong></div><div> </div><d=
iv>(1) It should be possible to use several frames to inject vari=
ous features into a class. </div><div> </div><div>(2) A class frame it=
self can be defined in a template:</div><div><strong>template<class A>=
;</strong></div><div><strong>class SpecialInjection(class B)</strong></div>=
<div><strong>{</strong></div><div><strong>....</strong></div><div><strong>}=
;</strong></div><p><strong></strong> </p><p> </p><p> </p></d=
iv>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
------=_Part_28_29558813.1380652392376--
.
Author: "Billy O'Neal" <billy.oneal@gmail.com>
Date: Tue, 1 Oct 2013 13:53:12 -0700
Raw View
--089e0129478479a30e04e7b426d3
Content-Type: text/plain; charset=ISO-8859-1
How is this different than what you can already do with the existing:
template <typename T>
class MoveInjection
{
T& operator=(T&&) { /*...*/ }
}
class Client : public MoveInjection<Client>
{
}
Billy O'Neal
https://github.com/BillyONeal/ <https://bitbucket.org/BillyONeal/>
http://stackoverflow.com/users/82320/billy-oneal
Malware Response Instructor - BleepingComputer.com
On Tue, Oct 1, 2013 at 11:33 AM, Mikhail Semenov <
mikhailsemenov1957@gmail.com> wrote:
> I propose to introduce class frames, which allow to inject features into
> classes, which in most cases are not available through inheritance. In
> addition, they
> don't require virtual functions, which makes them more efficient.
>
> *Part I*
> The frame provides features that are required for a class to be
> constructed; it and starts with a header:
> *class FrameName(class T)
> *or
> *struct FrameName(class T)*
>
>
> For example:
>
> *class MoveInjection(class T)
> {
> public:
> T(); // to be defined in the class
> T(const T&);// to be defined in the class
> virtual ~T();// to be defined in the class
> void swap(T&);// to be defined in the class
> *
>
> * T(T&& b):T() // is provided for the class
> {
> swap(b);
> }*
>
> * T& operator=(const T& b) // is provided for the class
> {
> T c(b);
> swap(c);
> return *this;
> }*
>
> * T& operator=(T&& b) // is provided for the class
> {
> swap(b);
> return *this;
> }
> };*
>
>
> The MoveInjection frame allows to create a class with a move constructor
> and assignment much easier: the programmer
> has to provide the definitions for T(), T(const& T&), ~T() and swap:
>
> *class A using MoveInjection
> {
> public:
> A() {...}
> A(const A& a) { ... }
> virtual ~A() { ... }
> void swap(T& a) { ... }
> };*
>
>
>
> The class frame may contain static objects:
>
> *class AddInjection(class T)
> {
> static friend T operator+(class T& a, class T& b);
> };*
>
>
> *Part II*
>
> If the parameter inside a frame is not used, it can be dropped. In this
> case,
> it is possible to write:
>
> *class IntegralInjection()
> {
> public:
> double integral(std::function<double(double)>, double a, double b);
> };*
>
> Such class frames can be used in a similar way:
> *class B using IntegralInjection
> {
> public:
> double integral(std::function<double(double)>, double a, double b)
> {
> ...
> }
> ...
> };*
>
> But it is also possible to use such class frames in templates:
>
> *template Integrate<class A using IntegralInjection>
> ...*
> which means that this template requires the class to contain an integral
> function, which the given header.
>
> *Additional features of class frames*
>
> (1) It should be possible to use several frames to inject various features
> into a class.
>
> (2) A class frame itself can be defined in a template:
> *template<class A>*
> *class SpecialInjection(class B)*
> *{*
> *....*
> *};*
>
> **
>
>
>
>
>
> --
>
> ---
> 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.
> Visit this group at
> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>
--
---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
--089e0129478479a30e04e7b426d3
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>How is this different than what you can already do wi=
th the existing:</div><div>=A0</div><div>template <typename T></div><=
div>class MoveInjection</div><div>{</div><div>=A0=A0=A0 T&=A0operator=
=3D(T&&) { /*...*/ }</div>
<div>}</div><div>=A0</div><div>class Client : public MoveInjection<Clien=
t></div><div>{</div><div>=A0</div><div>}</div><div>=A0</div></div><div c=
lass=3D"gmail_extra"><br clear=3D"all"><div><div dir=3D"ltr"><div>Billy O&#=
39;Neal</div>
<div><a href=3D"https://bitbucket.org/BillyONeal/" target=3D"_blank">https:=
//github.com/BillyONeal/</a></div><div><a href=3D"http://stackoverflow.com/=
users/82320/billy-oneal" target=3D"_blank">http://stackoverflow.com/users/8=
2320/billy-oneal</a></div>
<div>Malware Response Instructor - BleepingComputer.com</div></div></div>
<br><br><div class=3D"gmail_quote">On Tue, Oct 1, 2013 at 11:33 AM, Mikhail=
Semenov <span dir=3D"ltr"><<a href=3D"mailto:mikhailsemenov1957@gmail.c=
om" target=3D"_blank">mikhailsemenov1957@gmail.com</a>></span> wrote:<br=
><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1=
px #ccc solid;padding-left:1ex">
<div dir=3D"ltr"><div>I propose to introduce class frames, which allow to i=
nject features into classes, which in most cases are not available through =
inheritance. In addition, they</div><div>don't require virtual function=
s, which makes them more efficient.</div>
<div>=A0</div><div><strong><u>Part I</u></strong><font face=3D"trebuchet ms=
,sans-serif" style=3D"background-color:rgb(153,0,255)"><br></font></div><di=
v>The frame provides features that are required for a class to be construct=
ed; it and starts with a header:<br>
<strong>class FrameName(class T)<br></strong>or<br><strong>struct FrameName=
(class T)</strong></div><p><br>For example:</p><p><strong>class MoveInjecti=
on(class T)<br>{<br>public:<br>=A0 T();=A0=A0=A0=A0=A0=A0=A0 // to be defin=
ed in the class<br>
=A0 T(const T&);// to be defined in the class<br>=A0 virtual ~T();// to=
be defined in the class<br>=A0 void swap(T&);// to be defined in the c=
lass<br>=A0 </strong></p><p><strong>=A0 T(T&& b):T() // is provided=
for the class<br>
=A0 {<br>=A0=A0=A0=A0 swap(b);<br>=A0 }</strong></p><p><strong>=A0 T& o=
perator=3D(const T& b) // is provided for the class<br>=A0 {<br>=A0=A0=
=A0=A0 T c(b);<br>=A0=A0=A0=A0 swap(c);<br>=A0=A0=A0=A0 return *this;<br>=
=A0 }</strong></p><p><strong>=A0 T& operator=3D(T&& b) // is pr=
ovided for the class<br>
=A0 {<br>=A0=A0=A0=A0 swap(b);<br>=A0=A0=A0=A0 return *this;<br>=A0 }<br>};=
</strong></p><p><br>The MoveInjection frame allows to create a class with a=
move constructor and assignment much easier: the programmer<br>has to prov=
ide the definitions for T(), T(const& T&), ~T() and swap:</p>
<p><strong>class A using MoveInjection<br>{<br>public:<br>=A0=A0 A() {...}<=
br>=A0=A0 A(const A& a) { ... }<br>=A0=A0 virtual ~A() { ... }<br>=A0=
=A0 void swap(T& a) { ... }<br>};</strong></p><p>=A0</p><p>The class fr=
ame may contain static objects:</p>
<p><strong>class AddInjection(class T)<br>{<br>=A0=A0 static friend T opera=
tor+(class T& a, class T& b);<br>};</strong></p><p><br><strong><u>P=
art II</u></strong></p><p>If the parameter inside a frame is not used, it c=
an be dropped. In this case,<br>
it is possible to write:</p><p><strong>class IntegralInjection()<br>{<br>pu=
blic:<br>=A0=A0=A0 double integral(std::function<double(double)>, dou=
ble a, double b);<br>};</strong></p><p>Such class frames can be used in a s=
imilar way:<br>
<strong>class B using IntegralInjection<br>{<br>public:<br>=A0=A0=A0 double=
integral(std::function<double(double)>, double a, double b)<br>=A0=
=A0=A0 {<br>=A0=A0=A0=A0=A0 ...<br>=A0=A0=A0 }<br>=A0=A0=A0 ...<br>};</stro=
ng></p><p>But it is also possible to use such class frames in templates:</p=
>
<p><strong>template Integrate<class A using IntegralInjection><br>...=
</strong></p><div>which means that this template requires the class to cont=
ain an integral function, which the given header.</div><div>=A0</div><div>
<strong><u>Additional features of class frames</u></strong></div><div>=A0</=
div><div>(1) It=A0should be=A0possible to use several frames to inject vari=
ous features into a class. </div><div>=A0</div><div>(2) A class frame itsel=
f can be defined in a template:</div>
<div><strong>template<class A></strong></div><div><strong>class Speci=
alInjection(class B)</strong></div><div><strong>{</strong></div><div><stron=
g>....</strong></div><div><strong>};</strong></div><span class=3D"HOEnZb"><=
font color=3D"#888888"><p>
<strong></strong>=A0</p><p>=A0</p><p>=A0</p></font></span></div><span class=
=3D"HOEnZb"><font color=3D"#888888">
<p></p>
-- <br>
=A0<br>
--- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org" target=3D=
"_blank">std-proposals+unsubscribe@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>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</font></span></blockquote></div><br></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
--089e0129478479a30e04e7b426d3--
.
Author: Nevin Liber <nevin@eviloverlord.com>
Date: Tue, 1 Oct 2013 16:25:26 -0500
Raw View
--001a11c2ddb8c590f604e7b49941
Content-Type: text/plain; charset=ISO-8859-1
On 1 October 2013 15:53, Billy O'Neal <billy.oneal@gmail.com> wrote:
> How is this different than what you can already do with the existing:
>
> template <typename T>
> class MoveInjection
> {
> T& operator=(T&&) { /*...*/ }
> }
>
> class Client : public MoveInjection<Client>
> {
>
> }
>
You cannot inject assignment operators / constructors via CRTP. The way I
think about it is that the compiler generates new assignment operators for
the derived classes which hide any declared in the base class.
That being said, I don't think that is worth a whole language feature.
--
---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
--001a11c2ddb8c590f604e7b49941
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On 1 October 2013 15:53, Billy O'Neal <span dir=3D"ltr=
"><<a href=3D"mailto:billy.oneal@gmail.com" target=3D"_blank">billy.onea=
l@gmail.com</a>></span> wrote:<br><div class=3D"gmail_extra"><div class=
=3D"gmail_quote">
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div>How is this different =
than what you can already do with the existing:</div><div>=A0</div><div>tem=
plate <typename T></div>
<div>class MoveInjection</div><div>{</div><div>=A0=A0=A0 T&=A0operator=
=3D(T&&) { /*...*/ }</div>
<div>}</div><div>=A0</div><div>class Client : public MoveInjection<Clien=
t></div><div>{</div><div>=A0</div><div>}</div></div></blockquote><div><b=
r></div><div>You cannot inject assignment operators / constructors via CRTP=
.. =A0The way I think about it is that the compiler generates new assignment=
operators for the derived classes which hide any declared in the base clas=
s.</div>
<div><br></div><div>That being said, I don't think that is worth a whol=
e language feature.</div></div></div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
--001a11c2ddb8c590f604e7b49941--
.
Author: "Billy O'Neal" <billy.oneal@gmail.com>
Date: Tue, 1 Oct 2013 14:52:44 -0700
Raw View
--90e6ba614f0e5dffdd04e7b4fbee
Content-Type: text/plain; charset=ISO-8859-1
Ah, whoops :) That's right.
Billy O'Neal
https://github.com/BillyONeal/ <https://bitbucket.org/BillyONeal/>
http://stackoverflow.com/users/82320/billy-oneal
Malware Response Instructor - BleepingComputer.com
On Tue, Oct 1, 2013 at 2:25 PM, Nevin Liber <nevin@eviloverlord.com> wrote:
> On 1 October 2013 15:53, Billy O'Neal <billy.oneal@gmail.com> wrote:
>
>> How is this different than what you can already do with the existing:
>>
>> template <typename T>
>> class MoveInjection
>> {
>> T& operator=(T&&) { /*...*/ }
>> }
>>
>> class Client : public MoveInjection<Client>
>> {
>>
>> }
>>
>
> You cannot inject assignment operators / constructors via CRTP. The way I
> think about it is that the compiler generates new assignment operators for
> the derived classes which hide any declared in the base class.
>
> That being said, I don't think that is worth a whole language feature.
>
> --
>
> ---
> 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.
> Visit this group at
> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>
--
---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
--90e6ba614f0e5dffdd04e7b4fbee
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Ah, whoops :) That's right.</div><div class=3D"gmail_e=
xtra"><br clear=3D"all"><div><div dir=3D"ltr"><div>Billy O'Neal</div><d=
iv><a href=3D"https://bitbucket.org/BillyONeal/" target=3D"_blank">https://=
github.com/BillyONeal/</a></div>
<div><a href=3D"http://stackoverflow.com/users/82320/billy-oneal" target=3D=
"_blank">http://stackoverflow.com/users/82320/billy-oneal</a></div><div>Mal=
ware Response Instructor - BleepingComputer.com</div></div></div>
<br><br><div class=3D"gmail_quote">On Tue, Oct 1, 2013 at 2:25 PM, Nevin Li=
ber <span dir=3D"ltr"><<a href=3D"mailto:nevin@eviloverlord.com" target=
=3D"_blank">nevin@eviloverlord.com</a>></span> wrote:<br><blockquote cla=
ss=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pa=
dding-left:1ex">
<div dir=3D"ltr"><div class=3D"im">On 1 October 2013 15:53, Billy O'Nea=
l <span dir=3D"ltr"><<a href=3D"mailto:billy.oneal@gmail.com" target=3D"=
_blank">billy.oneal@gmail.com</a>></span> wrote:<br></div><div class=3D"=
gmail_extra">
<div class=3D"gmail_quote"><div class=3D"im">
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;padding=
-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-l=
eft-style:solid"><div dir=3D"ltr"><div>How is this different than what you =
can already do with the existing:</div>
<div>=A0</div><div>template <typename T></div>
<div>class MoveInjection</div><div>{</div><div>=A0=A0=A0 T&=A0operator=
=3D(T&&) { /*...*/ }</div>
<div>}</div><div>=A0</div><div>class Client : public MoveInjection<Clien=
t></div><div>{</div><div>=A0</div><div>}</div></div></blockquote><div><b=
r></div></div><div>You cannot inject assignment operators / constructors vi=
a CRTP. =A0The way I think about it is that the compiler generates new assi=
gnment operators for the derived classes which hide any declared in the bas=
e class.</div>
<div><br></div><div>That being said, I don't think that is worth a whol=
e language feature.</div></div></div></div><div class=3D"HOEnZb"><div class=
=3D"h5">
<p></p>
-- <br>
=A0<br>
--- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org" target=3D=
"_blank">std-proposals+unsubscribe@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>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
--90e6ba614f0e5dffdd04e7b4fbee--
.
Author: Sean Middleditch <sean.middleditch@gmail.com>
Date: Tue, 1 Oct 2013 15:54:30 -0700 (PDT)
Raw View
------=_Part_4714_1586400.1380668070834
Content-Type: text/plain; charset=ISO-8859-1
On Tuesday, October 1, 2013 11:33:12 AM UTC-7, Mikhail Semenov wrote:
>
> I propose to introduce class frames, which allow to inject features into
> classes, which in most cases are not available through inheritance. In
> addition, they
> don't require virtual functions, which makes them more efficient.
>
>
In what significant ways does this differ from the whole Mixins feature
brought up recently? It looks and sounds like the same general idea to me,
sans some syntactical and terminology differences.
--
---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
------=_Part_4714_1586400.1380668070834
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On Tuesday, October 1, 2013 11:33:12 AM UTC-7, Mikhail Sem=
enov 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"><d=
iv>I propose to introduce class frames, which allow to inject features into=
classes, which in most cases are not available through inheritance. In add=
ition, they</div><div>don't require virtual functions, which makes them mor=
e efficient.</div><div> </div></div></blockquote><div><br></div>In wha=
t significant ways does this differ from the whole Mixins feature brought u=
p recently? It looks and sounds like the same general idea to me, san=
s some syntactical and terminology differences.<br><br><div> </div></d=
iv>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
------=_Part_4714_1586400.1380668070834--
.