Topic: Override block to mark all methods within that
Author: =?UTF-8?Q?Micha=C5=82_Dominiak?= <griwes@griwes.info>
Date: Wed, 21 Jun 2017 11:34:30 +0000
Raw View
--001a114b3976fb38ad055276c083
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
`override` is a contextual keyword; this won't fly.
On Wed, Jun 21, 2017 at 12:42 PM husain jiruwala <husain.255@gmail.com>
wrote:
> Hi
> down vote
>
>
> favorite
> <https://stackoverflow.com/questions/44672846/override-block-instead-of-o=
verride-keyword-on-all-methods?noredirect=3D1>
>
> Proposing a way I can take advantage of override keyword without writin=
g
> override after each method.
>
> I have couple of points to desire such a thing
>
> =C2=B7 Its error prone to mark each method override when you are
> dealing with legacy code and introducing the override keyword in the
> existing class
>
> =C2=B7 You have too many override methods
>
> =C2=B7 Override methods maybe scattered around in class declarati=
on
> mangled with bunch of other methods its good to group them as a good
> practice.
>
> I am looking for something like override block using scope, when any
> method is part of this block its same as writing override after the metho=
d
> signature.
>
> e.g.
>
> class derived: public base
>
> {
>
> public:
>
>
>
> *override* {
>
> int blah();
>
> void blahBlah();
>
> .. and so on
>
> }
>
> };
>
>
>
> The above code is supposed to be same as writing override after each
> method.
>
>
> Thanks
>
> Husen Jiruwala
>
> --
> 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/9ec15216-718=
e-4733-8ae0-9e23fd223fd0%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9ec15216-71=
8e-4733-8ae0-9e23fd223fd0%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er>
> .
>
--=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/CAPCFJdRX3AHDu03Dr4GVqn4j0hybs%2B7N_ms0r-AScZasV=
7J5Hg%40mail.gmail.com.
--001a114b3976fb38ad055276c083
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">`override` is a contextual keyword; this won't fly.</d=
iv><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Wed, Jun 21, 2017 at =
12:42 PM husain jiruwala <<a href=3D"mailto:husain.255@gmail.com">husain=
..255@gmail.com</a>> wrote:<br></div><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div =
dir=3D"ltr">Hi=C2=A0<br><div><table style=3D"font-variant-numeric:inherit;f=
ont-stretch:inherit;line-height:inherit;font-family:Arial,"Helvetica N=
eue",Helvetica,sans-serif;vertical-align:baseline;border-collapse:coll=
apse;color:rgb(36,39,41)"><tbody style=3D"font-style:inherit;font-variant:i=
nherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-heig=
ht:inherit;font-family:inherit;vertical-align:baseline"><tr style=3D"font-s=
tyle:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;=
font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:ba=
seline"><td class=3D"m_5043772534516725181votecell" style=3D"padding-right:=
15px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stret=
ch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertic=
al-align:top"><div class=3D"m_5043772534516725181vote" style=3D"font-style:=
inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-=
size:inherit;line-height:inherit;font-family:inherit;vertical-align:baselin=
e;text-align:center;min-width:46px"><a class=3D"m_5043772534516725181vote-d=
own-off" title=3D"This question does not show any research effort; it is un=
clear or not useful" style=3D"margin-right:auto;margin-bottom:10px;margin-l=
eft:auto;font-style:inherit;font-variant:inherit;font-weight:inherit;font-s=
tretch:inherit;font-size:1px;line-height:inherit;font-family:inherit;vertic=
al-align:baseline;color:rgb(0,119,204);background-image:url(""),n=
one;background-size:initial;background-repeat:no-repeat;overflow:hidden;dis=
play:block;width:40px;height:30px;background-position:0px -220px">down vote=
</a></div></td><td class=3D"m_5043772534516725181postcell" style=3D"font-st=
yle:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;f=
ont-size:inherit;line-height:inherit;font-family:inherit;vertical-align:top=
"></td></tr></tbody></table><table class=3D"m_5043772534516725181MsoNormalT=
able" border=3D"0" cellspacing=3D"0" cellpadding=3D"0" style=3D"background-=
image:initial;background-position:initial;background-size:initial;backgroun=
d-repeat:initial;background-origin:initial;background-clip:initial;border-c=
ollapse:collapse">
<tbody><tr>
<td valign=3D"top" style=3D"padding:0in 11.25pt 0in 0in">
<p class=3D"MsoNormal" align=3D"center" style=3D"text-align:center;vertic=
al-align:baseline"><span style=3D"font-size:10.0pt;font-family:inherit;colo=
r:#242729"><a href=3D"https://stackoverflow.com/questions/44672846/override=
-block-instead-of-override-keyword-on-all-methods?noredirect=3D1" title=3D"=
Click to mark as favorite question (click again to undo)" target=3D"_blank"=
><span style=3D"font-size:1pt;color:rgb(0,119,204);border-width:1pt;border-=
style:none;border-color:windowtext;padding:0in"><br>
favorite</span></a><u></u><u></u></span></p>
</td>
<td valign=3D"top" style=3D"padding:0in;font-style:inherit;font-variant:i=
nherit;font-stretch:inherit;font-size:inherit;line-height:inherit">
<p style=3D"font-weight:inherit;margin:0in 0in 12pt;vertical-align:baseli=
ne;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:i=
nherit;line-height:inherit"><span style=3D"font-size:11.5pt;font-family:inh=
erit;color:#242729"></span><span style=3D"font-style:inherit;font-variant:i=
nherit;font-stretch:inherit;font-size:inherit;line-height:inherit">Proposin=
g a
=C2=A0way I can =C2=A0take advantage of override keyword without writing
override after each method.<u></u><u></u></span></p>
<p style=3D"font-weight:inherit;margin:0in 0in 12pt;vertical-align:baseli=
ne;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:i=
nherit;line-height:inherit"><span style=3D"font-size:11.5pt;font-family:inh=
erit;color:#242729">I have couple of points to desire such a thing<u></u><u=
></u></span></p>
<p style=3D"font-weight:inherit;margin:0in 0in 0.0001pt 22.5pt;vertical-a=
lign:baseline;font-style:inherit;font-variant:inherit;font-stretch:inherit;=
font-size:inherit;line-height:inherit"><span style=3D"font-size:10.0pt;font=
-family:Symbol;color:#242729">=C2=B7<span style=3D"font-variant-numeric:nor=
mal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:"=
Times New Roman"">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span><span style=3D"font-size:11.5pt;font-family:inherit;color:#=
242729">Its error prone to mark
each method override when you are dealing with legacy code and introducin=
g
the override keyword in the existing class<u></u><u></u></span></p>
<p style=3D"font-weight:inherit;margin:0in 0in 0.0001pt 22.5pt;vertical-a=
lign:baseline;font-style:inherit;font-variant:inherit;font-stretch:inherit;=
font-size:inherit;line-height:inherit"><span style=3D"font-size:10.0pt;font=
-family:Symbol;color:#242729">=C2=B7<span style=3D"font-variant-numeric:nor=
mal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:"=
Times New Roman"">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span><span style=3D"font-size:11.5pt;font-family:inherit;color:#=
242729">You have too many override
methods<u></u><u></u></span></p>
<p style=3D"font-weight:inherit;margin:0in 0in 0.0001pt 22.5pt;vertical-a=
lign:baseline;font-style:inherit;font-variant:inherit;font-stretch:inherit;=
font-size:inherit;line-height:inherit"><span style=3D"font-size:10.0pt;font=
-family:Symbol;color:#242729">=C2=B7<span style=3D"font-variant-numeric:nor=
mal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:"=
Times New Roman"">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span><span style=3D"font-size:11.5pt;font-family:inherit;color:#=
242729">Override methods maybe
scattered around in class declaration mangled with bunch of other methods=
its
good to group them as a good practice.<u></u><u></u></span></p>
<p style=3D"font-weight:inherit;margin:0in 0in 12pt;vertical-align:baseli=
ne;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:i=
nherit;line-height:inherit"><span style=3D"font-size:11.5pt;font-family:inh=
erit;color:#242729">I am looking for something like override block using sc=
ope,
when any method is part of this block its same as writing override after =
the
method signature.<u></u><u></u></span></p>
<p style=3D"font-weight:inherit;margin:0in 0in 0.0001pt;vertical-align:ba=
seline;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-si=
ze:inherit;line-height:inherit"><span style=3D"font-size:inherit;font-style=
:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weig=
ht:inherit"><span style=3D"font-size:11.5pt;font-family:inherit;color:rgb(3=
6,39,41);border-width:1pt;border-style:none;border-color:windowtext;padding=
:0in">e.g.</span></span><span style=3D"font-size:11.5pt;font-family:inherit=
;color:#242729"><u></u><u></u></span></p>
<pre style=3D"font-weight:inherit;background:rgb(239,240,241);vertical-al=
ign:baseline;font-style:inherit;font-variant:inherit;font-stretch:inherit;l=
ine-height:inherit;max-height:600px;word-wrap:normal;overflow:auto"><span c=
lass=3D"m_5043772534516725181kwd"><span style=3D"font-family:inherit;color:=
rgb(16,16,148);border-width:1pt;border-style:none;border-color:windowtext;p=
adding:0in">class</span></span><span class=3D"m_5043772534516725181pln"><sp=
an style=3D"font-family:inherit;color:rgb(48,51,54);border-width:1pt;border=
-style:none;border-color:windowtext;padding:0in"> derived: public base<u></=
u><u></u></span></span></pre><pre style=3D"font-weight:inherit;background:r=
gb(239,240,241);vertical-align:baseline"><span class=3D"m_50437725345167251=
81pun"><span style=3D"font-family:inherit;color:rgb(48,51,54);border-width:=
1pt;border-style:none;border-color:windowtext;padding:0in">{</span></span><=
span class=3D"m_5043772534516725181pln"><span style=3D"font-family:inherit;=
color:rgb(48,51,54);border-width:1pt;border-style:none;border-color:windowt=
ext;padding:0in"><u></u><u></u></span></span></pre><span style=3D"font-styl=
e:inherit;font-variant:inherit;font-stretch:inherit;font-size:inherit;line-=
height:inherit"><pre style=3D"font-weight:inherit;background:rgb(239,240,24=
1);vertical-align:baseline"><span class=3D"m_5043772534516725181pln"><span =
style=3D"font-family:inherit;color:rgb(48,51,54);border-width:1pt;border-st=
yle:none;border-color:windowtext;padding:0in">=C2=A0 =C2=A0</span></span><s=
pan class=3D"m_5043772534516725181kwd"></span><span style=3D"font-family:in=
herit;color:rgb(16,16,148);border-width:1pt;border-style:none;border-color:=
windowtext;padding:0in"><span style=3D"font-style:inherit;font-variant:inhe=
rit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:=
inherit">public</span></span><span class=3D"m_5043772534516725181pun"><span=
style=3D"font-family:inherit;color:rgb(48,51,54);border-width:1pt;border-s=
tyle:none;border-color:windowtext;padding:0in"><span style=3D"font-style:in=
herit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-si=
ze:inherit;line-height:inherit">:</span></span></span><span class=3D"m_5043=
772534516725181pln"><span style=3D"font-family:inherit;color:rgb(48,51,54);=
border-width:1pt;border-style:none;border-color:windowtext;padding:0in"><u>=
</u><u></u></span></span></pre><span style=3D"font-style:inherit;font-varia=
nt:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit"><pre=
style=3D"font-weight:inherit;background:rgb(239,240,241);vertical-align:ba=
seline"><span class=3D"m_5043772534516725181pln"><span style=3D"font-family=
:inherit;color:rgb(48,51,54);border-width:1pt;border-style:none;border-colo=
r:windowtext;padding:0in"><u></u>=C2=A0<u></u></span></span></pre><pre styl=
e=3D"background:rgb(239,240,241);vertical-align:baseline"><span class=3D"m_=
5043772534516725181pln"><span style=3D"font-family:inherit;color:rgb(48,51,=
54);border-width:1pt;border-style:none;border-color:windowtext;padding:0in"=
><span style=3D"font-weight:inherit">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span>=
<b>override</b><span style=3D"font-weight:inherit"> </span></span></span><s=
pan class=3D"m_5043772534516725181pun" style=3D"font-weight:inherit"><span =
style=3D"font-family:inherit;color:rgb(48,51,54);border-width:1pt;border-st=
yle:none;border-color:windowtext;padding:0in"><span style=3D"font-style:inh=
erit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-siz=
e:inherit;line-height:inherit">{</span></span></span><span class=3D"m_50437=
72534516725181pln" style=3D"font-weight:inherit"><span style=3D"font-family=
:inherit;color:rgb(48,51,54);border-width:1pt;border-style:none;border-colo=
r:windowtext;padding:0in"><u></u><u></u></span></span></pre><span style=3D"=
font-weight:inherit;font-style:inherit;font-variant:inherit;font-stretch:in=
herit;font-size:inherit;line-height:inherit"><pre style=3D"background:#eff0=
f1;vertical-align:baseline"><span class=3D"m_5043772534516725181pln"><span =
style=3D"font-family:inherit;color:rgb(48,51,54);border-width:1pt;border-st=
yle:none;border-color:windowtext;padding:0in">=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0</span></span><span cla=
ss=3D"m_5043772534516725181typ"></span><span style=3D"font-family:inherit;c=
olor:rgb(43,145,175);border-width:1pt;border-style:none;border-color:window=
text;padding:0in"><span style=3D"font-style:inherit;font-variant:inherit;fo=
nt-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inheri=
t">int</span></span><span class=3D"m_5043772534516725181pln"><span style=3D=
"font-family:inherit;color:rgb(48,51,54);border-width:1pt;border-style:none=
;border-color:windowtext;padding:0in"><span style=3D"font-style:inherit;fon=
t-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inheri=
t;line-height:inherit"> blah</span></span></span><span class=3D"m_504377253=
4516725181pun"><span style=3D"font-family:inherit;color:rgb(48,51,54);borde=
r-width:1pt;border-style:none;border-color:windowtext;padding:0in"><span st=
yle=3D"font-style:inherit;font-variant:inherit;font-weight:inherit;font-str=
etch:inherit;font-size:inherit;line-height:inherit">();</span></span></span=
><span class=3D"m_5043772534516725181pln"><span style=3D"font-family:inheri=
t;color:rgb(48,51,54);border-width:1pt;border-style:none;border-color:windo=
wtext;padding:0in"><u></u><u></u></span></span></pre><span style=3D"font-st=
yle:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;f=
ont-size:inherit;line-height:inherit"><pre style=3D"background:#eff0f1;vert=
ical-align:baseline"><span class=3D"m_5043772534516725181pln"><span style=
=3D"font-family:inherit;color:rgb(48,51,54);border-width:1pt;border-style:n=
one;border-color:windowtext;padding:0in">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0</span></span><span cla=
ss=3D"m_5043772534516725181kwd"></span><span style=3D"font-family:inherit;c=
olor:rgb(16,16,148);border-width:1pt;border-style:none;border-color:windowt=
ext;padding:0in"><span style=3D"font-style:inherit;font-variant:inherit;fon=
t-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit=
">void</span></span><span class=3D"m_5043772534516725181pln"><span style=3D=
"font-family:inherit;color:rgb(48,51,54);border-width:1pt;border-style:none=
;border-color:windowtext;padding:0in"><span style=3D"font-style:inherit;fon=
t-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inheri=
t;line-height:inherit"> blahBlah</span></span></span><span class=3D"m_50437=
72534516725181pun"><span style=3D"font-family:inherit;color:rgb(48,51,54);b=
order-width:1pt;border-style:none;border-color:windowtext;padding:0in"><spa=
n style=3D"font-style:inherit;font-variant:inherit;font-weight:inherit;font=
-stretch:inherit;font-size:inherit;line-height:inherit">();</span></span></=
span><span class=3D"m_5043772534516725181pln"><span style=3D"font-family:in=
herit;color:rgb(48,51,54);border-width:1pt;border-style:none;border-color:w=
indowtext;padding:0in"><u></u><u></u></span></span></pre><span style=3D"fon=
t-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inher=
it;font-size:inherit;line-height:inherit"><pre style=3D"background:#eff0f1;=
vertical-align:baseline"><span class=3D"m_5043772534516725181pln"><span sty=
le=3D"font-family:inherit;color:rgb(48,51,54);border-width:1pt;border-style=
:none;border-color:windowtext;padding:0in">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0</span></span>=
<span class=3D"m_5043772534516725181pun"></span><span style=3D"font-family:=
inherit;color:rgb(48,51,54);border-width:1pt;border-style:none;border-color=
:windowtext;padding:0in"><span style=3D"font-style:inherit;font-variant:inh=
erit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height=
:inherit">..</span></span><span class=3D"m_5043772534516725181pln"><span st=
yle=3D"font-family:inherit;color:rgb(48,51,54);border-width:1pt;border-styl=
e:none;border-color:windowtext;padding:0in"><span style=3D"font-style:inher=
it;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:=
inherit;line-height:inherit"> and so on<u></u><u></u></span></span></span><=
/pre><pre style=3D"background:#eff0f1;vertical-align:baseline"><span class=
=3D"m_5043772534516725181pln"><span style=3D"font-family:inherit;color:rgb(=
48,51,54);border-width:1pt;border-style:none;border-color:windowtext;paddin=
g:0in">=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0</span></span><span class=3D"m_504377=
2534516725181pun"><span style=3D"font-family:inherit;color:rgb(48,51,54);bo=
rder-width:1pt;border-style:none;border-color:windowtext;padding:0in"><span=
style=3D"font-style:inherit;font-variant:inherit;font-weight:inherit;font-=
stretch:inherit;font-size:inherit;line-height:inherit">}</span></span></spa=
n></pre><span style=3D"font-style:inherit;font-variant:inherit;font-weight:=
inherit;font-stretch:inherit;font-size:inherit;line-height:inherit"><pre st=
yle=3D"background:#eff0f1;vertical-align:baseline"><span class=3D"m_5043772=
534516725181pun"></span><span style=3D"font-family:inherit;color:rgb(48,51,=
54);border-width:1pt;border-style:none;border-color:windowtext;padding:0in"=
><span style=3D"font-style:inherit;font-variant:inherit;font-weight:inherit=
;font-stretch:inherit;font-size:inherit;line-height:inherit">};</span></spa=
n><span style=3D"font-family:Consolas;color:#393318"><u></u><u></u></span><=
/pre></span></span></span></span></span></span></td>
</tr>
</tbody></table>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<p class=3D"MsoNormal">The above code is supposed to be same as writing ove=
rride
after each method.<u></u><u></u></p><p class=3D"MsoNormal"><br></p><p class=
=3D"MsoNormal">Thanks</p><p class=3D"MsoNormal">Husen Jiruwala</p></div></d=
iv>
<p></p>
-- <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+unsubscribe@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>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/9ec15216-718e-4733-8ae0-9e23fd223fd0%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9ec15216-718e-=
4733-8ae0-9e23fd223fd0%40isocpp.org</a>.<br>
</blockquote></div>
<p></p>
-- <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+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/CAPCFJdRX3AHDu03Dr4GVqn4j0hybs%2B7N_m=
s0r-AScZasV7J5Hg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAPCFJdRX3AHDu0=
3Dr4GVqn4j0hybs%2B7N_ms0r-AScZasV7J5Hg%40mail.gmail.com</a>.<br />
--001a114b3976fb38ad055276c083--
.
Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Wed, 21 Jun 2017 15:05:46 +0300
Raw View
--001a113ddb72352c9205527730c0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On 21 June 2017 at 14:34, Micha=C5=82 Dominiak <griwes@griwes.info> wrote:
> `override` is a contextual keyword; this won't fly.
>
That's not the reason this won't fly, parsing such a block is unambiguous.
But what is being asked for
here is a declaration-block, which should be something more generic than
just a block for every single thing
that should be shared among a bag of declarations. There's a good chance
that the reflection facilities
will provide a superior mechanism for ensuring that certain declarations
are overrides.
>
> On Wed, Jun 21, 2017 at 12:42 PM husain jiruwala <husain.255@gmail.com>
> wrote:
>
>> Hi
>> down vote
>>
>>
>> favorite
>> <https://stackoverflow.com/questions/44672846/override-block-instead-of-=
override-keyword-on-all-methods?noredirect=3D1>
>>
>> Proposing a way I can take advantage of override keyword without
>> writing override after each method.
>>
>> I have couple of points to desire such a thing
>>
>> =C2=B7 Its error prone to mark each method override when you are
>> dealing with legacy code and introducing the override keyword in the
>> existing class
>>
>> =C2=B7 You have too many override methods
>>
>> =C2=B7 Override methods maybe scattered around in class declarat=
ion
>> mangled with bunch of other methods its good to group them as a good
>> practice.
>>
>> I am looking for something like override block using scope, when any
>> method is part of this block its same as writing override after the meth=
od
>> signature.
>>
>> e.g.
>>
>> class derived: public base
>>
>> {
>>
>> public:
>>
>>
>>
>> *override* {
>>
>> int blah();
>>
>> void blahBlah();
>>
>> .. and so on
>>
>> }
>>
>> };
>>
>>
>>
>> The above code is supposed to be same as writing override after each
>> method.
>>
>>
>> Thanks
>>
>> Husen Jiruwala
>>
>> --
>> You received this message because you are subscribed to the Google Group=
s
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n
>> 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/is
>> ocpp.org/d/msgid/std-proposals/9ec15216-718e-4733-8ae0-
>> 9e23fd223fd0%40isocpp.org
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9ec15216-7=
18e-4733-8ae0-9e23fd223fd0%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoo=
ter>
>> .
>>
> --
> 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/is
> ocpp.org/d/msgid/std-proposals/CAPCFJdRX3AHDu03Dr4GVqn4j0hyb
> s%2B7N_ms0r-AScZasV7J5Hg%40mail.gmail.com
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAPCFJdRX3A=
HDu03Dr4GVqn4j0hybs%2B7N_ms0r-AScZasV7J5Hg%40mail.gmail.com?utm_medium=3Dem=
ail&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/CAFk2RUa7i%3DmDe6_X2C8%2BMtgARe4toQrsd0zOoprpf8C=
K38Za8Q%40mail.gmail.com.
--001a113ddb72352c9205527730c0
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On 21 June 2017 at 14:34, Micha=C5=82 Dominiak <span dir=3D"ltr"><<a=
href=3D"mailto:griwes@griwes.info" target=3D"_blank">griwes@griwes.info</a=
>></span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">`ove=
rride` is a contextual keyword; this won't fly.</div></blockquote><div>=
<br></div><div>That's not the reason this won't fly, parsing such a=
block is unambiguous. But what is being asked for<br></div><div>here is a =
declaration-block, which should be something more generic than just a block=
for every single thing<br></div><div>that should be shared among a bag of =
declarations. There's a good chance that the reflection facilities<br><=
/div><div>will provide a superior mechanism for ensuring that certain decla=
rations are overrides.<br></div><div>=C2=A0<br></div><blockquote class=3D"g=
mail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-l=
eft:1ex"><div><div class=3D"m_-6145698110366563651h5"><br><div class=3D"gma=
il_quote"><div dir=3D"ltr">On Wed, Jun 21, 2017 at 12:42 PM husain jiruwala=
<<a href=3D"mailto:husain.255@gmail.com" target=3D"_blank">husain.255@g=
mail.com</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D=
"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D=
"ltr">Hi=C2=A0<br><div><table style=3D"font-variant-numeric:inherit;font-st=
retch:inherit;line-height:inherit;font-family:Arial,"Helvetica Neue&qu=
ot;,Helvetica,sans-serif;vertical-align:baseline;border-collapse:collapse;c=
olor:rgb(36,39,41)"><tbody style=3D"font-style:inherit;font-variant:inherit=
;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inh=
erit;font-family:inherit;vertical-align:baseline"><tr style=3D"font-style:i=
nherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-s=
ize:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline=
"><td class=3D"m_-6145698110366563651m_7302652477009431797m_504377253451672=
5181votecell" style=3D"padding-right:15px;font-style:inherit;font-variant:i=
nherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-heig=
ht:inherit;font-family:inherit;vertical-align:top"><div class=3D"m_-6145698=
110366563651m_7302652477009431797m_5043772534516725181vote" style=3D"font-s=
tyle:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;=
font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:ba=
seline;text-align:center;min-width:46px"><a class=3D"m_-6145698110366563651=
m_7302652477009431797m_5043772534516725181vote-down-off" title=3D"This ques=
tion does not show any research effort; it is unclear or not useful" style=
=3D"margin-right:auto;margin-bottom:10px;margin-left:auto;font-style:inheri=
t;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:1=
px;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rg=
b(0,119,204);background-image:url(""),none;background-size:initia=
l;background-repeat:no-repeat;overflow:hidden;display:block;width:40px;heig=
ht:30px;background-position:0px -220px">down vote</a></div></td><td class=
=3D"m_-6145698110366563651m_7302652477009431797m_5043772534516725181postcel=
l" style=3D"font-style:inherit;font-variant:inherit;font-weight:inherit;fon=
t-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit=
;vertical-align:top"></td></tr></tbody></table><table class=3D"m_-614569811=
0366563651m_7302652477009431797m_5043772534516725181MsoNormalTable" style=
=3D"background-image:initial;background-position:initial;background-size:in=
itial;background-repeat:initial;background-origin:initial;background-clip:i=
nitial;border-collapse:collapse" cellspacing=3D"0" cellpadding=3D"0" border=
=3D"0">
<tbody><tr>
<td style=3D"padding:0in 11.25pt 0in 0in" valign=3D"top">
<p class=3D"MsoNormal" style=3D"text-align:center;vertical-align:baseline=
" align=3D"center"><span style=3D"font-size:10.0pt;font-family:inherit;colo=
r:#242729"><a href=3D"https://stackoverflow.com/questions/44672846/override=
-block-instead-of-override-keyword-on-all-methods?noredirect=3D1" title=3D"=
Click to mark as favorite question (click again to undo)" target=3D"_blank"=
><span style=3D"font-size:1pt;color:rgb(0,119,204);border-width:1pt;border-=
style:none;border-color:windowtext;padding:0in"><br>
favorite</span></a><u></u><u></u></span></p>
</td>
<td style=3D"padding:0in;font-style:inherit;font-variant:inherit;font-str=
etch:inherit;font-size:inherit;line-height:inherit" valign=3D"top">
<p style=3D"font-weight:inherit;margin:0in 0in 12pt;vertical-align:baseli=
ne;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:i=
nherit;line-height:inherit"><span style=3D"font-size:11.5pt;font-family:inh=
erit;color:#242729"></span><span style=3D"font-style:inherit;font-variant:i=
nherit;font-stretch:inherit;font-size:inherit;line-height:inherit">Proposin=
g a
=C2=A0way I can =C2=A0take advantage of override keyword without writing
override after each method.<u></u><u></u></span></p>
<p style=3D"font-weight:inherit;margin:0in 0in 12pt;vertical-align:baseli=
ne;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:i=
nherit;line-height:inherit"><span style=3D"font-size:11.5pt;font-family:inh=
erit;color:#242729">I have couple of points to desire such a thing<u></u><u=
></u></span></p>
<p style=3D"font-weight:inherit;margin:0in 0in 0.0001pt 22.5pt;vertical-a=
lign:baseline;font-style:inherit;font-variant:inherit;font-stretch:inherit;=
font-size:inherit;line-height:inherit"><span style=3D"font-size:10.0pt;font=
-family:Symbol;color:#242729">=C2=B7<span style=3D"font-variant-numeric:nor=
mal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:"=
Times New Roman"">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span><span style=3D"font-size:11.5pt;font-family:inherit;color:#=
242729">Its error prone to mark
each method override when you are dealing with legacy code and introducin=
g
the override keyword in the existing class<u></u><u></u></span></p>
<p style=3D"font-weight:inherit;margin:0in 0in 0.0001pt 22.5pt;vertical-a=
lign:baseline;font-style:inherit;font-variant:inherit;font-stretch:inherit;=
font-size:inherit;line-height:inherit"><span style=3D"font-size:10.0pt;font=
-family:Symbol;color:#242729">=C2=B7<span style=3D"font-variant-numeric:nor=
mal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:"=
Times New Roman"">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span><span style=3D"font-size:11.5pt;font-family:inherit;color:#=
242729">You have too many override
methods<u></u><u></u></span></p>
<p style=3D"font-weight:inherit;margin:0in 0in 0.0001pt 22.5pt;vertical-a=
lign:baseline;font-style:inherit;font-variant:inherit;font-stretch:inherit;=
font-size:inherit;line-height:inherit"><span style=3D"font-size:10.0pt;font=
-family:Symbol;color:#242729">=C2=B7<span style=3D"font-variant-numeric:nor=
mal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:"=
Times New Roman"">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span><span style=3D"font-size:11.5pt;font-family:inherit;color:#=
242729">Override methods maybe
scattered around in class declaration mangled with bunch of other methods=
its
good to group them as a good practice.<u></u><u></u></span></p>
<p style=3D"font-weight:inherit;margin:0in 0in 12pt;vertical-align:baseli=
ne;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:i=
nherit;line-height:inherit"><span style=3D"font-size:11.5pt;font-family:inh=
erit;color:#242729">I am looking for something like override block using sc=
ope,
when any method is part of this block its same as writing override after =
the
method signature.<u></u><u></u></span></p>
<p style=3D"font-weight:inherit;margin:0in 0in 0.0001pt;vertical-align:ba=
seline;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-si=
ze:inherit;line-height:inherit"><span style=3D"font-size:inherit;font-style=
:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weig=
ht:inherit"><span style=3D"font-size:11.5pt;font-family:inherit;color:rgb(3=
6,39,41);border-width:1pt;border-style:none;border-color:windowtext;padding=
:0in">e.g.</span></span><span style=3D"font-size:11.5pt;font-family:inherit=
;color:#242729"><u></u><u></u></span></p>
<pre style=3D"font-weight:inherit;background:rgb(239,240,241);vertical-al=
ign:baseline;font-style:inherit;font-variant:inherit;font-stretch:inherit;l=
ine-height:inherit;max-height:600px;word-wrap:normal;overflow:auto"><span c=
lass=3D"m_-6145698110366563651m_7302652477009431797m_5043772534516725181kwd=
"><span style=3D"font-family:inherit;color:rgb(16,16,148);border-width:1pt;=
border-style:none;border-color:windowtext;padding:0in">class</span></span><=
span class=3D"m_-6145698110366563651m_7302652477009431797m_5043772534516725=
181pln"><span style=3D"font-family:inherit;color:rgb(48,51,54);border-width=
:1pt;border-style:none;border-color:windowtext;padding:0in"> derived: publi=
c base<u></u><u></u></span></span></pre><pre style=3D"font-weight:inherit;b=
ackground:rgb(239,240,241);vertical-align:baseline"><span class=3D"m_-61456=
98110366563651m_7302652477009431797m_5043772534516725181pun"><span style=3D=
"font-family:inherit;color:rgb(48,51,54);border-width:1pt;border-style:none=
;border-color:windowtext;padding:0in">{</span></span><span class=3D"m_-6145=
698110366563651m_7302652477009431797m_5043772534516725181pln"><span style=
=3D"font-family:inherit;color:rgb(48,51,54);border-width:1pt;border-style:n=
one;border-color:windowtext;padding:0in"><u></u><u></u></span></span></pre>=
<span style=3D"font-style:inherit;font-variant:inherit;font-stretch:inherit=
;font-size:inherit;line-height:inherit"><pre style=3D"font-weight:inherit;b=
ackground:rgb(239,240,241);vertical-align:baseline"><span class=3D"m_-61456=
98110366563651m_7302652477009431797m_5043772534516725181pln"><span style=3D=
"font-family:inherit;color:rgb(48,51,54);border-width:1pt;border-style:none=
;border-color:windowtext;padding:0in">=C2=A0 =C2=A0</span></span><span clas=
s=3D"m_-6145698110366563651m_7302652477009431797m_5043772534516725181kwd"><=
/span><span style=3D"font-family:inherit;color:rgb(16,16,148);border-width:=
1pt;border-style:none;border-color:windowtext;padding:0in"><span style=3D"f=
ont-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inh=
erit;font-size:inherit;line-height:inherit">public</span></span><span class=
=3D"m_-6145698110366563651m_7302652477009431797m_5043772534516725181pun"><s=
pan style=3D"font-family:inherit;color:rgb(48,51,54);border-width:1pt;borde=
r-style:none;border-color:windowtext;padding:0in"><span style=3D"font-style=
:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font=
-size:inherit;line-height:inherit">:</span></span></span><span class=3D"m_-=
6145698110366563651m_7302652477009431797m_5043772534516725181pln"><span sty=
le=3D"font-family:inherit;color:rgb(48,51,54);border-width:1pt;border-style=
:none;border-color:windowtext;padding:0in"><u></u><u></u></span></span></pr=
e><span style=3D"font-style:inherit;font-variant:inherit;font-stretch:inher=
it;font-size:inherit;line-height:inherit"><pre style=3D"font-weight:inherit=
;background:rgb(239,240,241);vertical-align:baseline"><span class=3D"m_-614=
5698110366563651m_7302652477009431797m_5043772534516725181pln"><span style=
=3D"font-family:inherit;color:rgb(48,51,54);border-width:1pt;border-style:n=
one;border-color:windowtext;padding:0in"><u></u>=C2=A0<u></u></span></span>=
</pre><pre style=3D"background:rgb(239,240,241);vertical-align:baseline"><s=
pan class=3D"m_-6145698110366563651m_7302652477009431797m_50437725345167251=
81pln"><span style=3D"font-family:inherit;color:rgb(48,51,54);border-width:=
1pt;border-style:none;border-color:windowtext;padding:0in"><span style=3D"f=
ont-weight:inherit">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><b>override</b><s=
pan style=3D"font-weight:inherit"> </span></span></span><span class=3D"m_-6=
145698110366563651m_7302652477009431797m_5043772534516725181pun" style=3D"f=
ont-weight:inherit"><span style=3D"font-family:inherit;color:rgb(48,51,54);=
border-width:1pt;border-style:none;border-color:windowtext;padding:0in"><sp=
an style=3D"font-style:inherit;font-variant:inherit;font-weight:inherit;fon=
t-stretch:inherit;font-size:inherit;line-height:inherit">{</span></span></s=
pan><span class=3D"m_-6145698110366563651m_7302652477009431797m_50437725345=
16725181pln" style=3D"font-weight:inherit"><span style=3D"font-family:inher=
it;color:rgb(48,51,54);border-width:1pt;border-style:none;border-color:wind=
owtext;padding:0in"><u></u><u></u></span></span></pre><span style=3D"font-w=
eight:inherit;font-style:inherit;font-variant:inherit;font-stretch:inherit;=
font-size:inherit;line-height:inherit"><pre style=3D"background:#eff0f1;ver=
tical-align:baseline"><span class=3D"m_-6145698110366563651m_73026524770094=
31797m_5043772534516725181pln"><span style=3D"font-family:inherit;color:rgb=
(48,51,54);border-width:1pt;border-style:none;border-color:windowtext;paddi=
ng:0in">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 =C2=A0</span></span><span class=3D"m_-6145698110366563651m_730265247=
7009431797m_5043772534516725181typ"></span><span style=3D"font-family:inher=
it;color:rgb(43,145,175);border-width:1pt;border-style:none;border-color:wi=
ndowtext;padding:0in"><span style=3D"font-style:inherit;font-variant:inheri=
t;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:in=
herit">int</span></span><span class=3D"m_-6145698110366563651m_730265247700=
9431797m_5043772534516725181pln"><span style=3D"font-family:inherit;color:r=
gb(48,51,54);border-width:1pt;border-style:none;border-color:windowtext;pad=
ding:0in"><span style=3D"font-style:inherit;font-variant:inherit;font-weigh=
t:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit"> blah=
</span></span></span><span class=3D"m_-6145698110366563651m_730265247700943=
1797m_5043772534516725181pun"><span style=3D"font-family:inherit;color:rgb(=
48,51,54);border-width:1pt;border-style:none;border-color:windowtext;paddin=
g:0in"><span style=3D"font-style:inherit;font-variant:inherit;font-weight:i=
nherit;font-stretch:inherit;font-size:inherit;line-height:inherit">();</spa=
n></span></span><span class=3D"m_-6145698110366563651m_7302652477009431797m=
_5043772534516725181pln"><span style=3D"font-family:inherit;color:rgb(48,51=
,54);border-width:1pt;border-style:none;border-color:windowtext;padding:0in=
"><u></u><u></u></span></span></pre><span style=3D"font-style:inherit;font-=
variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;=
line-height:inherit"><pre style=3D"background:#eff0f1;vertical-align:baseli=
ne"><span class=3D"m_-6145698110366563651m_7302652477009431797m_50437725345=
16725181pln"><span style=3D"font-family:inherit;color:rgb(48,51,54);border-=
width:1pt;border-style:none;border-color:windowtext;padding:0in">=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=
=A0</span></span><span class=3D"m_-6145698110366563651m_7302652477009431797=
m_5043772534516725181kwd"></span><span style=3D"font-family:inherit;color:r=
gb(16,16,148);border-width:1pt;border-style:none;border-color:windowtext;pa=
dding:0in"><span style=3D"font-style:inherit;font-variant:inherit;font-weig=
ht:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit">void=
</span></span><span class=3D"m_-6145698110366563651m_7302652477009431797m_5=
043772534516725181pln"><span style=3D"font-family:inherit;color:rgb(48,51,5=
4);border-width:1pt;border-style:none;border-color:windowtext;padding:0in">=
<span style=3D"font-style:inherit;font-variant:inherit;font-weight:inherit;=
font-stretch:inherit;font-size:inherit;line-height:inherit"> blahBlah</span=
></span></span><span class=3D"m_-6145698110366563651m_7302652477009431797m_=
5043772534516725181pun"><span style=3D"font-family:inherit;color:rgb(48,51,=
54);border-width:1pt;border-style:none;border-color:windowtext;padding:0in"=
><span style=3D"font-style:inherit;font-variant:inherit;font-weight:inherit=
;font-stretch:inherit;font-size:inherit;line-height:inherit">();</span></sp=
an></span><span class=3D"m_-6145698110366563651m_7302652477009431797m_50437=
72534516725181pln"><span style=3D"font-family:inherit;color:rgb(48,51,54);b=
order-width:1pt;border-style:none;border-color:windowtext;padding:0in"><u><=
/u><u></u></span></span></pre><span style=3D"font-style:inherit;font-varian=
t:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-h=
eight:inherit"><pre style=3D"background:#eff0f1;vertical-align:baseline"><s=
pan class=3D"m_-6145698110366563651m_7302652477009431797m_50437725345167251=
81pln"><span style=3D"font-family:inherit;color:rgb(48,51,54);border-width:=
1pt;border-style:none;border-color:windowtext;padding:0in">=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=
=A0</span></span><span class=3D"m_-6145698110366563651m_7302652477009431797=
m_5043772534516725181pun"></span><span style=3D"font-family:inherit;color:r=
gb(48,51,54);border-width:1pt;border-style:none;border-color:windowtext;pad=
ding:0in"><span style=3D"font-style:inherit;font-variant:inherit;font-weigh=
t:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit">..</s=
pan></span><span class=3D"m_-6145698110366563651m_7302652477009431797m_5043=
772534516725181pln"><span style=3D"font-family:inherit;color:rgb(48,51,54);=
border-width:1pt;border-style:none;border-color:windowtext;padding:0in"><sp=
an style=3D"font-style:inherit;font-variant:inherit;font-weight:inherit;fon=
t-stretch:inherit;font-size:inherit;line-height:inherit"> and so on<u></u><=
u></u></span></span></span></pre><pre style=3D"background:#eff0f1;vertical-=
align:baseline"><span class=3D"m_-6145698110366563651m_7302652477009431797m=
_5043772534516725181pln"><span style=3D"font-family:inherit;color:rgb(48,51=
,54);border-width:1pt;border-style:none;border-color:windowtext;padding:0in=
">=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0</span></span><span class=3D"m_-6145698110=
366563651m_7302652477009431797m_5043772534516725181pun"><span style=3D"font=
-family:inherit;color:rgb(48,51,54);border-width:1pt;border-style:none;bord=
er-color:windowtext;padding:0in"><span style=3D"font-style:inherit;font-var=
iant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;lin=
e-height:inherit">}</span></span></span></pre><span style=3D"font-style:inh=
erit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-siz=
e:inherit;line-height:inherit"><pre style=3D"background:#eff0f1;vertical-al=
ign:baseline"><span class=3D"m_-6145698110366563651m_7302652477009431797m_5=
043772534516725181pun"></span><span style=3D"font-family:inherit;color:rgb(=
48,51,54);border-width:1pt;border-style:none;border-color:windowtext;paddin=
g:0in"><span style=3D"font-style:inherit;font-variant:inherit;font-weight:i=
nherit;font-stretch:inherit;font-size:inherit;line-height:inherit">};</span=
></span><span style=3D"font-family:Consolas;color:#393318"><u></u><u></u></=
span></pre></span></span></span></span></span></span></td>
</tr>
</tbody></table>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<p class=3D"MsoNormal">The above code is supposed to be same as writing ove=
rride
after each method.<u></u><u></u></p><p class=3D"MsoNormal"><br></p><p class=
=3D"MsoNormal">Thanks</p><p class=3D"MsoNormal">Husen Jiruwala</p></div></d=
iv>
<p></p>
-- <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+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@isoc<wbr>pp.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>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/9ec15216-718e-4733-8ae0-9e23fd223fd0%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/is<wbr>ocpp.org/d/msgid/std-proposals<wbr>/9ec1=
5216-718e-4733-8ae0-<wbr>9e23fd223fd0%40isocpp.org</a>.<br>
</blockquote></div>
<p></p>
-- <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+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@isoc<wbr>pp.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></div>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAPCFJdRX3AHDu03Dr4GVqn4j0hybs%2B7N_m=
s0r-AScZasV7J5Hg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoote=
r" target=3D"_blank">https://groups.google.com/a/is<wbr>ocpp.org/d/msgid/st=
d-proposals<wbr>/CAPCFJdRX3AHDu03Dr4GVqn4j0hyb<wbr>s%2B7N_ms0r-AScZasV7J5Hg=
%40mai<wbr>l.gmail.com</a>.<br>
</blockquote></div><br></div></div>
<p></p>
-- <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+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/CAFk2RUa7i%3DmDe6_X2C8%2BMtgARe4toQrs=
d0zOoprpf8CK38Za8Q%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAFk2RUa7i%3D=
mDe6_X2C8%2BMtgARe4toQrsd0zOoprpf8CK38Za8Q%40mail.gmail.com</a>.<br />
--001a113ddb72352c9205527730c0--
.
Author: =?UTF-8?Q?Micha=C5=82_Dominiak?= <griwes@griwes.info>
Date: Wed, 21 Jun 2017 12:08:22 +0000
Raw View
--94eb2c13f9c02032850552773a84
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On Wed, Jun 21, 2017 at 2:05 PM Ville Voutilainen <
ville.voutilainen@gmail.com> wrote:
> On 21 June 2017 at 14:34, Micha=C5=82 Dominiak <griwes@griwes.info> wrote=
:
>
>> `override` is a contextual keyword; this won't fly.
>>
>
> That's not the reason this won't fly, parsing such a block is unambiguous=
..
>
You're right; sorry for the brainfart.
> But what is being asked for
> here is a declaration-block, which should be something more generic than
> just a block for every single thing
> that should be shared among a bag of declarations. There's a good chance
> that the reflection facilities
> will provide a superior mechanism for ensuring that certain declarations
> are overrides.
>
>
>>
>> On Wed, Jun 21, 2017 at 12:42 PM husain jiruwala <husain.255@gmail.com>
>> wrote:
>>
>>> Hi
>>> down vote
>>>
>>>
>>> favorite
>>> <https://stackoverflow.com/questions/44672846/override-block-instead-of=
-override-keyword-on-all-methods?noredirect=3D1>
>>>
>>> Proposing a way I can take advantage of override keyword without
>>> writing override after each method.
>>>
>>> I have couple of points to desire such a thing
>>>
>>> =C2=B7 Its error prone to mark each method override when you ar=
e
>>> dealing with legacy code and introducing the override keyword in the
>>> existing class
>>>
>>> =C2=B7 You have too many override methods
>>>
>>> =C2=B7 Override methods maybe scattered around in class declara=
tion
>>> mangled with bunch of other methods its good to group them as a good
>>> practice.
>>>
>>> I am looking for something like override block using scope, when any
>>> method is part of this block its same as writing override after the met=
hod
>>> signature.
>>>
>>> e.g.
>>>
>>> class derived: public base
>>>
>>> {
>>>
>>> public:
>>>
>>>
>>>
>>> *override* {
>>>
>>> int blah();
>>>
>>> void blahBlah();
>>>
>>> .. and so on
>>>
>>> }
>>>
>>> };
>>>
>>>
>>>
>>> The above code is supposed to be same as writing override after each
>>> method.
>>>
>>>
>>> Thanks
>>>
>>> Husen Jiruwala
>>>
>>> --
>>> 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/9ec15216-7=
18e-4733-8ae0-9e23fd223fd0%40isocpp.org
>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9ec15216-=
718e-4733-8ae0-9e23fd223fd0%40isocpp.org?utm_medium=3Demail&utm_source=3Dfo=
oter>
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Group=
s
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n
>> 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/CAPCFJdRX3A=
HDu03Dr4GVqn4j0hybs%2B7N_ms0r-AScZasV7J5Hg%40mail.gmail.com
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAPCFJdRX3=
AHDu03Dr4GVqn4j0hybs%2B7N_ms0r-AScZasV7J5Hg%40mail.gmail.com?utm_medium=3De=
mail&utm_source=3Dfooter>
>> .
>>
>
> --
> 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/CAFk2RUa7i%3=
DmDe6_X2C8%2BMtgARe4toQrsd0zOoprpf8CK38Za8Q%40mail.gmail.com
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAFk2RUa7i%=
3DmDe6_X2C8%2BMtgARe4toQrsd0zOoprpf8CK38Za8Q%40mail.gmail.com?utm_medium=3D=
email&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/CAPCFJdTtAT2bNgUvA1PiGERUc%2B%3DB1bVjSkt1bCKNsiO=
cPXw7VA%40mail.gmail.com.
--94eb2c13f9c02032850552773a84
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"gmail_quote"><div dir=3D"ltr">On Wed, Jun 21=
, 2017 at 2:05 PM Ville Voutilainen <<a href=3D"mailto:ville.voutilainen=
@gmail.com">ville.voutilainen@gmail.com</a>> wrote:<br></div><blockquote=
class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc soli=
d;padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_extra"><div class=
=3D"gmail_quote">On 21 June 2017 at 14:34, Micha=C5=82 Dominiak <span dir=
=3D"ltr"><<a href=3D"mailto:griwes@griwes.info" target=3D"_blank">griwes=
@griwes.info</a>></span> wrote:<br><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div d=
ir=3D"ltr">`override` is a contextual keyword; this won't fly.</div></b=
lockquote><div><br></div></div></div></div><div dir=3D"ltr"><div class=3D"g=
mail_extra"><div class=3D"gmail_quote"><div>That's not the reason this =
won't fly, parsing such a block is unambiguous.</div></div></div></div>=
</blockquote><div><br></div><div>You're right; sorry for the brainfart.=
</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div=
class=3D"gmail_extra"><div class=3D"gmail_quote"><div> But what is being a=
sked for<br></div><div>here is a declaration-block, which should be somethi=
ng more generic than just a block for every single thing<br></div><div>that=
should be shared among a bag of declarations. There's a good chance th=
at the reflection facilities<br></div><div>will provide a superior mechanis=
m for ensuring that certain declarations are overrides.<br></div><div>=C2=
=A0<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;b=
order-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div></div>=
<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote"><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #c=
cc solid;padding-left:1ex"><div><div class=3D"m_3216119769686563793m_-61456=
98110366563651h5"><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Wed, J=
un 21, 2017 at 12:42 PM husain jiruwala <<a href=3D"mailto:husain.255@gm=
ail.com" target=3D"_blank">husain.255@gmail.com</a>> wrote:<br></div><bl=
ockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #=
ccc solid;padding-left:1ex"><div dir=3D"ltr">Hi=C2=A0<br><div><table style=
=3D"font-variant-numeric:inherit;font-stretch:inherit;line-height:inherit;f=
ont-family:Arial,"Helvetica Neue",Helvetica,sans-serif;vertical-a=
lign:baseline;border-collapse:collapse;color:rgb(36,39,41)"><tbody style=3D=
"font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:i=
nherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-a=
lign:baseline"><tr style=3D"font-style:inherit;font-variant:inherit;font-we=
ight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;fon=
t-family:inherit;vertical-align:baseline"><td class=3D"m_321611976968656379=
3m_-6145698110366563651m_7302652477009431797m_5043772534516725181votecell" =
style=3D"padding-right:15px;font-style:inherit;font-variant:inherit;font-we=
ight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;fon=
t-family:inherit;vertical-align:top"><div class=3D"m_3216119769686563793m_-=
6145698110366563651m_7302652477009431797m_5043772534516725181vote" style=3D=
"font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:i=
nherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-a=
lign:baseline;text-align:center;min-width:46px"><a class=3D"m_3216119769686=
563793m_-6145698110366563651m_7302652477009431797m_5043772534516725181vote-=
down-off" title=3D"This question does not show any research effort; it is u=
nclear or not useful" style=3D"margin-right:auto;margin-bottom:10px;margin-=
left:auto;font-style:inherit;font-variant:inherit;font-weight:inherit;font-=
stretch:inherit;font-size:1px;line-height:inherit;font-family:inherit;verti=
cal-align:baseline;color:rgb(0,119,204);background-image:url(""),=
none;background-size:initial;background-repeat:no-repeat;overflow:hidden;di=
splay:block;width:40px;height:30px;background-position:0px -220px">down vot=
e</a></div></td><td class=3D"m_3216119769686563793m_-6145698110366563651m_7=
302652477009431797m_5043772534516725181postcell" style=3D"font-style:inheri=
t;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:i=
nherit;line-height:inherit;font-family:inherit;vertical-align:top"></td></t=
r></tbody></table><table class=3D"m_3216119769686563793m_-61456981103665636=
51m_7302652477009431797m_5043772534516725181MsoNormalTable" style=3D"backgr=
ound-image:initial;background-position:initial;background-size:initial;back=
ground-repeat:initial;background-origin:initial;background-clip:initial;bor=
der-collapse:collapse" cellspacing=3D"0" cellpadding=3D"0" border=3D"0">
<tbody><tr>
<td style=3D"padding:0in 11.25pt 0in 0in" valign=3D"top">
<p class=3D"MsoNormal" style=3D"text-align:center;vertical-align:baseline=
" align=3D"center"><span style=3D"font-size:10.0pt;font-family:inherit;colo=
r:#242729"><a href=3D"https://stackoverflow.com/questions/44672846/override=
-block-instead-of-override-keyword-on-all-methods?noredirect=3D1" title=3D"=
Click to mark as favorite question (click again to undo)" target=3D"_blank"=
><span style=3D"font-size:1pt;color:rgb(0,119,204);border-width:1pt;border-=
style:none;border-color:windowtext;padding:0in"><br>
favorite</span></a><u></u><u></u></span></p>
</td>
<td style=3D"padding:0in;font-style:inherit;font-variant:inherit;font-str=
etch:inherit;font-size:inherit;line-height:inherit" valign=3D"top">
<p style=3D"font-weight:inherit;margin:0in 0in 12pt;vertical-align:baseli=
ne;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:i=
nherit;line-height:inherit"><span style=3D"font-size:11.5pt;font-family:inh=
erit;color:#242729"></span><span style=3D"font-style:inherit;font-variant:i=
nherit;font-stretch:inherit;font-size:inherit;line-height:inherit">Proposin=
g a
=C2=A0way I can =C2=A0take advantage of override keyword without writing
override after each method.<u></u><u></u></span></p>
<p style=3D"font-weight:inherit;margin:0in 0in 12pt;vertical-align:baseli=
ne;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:i=
nherit;line-height:inherit"><span style=3D"font-size:11.5pt;font-family:inh=
erit;color:#242729">I have couple of points to desire such a thing<u></u><u=
></u></span></p>
<p style=3D"font-weight:inherit;margin:0in 0in 0.0001pt 22.5pt;vertical-a=
lign:baseline;font-style:inherit;font-variant:inherit;font-stretch:inherit;=
font-size:inherit;line-height:inherit"><span style=3D"font-size:10.0pt;font=
-family:Symbol;color:#242729">=C2=B7<span style=3D"font-variant-numeric:nor=
mal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:"=
Times New Roman"">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span><span style=3D"font-size:11.5pt;font-family:inherit;color:#=
242729">Its error prone to mark
each method override when you are dealing with legacy code and introducin=
g
the override keyword in the existing class<u></u><u></u></span></p>
<p style=3D"font-weight:inherit;margin:0in 0in 0.0001pt 22.5pt;vertical-a=
lign:baseline;font-style:inherit;font-variant:inherit;font-stretch:inherit;=
font-size:inherit;line-height:inherit"><span style=3D"font-size:10.0pt;font=
-family:Symbol;color:#242729">=C2=B7<span style=3D"font-variant-numeric:nor=
mal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:"=
Times New Roman"">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span><span style=3D"font-size:11.5pt;font-family:inherit;color:#=
242729">You have too many override
methods<u></u><u></u></span></p>
<p style=3D"font-weight:inherit;margin:0in 0in 0.0001pt 22.5pt;vertical-a=
lign:baseline;font-style:inherit;font-variant:inherit;font-stretch:inherit;=
font-size:inherit;line-height:inherit"><span style=3D"font-size:10.0pt;font=
-family:Symbol;color:#242729">=C2=B7<span style=3D"font-variant-numeric:nor=
mal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:"=
Times New Roman"">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span><span style=3D"font-size:11.5pt;font-family:inherit;color:#=
242729">Override methods maybe
scattered around in class declaration mangled with bunch of other methods=
its
good to group them as a good practice.<u></u><u></u></span></p>
<p style=3D"font-weight:inherit;margin:0in 0in 12pt;vertical-align:baseli=
ne;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:i=
nherit;line-height:inherit"><span style=3D"font-size:11.5pt;font-family:inh=
erit;color:#242729">I am looking for something like override block using sc=
ope,
when any method is part of this block its same as writing override after =
the
method signature.<u></u><u></u></span></p>
<p style=3D"font-weight:inherit;margin:0in 0in 0.0001pt;vertical-align:ba=
seline;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-si=
ze:inherit;line-height:inherit"><span style=3D"font-size:inherit;font-style=
:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weig=
ht:inherit"><span style=3D"font-size:11.5pt;font-family:inherit;color:rgb(3=
6,39,41);border-width:1pt;border-style:none;border-color:windowtext;padding=
:0in">e.g.</span></span><span style=3D"font-size:11.5pt;font-family:inherit=
;color:#242729"><u></u><u></u></span></p>
<pre style=3D"font-weight:inherit;background:rgb(239,240,241);vertical-al=
ign:baseline;font-style:inherit;font-variant:inherit;font-stretch:inherit;l=
ine-height:inherit;max-height:600px;word-wrap:normal;overflow:auto"><span c=
lass=3D"m_3216119769686563793m_-6145698110366563651m_7302652477009431797m_5=
043772534516725181kwd"><span style=3D"font-family:inherit;color:rgb(16,16,1=
48);border-width:1pt;border-style:none;border-color:windowtext;padding:0in"=
>class</span></span><span class=3D"m_3216119769686563793m_-6145698110366563=
651m_7302652477009431797m_5043772534516725181pln"><span style=3D"font-famil=
y:inherit;color:rgb(48,51,54);border-width:1pt;border-style:none;border-col=
or:windowtext;padding:0in"> derived: public base<u></u><u></u></span></span=
></pre><pre style=3D"font-weight:inherit;background:rgb(239,240,241);vertic=
al-align:baseline"><span class=3D"m_3216119769686563793m_-61456981103665636=
51m_7302652477009431797m_5043772534516725181pun"><span style=3D"font-family=
:inherit;color:rgb(48,51,54);border-width:1pt;border-style:none;border-colo=
r:windowtext;padding:0in">{</span></span><span class=3D"m_32161197696865637=
93m_-6145698110366563651m_7302652477009431797m_5043772534516725181pln"><spa=
n style=3D"font-family:inherit;color:rgb(48,51,54);border-width:1pt;border-=
style:none;border-color:windowtext;padding:0in"><u></u><u></u></span></span=
></pre><span style=3D"font-style:inherit;font-variant:inherit;font-stretch:=
inherit;font-size:inherit;line-height:inherit"><pre style=3D"font-weight:in=
herit;background:rgb(239,240,241);vertical-align:baseline"><span class=3D"m=
_3216119769686563793m_-6145698110366563651m_7302652477009431797m_5043772534=
516725181pln"><span style=3D"font-family:inherit;color:rgb(48,51,54);border=
-width:1pt;border-style:none;border-color:windowtext;padding:0in">=C2=A0 =
=C2=A0</span></span><span class=3D"m_3216119769686563793m_-6145698110366563=
651m_7302652477009431797m_5043772534516725181kwd"></span><span style=3D"fon=
t-family:inherit;color:rgb(16,16,148);border-width:1pt;border-style:none;bo=
rder-color:windowtext;padding:0in"><span style=3D"font-style:inherit;font-v=
ariant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;l=
ine-height:inherit">public</span></span><span class=3D"m_321611976968656379=
3m_-6145698110366563651m_7302652477009431797m_5043772534516725181pun"><span=
style=3D"font-family:inherit;color:rgb(48,51,54);border-width:1pt;border-s=
tyle:none;border-color:windowtext;padding:0in"><span style=3D"font-style:in=
herit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-si=
ze:inherit;line-height:inherit">:</span></span></span><span class=3D"m_3216=
119769686563793m_-6145698110366563651m_7302652477009431797m_504377253451672=
5181pln"><span style=3D"font-family:inherit;color:rgb(48,51,54);border-widt=
h:1pt;border-style:none;border-color:windowtext;padding:0in"><u></u><u></u>=
</span></span></pre><span style=3D"font-style:inherit;font-variant:inherit;=
font-stretch:inherit;font-size:inherit;line-height:inherit"><pre style=3D"f=
ont-weight:inherit;background:rgb(239,240,241);vertical-align:baseline"><sp=
an class=3D"m_3216119769686563793m_-6145698110366563651m_730265247700943179=
7m_5043772534516725181pln"><span style=3D"font-family:inherit;color:rgb(48,=
51,54);border-width:1pt;border-style:none;border-color:windowtext;padding:0=
in"><u></u>=C2=A0<u></u></span></span></pre><pre style=3D"background:rgb(23=
9,240,241);vertical-align:baseline"><span class=3D"m_3216119769686563793m_-=
6145698110366563651m_7302652477009431797m_5043772534516725181pln"><span sty=
le=3D"font-family:inherit;color:rgb(48,51,54);border-width:1pt;border-style=
:none;border-color:windowtext;padding:0in"><span style=3D"font-weight:inher=
it">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><b>override</b><span style=3D"fon=
t-weight:inherit"> </span></span></span><span class=3D"m_321611976968656379=
3m_-6145698110366563651m_7302652477009431797m_5043772534516725181pun" style=
=3D"font-weight:inherit"><span style=3D"font-family:inherit;color:rgb(48,51=
,54);border-width:1pt;border-style:none;border-color:windowtext;padding:0in=
"><span style=3D"font-style:inherit;font-variant:inherit;font-weight:inheri=
t;font-stretch:inherit;font-size:inherit;line-height:inherit">{</span></spa=
n></span><span class=3D"m_3216119769686563793m_-6145698110366563651m_730265=
2477009431797m_5043772534516725181pln" style=3D"font-weight:inherit"><span =
style=3D"font-family:inherit;color:rgb(48,51,54);border-width:1pt;border-st=
yle:none;border-color:windowtext;padding:0in"><u></u><u></u></span></span><=
/pre><span style=3D"font-weight:inherit;font-style:inherit;font-variant:inh=
erit;font-stretch:inherit;font-size:inherit;line-height:inherit"><pre style=
=3D"background:#eff0f1;vertical-align:baseline"><span class=3D"m_3216119769=
686563793m_-6145698110366563651m_7302652477009431797m_5043772534516725181pl=
n"><span style=3D"font-family:inherit;color:rgb(48,51,54);border-width:1pt;=
border-style:none;border-color:windowtext;padding:0in">=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0</span></span>=
<span class=3D"m_3216119769686563793m_-6145698110366563651m_730265247700943=
1797m_5043772534516725181typ"></span><span style=3D"font-family:inherit;col=
or:rgb(43,145,175);border-width:1pt;border-style:none;border-color:windowte=
xt;padding:0in"><span style=3D"font-style:inherit;font-variant:inherit;font=
-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit"=
>int</span></span><span class=3D"m_3216119769686563793m_-614569811036656365=
1m_7302652477009431797m_5043772534516725181pln"><span style=3D"font-family:=
inherit;color:rgb(48,51,54);border-width:1pt;border-style:none;border-color=
:windowtext;padding:0in"><span style=3D"font-style:inherit;font-variant:inh=
erit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height=
:inherit"> blah</span></span></span><span class=3D"m_3216119769686563793m_-=
6145698110366563651m_7302652477009431797m_5043772534516725181pun"><span sty=
le=3D"font-family:inherit;color:rgb(48,51,54);border-width:1pt;border-style=
:none;border-color:windowtext;padding:0in"><span style=3D"font-style:inheri=
t;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:i=
nherit;line-height:inherit">();</span></span></span><span class=3D"m_321611=
9769686563793m_-6145698110366563651m_7302652477009431797m_50437725345167251=
81pln"><span style=3D"font-family:inherit;color:rgb(48,51,54);border-width:=
1pt;border-style:none;border-color:windowtext;padding:0in"><u></u><u></u></=
span></span></pre><span style=3D"font-style:inherit;font-variant:inherit;fo=
nt-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inheri=
t"><pre style=3D"background:#eff0f1;vertical-align:baseline"><span class=3D=
"m_3216119769686563793m_-6145698110366563651m_7302652477009431797m_50437725=
34516725181pln"><span style=3D"font-family:inherit;color:rgb(48,51,54);bord=
er-width:1pt;border-style:none;border-color:windowtext;padding:0in">=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
=C2=A0</span></span><span class=3D"m_3216119769686563793m_-6145698110366563=
651m_7302652477009431797m_5043772534516725181kwd"></span><span style=3D"fon=
t-family:inherit;color:rgb(16,16,148);border-width:1pt;border-style:none;bo=
rder-color:windowtext;padding:0in"><span style=3D"font-style:inherit;font-v=
ariant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;l=
ine-height:inherit">void</span></span><span class=3D"m_3216119769686563793m=
_-6145698110366563651m_7302652477009431797m_5043772534516725181pln"><span s=
tyle=3D"font-family:inherit;color:rgb(48,51,54);border-width:1pt;border-sty=
le:none;border-color:windowtext;padding:0in"><span style=3D"font-style:inhe=
rit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size=
:inherit;line-height:inherit"> blahBlah</span></span></span><span class=3D"=
m_3216119769686563793m_-6145698110366563651m_7302652477009431797m_504377253=
4516725181pun"><span style=3D"font-family:inherit;color:rgb(48,51,54);borde=
r-width:1pt;border-style:none;border-color:windowtext;padding:0in"><span st=
yle=3D"font-style:inherit;font-variant:inherit;font-weight:inherit;font-str=
etch:inherit;font-size:inherit;line-height:inherit">();</span></span></span=
><span class=3D"m_3216119769686563793m_-6145698110366563651m_73026524770094=
31797m_5043772534516725181pln"><span style=3D"font-family:inherit;color:rgb=
(48,51,54);border-width:1pt;border-style:none;border-color:windowtext;paddi=
ng:0in"><u></u><u></u></span></span></pre><span style=3D"font-style:inherit=
;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:in=
herit;line-height:inherit"><pre style=3D"background:#eff0f1;vertical-align:=
baseline"><span class=3D"m_3216119769686563793m_-6145698110366563651m_73026=
52477009431797m_5043772534516725181pln"><span style=3D"font-family:inherit;=
color:rgb(48,51,54);border-width:1pt;border-style:none;border-color:windowt=
ext;padding:0in">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0</span></span><span class=3D"m_3216119769=
686563793m_-6145698110366563651m_7302652477009431797m_5043772534516725181pu=
n"></span><span style=3D"font-family:inherit;color:rgb(48,51,54);border-wid=
th:1pt;border-style:none;border-color:windowtext;padding:0in"><span style=
=3D"font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretc=
h:inherit;font-size:inherit;line-height:inherit">..</span></span><span clas=
s=3D"m_3216119769686563793m_-6145698110366563651m_7302652477009431797m_5043=
772534516725181pln"><span style=3D"font-family:inherit;color:rgb(48,51,54);=
border-width:1pt;border-style:none;border-color:windowtext;padding:0in"><sp=
an style=3D"font-style:inherit;font-variant:inherit;font-weight:inherit;fon=
t-stretch:inherit;font-size:inherit;line-height:inherit"> and so on<u></u><=
u></u></span></span></span></pre><pre style=3D"background:#eff0f1;vertical-=
align:baseline"><span class=3D"m_3216119769686563793m_-6145698110366563651m=
_7302652477009431797m_5043772534516725181pln"><span style=3D"font-family:in=
herit;color:rgb(48,51,54);border-width:1pt;border-style:none;border-color:w=
indowtext;padding:0in">=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0</span></span><span c=
lass=3D"m_3216119769686563793m_-6145698110366563651m_7302652477009431797m_5=
043772534516725181pun"><span style=3D"font-family:inherit;color:rgb(48,51,5=
4);border-width:1pt;border-style:none;border-color:windowtext;padding:0in">=
<span style=3D"font-style:inherit;font-variant:inherit;font-weight:inherit;=
font-stretch:inherit;font-size:inherit;line-height:inherit">}</span></span>=
</span></pre><span style=3D"font-style:inherit;font-variant:inherit;font-we=
ight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit"><p=
re style=3D"background:#eff0f1;vertical-align:baseline"><span class=3D"m_32=
16119769686563793m_-6145698110366563651m_7302652477009431797m_5043772534516=
725181pun"></span><span style=3D"font-family:inherit;color:rgb(48,51,54);bo=
rder-width:1pt;border-style:none;border-color:windowtext;padding:0in"><span=
style=3D"font-style:inherit;font-variant:inherit;font-weight:inherit;font-=
stretch:inherit;font-size:inherit;line-height:inherit">};</span></span><spa=
n style=3D"font-family:Consolas;color:#393318"><u></u><u></u></span></pre><=
/span></span></span></span></span></span></td>
</tr>
</tbody></table>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<p class=3D"MsoNormal">The above code is supposed to be same as writing ove=
rride
after each method.<u></u><u></u></p><p class=3D"MsoNormal"><br></p><p class=
=3D"MsoNormal">Thanks</p><p class=3D"MsoNormal">Husen Jiruwala</p></div></d=
iv>
<p></p>
-- <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+unsubscribe@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>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/9ec15216-718e-4733-8ae0-9e23fd223fd0%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9ec15216-718e-=
4733-8ae0-9e23fd223fd0%40isocpp.org</a>.<br>
</blockquote></div>
<p></p>
-- <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+unsubscribe@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></div></div></bloc=
kquote></div></div></div><div dir=3D"ltr"><div class=3D"gmail_extra"><div c=
lass=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 =
0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAPCFJdRX3AHDu03Dr4GVqn4j0hybs%2B7N_m=
s0r-AScZasV7J5Hg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoote=
r" target=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-pro=
posals/CAPCFJdRX3AHDu03Dr4GVqn4j0hybs%2B7N_ms0r-AScZasV7J5Hg%40mail.gmail.c=
om</a>.<br>
</blockquote></div><br></div></div>
<p></p>
-- <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+unsubscribe@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>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAFk2RUa7i%3DmDe6_X2C8%2BMtgARe4toQrs=
d0zOoprpf8CK38Za8Q%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoo=
ter" target=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-p=
roposals/CAFk2RUa7i%3DmDe6_X2C8%2BMtgARe4toQrsd0zOoprpf8CK38Za8Q%40mail.gma=
il.com</a>.<br>
</blockquote></div></div>
<p></p>
-- <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+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/CAPCFJdTtAT2bNgUvA1PiGERUc%2B%3DB1bVj=
Skt1bCKNsiOcPXw7VA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAPCFJdTtAT2b=
NgUvA1PiGERUc%2B%3DB1bVjSkt1bCKNsiOcPXw7VA%40mail.gmail.com</a>.<br />
--94eb2c13f9c02032850552773a84--
.
Author: husain jiruwala <husain.255@gmail.com>
Date: Wed, 21 Jun 2017 05:20:32 -0700 (PDT)
Raw View
------=_Part_4799_1600992728.1498047632531
Content-Type: multipart/alternative;
boundary="----=_Part_4800_1107891127.1498047632532"
------=_Part_4800_1107891127.1498047632532
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Agree this should be more generic, clang has some tool to add override by=
=20
scanning code.
Clang cpp11-migrate
On Wednesday, 21 June 2017 17:35:48 UTC+5:30, Ville Voutilainen wrote:
>
>
>
> On 21 June 2017 at 14:34, Micha=C5=82 Dominiak <gri...@griwes.info=20
> <javascript:>> wrote:
>
>> `override` is a contextual keyword; this won't fly.
>>
>
> That's not the reason this won't fly, parsing such a block is unambiguous=
..=20
> But what is being asked for
> here is a declaration-block, which should be something more generic than=
=20
> just a block for every single thing
> that should be shared among a bag of declarations. There's a good chance=
=20
> that the reflection facilities
> will provide a superior mechanism for ensuring that certain declarations=
=20
> are overrides.
> =20
>
>>
>> On Wed, Jun 21, 2017 at 12:42 PM husain jiruwala <husai...@gmail.com=20
>> <javascript:>> wrote:
>>
>>> Hi=20
>>> down vote
>>>
>>>
>>> favorite=20
>>> <https://stackoverflow.com/questions/44672846/override-block-instead-of=
-override-keyword-on-all-methods?noredirect=3D1>
>>>
>>> Proposing a way I can take advantage of override keyword without=20
>>> writing override after each method.
>>>
>>> I have couple of points to desire such a thing
>>>
>>> =C2=B7 Its error prone to mark each method override when you ar=
e=20
>>> dealing with legacy code and introducing the override keyword in the=20
>>> existing class
>>>
>>> =C2=B7 You have too many override methods
>>>
>>> =C2=B7 Override methods maybe scattered around in class declara=
tion=20
>>> mangled with bunch of other methods its good to group them as a good=20
>>> practice.
>>>
>>> I am looking for something like override block using scope, when any=20
>>> method is part of this block its same as writing override after the met=
hod=20
>>> signature.
>>>
>>> e.g.
>>>
>>> class derived: public base
>>>
>>> {
>>>
>>> public:
>>>
>>> =20
>>>
>>> *override* {
>>>
>>> int blah();
>>>
>>> void blahBlah();
>>>
>>> .. and so on
>>>
>>> }
>>>
>>> };
>>>
>>> =20
>>>
>>> The above code is supposed to be same as writing override after each=20
>>> method.
>>>
>>>
>>> Thanks
>>>
>>> Husen Jiruwala
>>>
>>> --=20
>>> You received this message because you are subscribed to the Google=20
>>> Groups "ISO C++ Standard - Future Proposals" group.
>>> To unsubscribe from this group and stop receiving emails from it, send=
=20
>>> an email to std-proposal...@isocpp.org <javascript:>.
>>> To post to this group, send email to std-pr...@isocpp.org <javascript:>=
..
>>> To view this discussion on the web visit=20
>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9ec15216-7=
18e-4733-8ae0-9e23fd223fd0%40isocpp.org=20
>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9ec15216-=
718e-4733-8ae0-9e23fd223fd0%40isocpp.org?utm_medium=3Demail&utm_source=3Dfo=
oter>
>>> .
>>>
>> --=20
>> You received this message because you are subscribed to the Google Group=
s=20
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n=20
>> email to std-proposal...@isocpp.org <javascript:>.
>> To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>> To view this discussion on the web visit=20
>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAPCFJdRX3A=
HDu03Dr4GVqn4j0hybs%2B7N_ms0r-AScZasV7J5Hg%40mail.gmail.com=20
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAPCFJdRX3=
AHDu03Dr4GVqn4j0hybs%2B7N_ms0r-AScZasV7J5Hg%40mail.gmail.com?utm_medium=3De=
mail&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/3669926d-6c95-4e47-835a-ce2dd4834718%40isocpp.or=
g.
------=_Part_4800_1107891127.1498047632532
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Agree this should be more generic, clang has some tool to =
add override by scanning code.<div><br></div><div><h2 style=3D"color: rgb(0=
, 0, 0); font-family: "Trebuchet MS", verdana, sans-serif; text-i=
ndent: 10px; background-color: rgb(245, 245, 245);">Clang cpp11-migrate</h2=
><div><br></div><br>On Wednesday, 21 June 2017 17:35:48 UTC+5:30, Ville Vou=
tilainen 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"lt=
r"><br><div><br><div class=3D"gmail_quote">On 21 June 2017 at 14:34, Micha=
=C5=82 Dominiak <span dir=3D"ltr"><<a href=3D"javascript:" target=3D"_bl=
ank" gdf-obfuscated-mailto=3D"HohpmrRTAAAJ" rel=3D"nofollow" onmousedown=3D=
"this.href=3D'javascript:';return true;" onclick=3D"this.href=3D=
9;javascript:';return true;">gri...@griwes.info</a>></span> wrote:<b=
r><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:=
1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">`override` is a contextua=
l keyword; this won't fly.</div></blockquote><div><br></div><div>That&#=
39;s not the reason this won't fly, parsing such a block is unambiguous=
.. But what is being asked for<br></div><div>here is a declaration-block, wh=
ich should be something more generic than just a block for every single thi=
ng<br></div><div>that should be shared among a bag of declarations. There&#=
39;s a good chance that the reflection facilities<br></div><div>will provid=
e a superior mechanism for ensuring that certain declarations are overrides=
..<br></div><div>=C2=A0<br></div><blockquote class=3D"gmail_quote" style=3D"=
margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><b=
r><div class=3D"gmail_quote"><div dir=3D"ltr">On Wed, Jun 21, 2017 at 12:42=
PM husain jiruwala <<a href=3D"javascript:" target=3D"_blank" gdf-obfus=
cated-mailto=3D"HohpmrRTAAAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&=
#39;javascript:';return true;" onclick=3D"this.href=3D'javascript:&=
#39;;return true;">husai...@gmail.com</a>> wrote:<br></div><blockquote c=
lass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;=
padding-left:1ex"><div dir=3D"ltr">Hi=C2=A0<br><div><table style=3D"font-st=
retch:inherit;line-height:inherit;font-family:Arial,"Helvetica Neue&qu=
ot;,Helvetica,sans-serif;vertical-align:baseline;border-collapse:collapse;c=
olor:rgb(36,39,41)"><tbody style=3D"font-style:inherit;font-variant:inherit=
;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inh=
erit;font-family:inherit;vertical-align:baseline"><tr style=3D"font-style:i=
nherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-s=
ize:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline=
"><td style=3D"padding-right:15px;font-style:inherit;font-variant:inherit;f=
ont-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inher=
it;font-family:inherit;vertical-align:top"><div style=3D"font-style:inherit=
;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:in=
herit;line-height:inherit;font-family:inherit;vertical-align:baseline;text-=
align:center;min-width:46px"><a title=3D"This question does not show any re=
search effort; it is unclear or not useful" style=3D"margin-right:auto;marg=
in-bottom:10px;margin-left:auto;font-style:inherit;font-variant:inherit;fon=
t-weight:inherit;font-stretch:inherit;font-size:1px;line-height:inherit;fon=
t-family:inherit;vertical-align:baseline;color:rgb(0,119,204);background-im=
age:url(""),none;background-repeat:no-repeat;overflow:hidden;disp=
lay:block;width:40px;min-height:30px;background-position:0px -220px">down v=
ote</a></div></td><td style=3D"font-style:inherit;font-variant:inherit;font=
-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;=
font-family:inherit;vertical-align:top"></td></tr></tbody></table><table st=
yle=3D"background-image:initial;background-position:initial;background-repe=
at:initial;border-collapse:collapse" cellspacing=3D"0" cellpadding=3D"0" bo=
rder=3D"0">
<tbody><tr>
<td style=3D"padding:0in 11.25pt 0in 0in" valign=3D"top">
<p class=3D"MsoNormal" style=3D"text-align:center;vertical-align:baseline=
" align=3D"center"><span style=3D"font-size:10.0pt;font-family:inherit;colo=
r:#242729"><a href=3D"https://stackoverflow.com/questions/44672846/override=
-block-instead-of-override-keyword-on-all-methods?noredirect=3D1" title=3D"=
Click to mark as favorite question (click again to undo)" target=3D"_blank"=
rel=3D"nofollow" onmousedown=3D"this.href=3D'https://www.google.com/ur=
l?q\x3dhttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F44672846%2Foverride-bl=
ock-instead-of-override-keyword-on-all-methods%3Fnoredirect%3D1\x26sa\x3dD\=
x26sntz\x3d1\x26usg\x3dAFQjCNGidBHJvmHjpHMkDujwEqiw49Rnfw';return true;=
" onclick=3D"this.href=3D'https://www.google.com/url?q\x3dhttps%3A%2F%2=
Fstackoverflow.com%2Fquestions%2F44672846%2Foverride-block-instead-of-overr=
ide-keyword-on-all-methods%3Fnoredirect%3D1\x26sa\x3dD\x26sntz\x3d1\x26usg\=
x3dAFQjCNGidBHJvmHjpHMkDujwEqiw49Rnfw';return true;"><span style=3D"fon=
t-size:1pt;color:rgb(0,119,204);border-width:1pt;border-style:none;border-c=
olor:windowtext;padding:0in"><br>
favorite</span></a><u></u><u></u></span></p>
</td>
<td style=3D"padding:0in;font-style:inherit;font-variant:inherit;font-str=
etch:inherit;font-size:inherit;line-height:inherit" valign=3D"top">
<p style=3D"font-weight:inherit;margin:0in 0in 12pt;vertical-align:baseli=
ne;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:i=
nherit;line-height:inherit"><span style=3D"font-size:11.5pt;font-family:inh=
erit;color:#242729"></span><span style=3D"font-style:inherit;font-variant:i=
nherit;font-stretch:inherit;font-size:inherit;line-height:inherit">Proposin=
g a
=C2=A0way I can =C2=A0take advantage of override keyword without writing
override after each method.<u></u><u></u></span></p>
<p style=3D"font-weight:inherit;margin:0in 0in 12pt;vertical-align:baseli=
ne;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:i=
nherit;line-height:inherit"><span style=3D"font-size:11.5pt;font-family:inh=
erit;color:#242729">I have couple of points to desire such a thing<u></u><u=
></u></span></p>
<p style=3D"font-weight:inherit;margin:0in 0in 0.0001pt 22.5pt;vertical-a=
lign:baseline;font-style:inherit;font-variant:inherit;font-stretch:inherit;=
font-size:inherit;line-height:inherit"><span style=3D"font-size:10.0pt;font=
-family:Symbol;color:#242729">=C2=B7<span style=3D"font-stretch:normal;font=
-size:7pt;line-height:normal;font-family:"Times New Roman"">=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span><span style=3D"font-size:11.5pt;font-family:inherit;color:#=
242729">Its error prone to mark
each method override when you are dealing with legacy code and introducin=
g
the override keyword in the existing class<u></u><u></u></span></p>
<p style=3D"font-weight:inherit;margin:0in 0in 0.0001pt 22.5pt;vertical-a=
lign:baseline;font-style:inherit;font-variant:inherit;font-stretch:inherit;=
font-size:inherit;line-height:inherit"><span style=3D"font-size:10.0pt;font=
-family:Symbol;color:#242729">=C2=B7<span style=3D"font-stretch:normal;font=
-size:7pt;line-height:normal;font-family:"Times New Roman"">=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span><span style=3D"font-size:11.5pt;font-family:inherit;color:#=
242729">You have too many override
methods<u></u><u></u></span></p>
<p style=3D"font-weight:inherit;margin:0in 0in 0.0001pt 22.5pt;vertical-a=
lign:baseline;font-style:inherit;font-variant:inherit;font-stretch:inherit;=
font-size:inherit;line-height:inherit"><span style=3D"font-size:10.0pt;font=
-family:Symbol;color:#242729">=C2=B7<span style=3D"font-stretch:normal;font=
-size:7pt;line-height:normal;font-family:"Times New Roman"">=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span><span style=3D"font-size:11.5pt;font-family:inherit;color:#=
242729">Override methods maybe
scattered around in class declaration mangled with bunch of other methods=
its
good to group them as a good practice.<u></u><u></u></span></p>
<p style=3D"font-weight:inherit;margin:0in 0in 12pt;vertical-align:baseli=
ne;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:i=
nherit;line-height:inherit"><span style=3D"font-size:11.5pt;font-family:inh=
erit;color:#242729">I am looking for something like override block using sc=
ope,
when any method is part of this block its same as writing override after =
the
method signature.<u></u><u></u></span></p>
<p style=3D"font-weight:inherit;margin:0in 0in 0.0001pt;vertical-align:ba=
seline;font-style:inherit;font-variant:inherit;font-stretch:inherit;font-si=
ze:inherit;line-height:inherit"><span style=3D"font-size:inherit;font-style=
:inherit;font-weight:inherit"><span style=3D"font-size:11.5pt;font-family:i=
nherit;color:rgb(36,39,41);border-width:1pt;border-style:none;border-color:=
windowtext;padding:0in">e.g.</span></span><span style=3D"font-size:11.5pt;f=
ont-family:inherit;color:#242729"><u></u><u></u></span></p>
<pre style=3D"font-weight:inherit;background:rgb(239,240,241);vertical-al=
ign:baseline;font-style:inherit;font-variant:inherit;font-stretch:inherit;l=
ine-height:inherit;max-height:600px;word-wrap:normal;overflow:auto"><span><=
span style=3D"font-family:inherit;color:rgb(16,16,148);border-width:1pt;bor=
der-style:none;border-color:windowtext;padding:0in">class</span></span><spa=
n><span style=3D"font-family:inherit;color:rgb(48,51,54);border-width:1pt;b=
order-style:none;border-color:windowtext;padding:0in"> derived: public base=
<u></u><u></u></span></span></pre><pre style=3D"font-weight:inherit;backgro=
und:rgb(239,240,241);vertical-align:baseline"><span><span style=3D"font-fam=
ily:inherit;color:rgb(48,51,54);border-width:1pt;border-style:none;border-c=
olor:windowtext;padding:0in">{</span></span><span><span style=3D"font-famil=
y:inherit;color:rgb(48,51,54);border-width:1pt;border-style:none;border-col=
or:windowtext;padding:0in"><u></u><u></u></span></span></pre><span style=3D=
"font-style:inherit;font-variant:inherit;font-stretch:inherit;font-size:inh=
erit;line-height:inherit"><pre style=3D"font-weight:inherit;background:rgb(=
239,240,241);vertical-align:baseline"><span><span style=3D"font-family:inhe=
rit;color:rgb(48,51,54);border-width:1pt;border-style:none;border-color:win=
dowtext;padding:0in">=C2=A0 =C2=A0</span></span><span></span><span style=3D=
"font-family:inherit;color:rgb(16,16,148);border-width:1pt;border-style:non=
e;border-color:windowtext;padding:0in"><span style=3D"font-style:inherit;fo=
nt-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inher=
it;line-height:inherit">public</span></span><span><span style=3D"font-famil=
y:inherit;color:rgb(48,51,54);border-width:1pt;border-style:none;border-col=
or:windowtext;padding:0in"><span style=3D"font-style:inherit;font-variant:i=
nherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-heig=
ht:inherit">:</span></span></span><span><span style=3D"font-family:inherit;=
color:rgb(48,51,54);border-width:1pt;border-style:none;border-color:windowt=
ext;padding:0in"><u></u><u></u></span></span></pre><span style=3D"font-styl=
e:inherit;font-variant:inherit;font-stretch:inherit;font-size:inherit;line-=
height:inherit"><pre style=3D"font-weight:inherit;background:rgb(239,240,24=
1);vertical-align:baseline"><span><span style=3D"font-family:inherit;color:=
rgb(48,51,54);border-width:1pt;border-style:none;border-color:windowtext;pa=
dding:0in"><u></u>=C2=A0<u></u></span></span></pre><pre style=3D"background=
:rgb(239,240,241);vertical-align:baseline"><span><span style=3D"font-family=
:inherit;color:rgb(48,51,54);border-width:1pt;border-style:none;border-colo=
r:windowtext;padding:0in"><span style=3D"font-weight:inherit">=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0 </span><b>override</b><span style=3D"font-weight:inherit=
"> </span></span></span><span style=3D"font-weight:inherit"><span style=3D"=
font-family:inherit;color:rgb(48,51,54);border-width:1pt;border-style:none;=
border-color:windowtext;padding:0in"><span style=3D"font-style:inherit;font=
-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit=
;line-height:inherit">{</span></span></span><span style=3D"font-weight:inhe=
rit"><span style=3D"font-family:inherit;color:rgb(48,51,54);border-width:1p=
t;border-style:none;border-color:windowtext;padding:0in"><u></u><u></u></sp=
an></span></pre><span style=3D"font-weight:inherit;font-style:inherit;font-=
variant:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit"=
><pre style=3D"background:#eff0f1;vertical-align:baseline"><span><span styl=
e=3D"font-family:inherit;color:rgb(48,51,54);border-width:1pt;border-style:=
none;border-color:windowtext;padding:0in">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0</span></span><span></span><s=
pan style=3D"font-family:inherit;color:rgb(43,145,175);border-width:1pt;bor=
der-style:none;border-color:windowtext;padding:0in"><span style=3D"font-sty=
le:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;fo=
nt-size:inherit;line-height:inherit">int</span></span><span><span style=3D"=
font-family:inherit;color:rgb(48,51,54);border-width:1pt;border-style:none;=
border-color:windowtext;padding:0in"><span style=3D"font-style:inherit;font=
-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit=
;line-height:inherit"> blah</span></span></span><span><span style=3D"font-f=
amily:inherit;color:rgb(48,51,54);border-width:1pt;border-style:none;border=
-color:windowtext;padding:0in"><span style=3D"font-style:inherit;font-varia=
nt:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-=
height:inherit">();</span></span></span><span><span style=3D"font-family:in=
herit;color:rgb(48,51,54);border-width:1pt;border-style:none;border-color:w=
indowtext;padding:0in"><u></u><u></u></span></span></pre><span style=3D"fon=
t-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inher=
it;font-size:inherit;line-height:inherit"><pre style=3D"background:#eff0f1;=
vertical-align:baseline"><span><span style=3D"font-family:inherit;color:rgb=
(48,51,54);border-width:1pt;border-style:none;border-color:windowtext;paddi=
ng:0in">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0 =C2=A0</span></span><span></span><span style=3D"font-family:in=
herit;color:rgb(16,16,148);border-width:1pt;border-style:none;border-color:=
windowtext;padding:0in"><span style=3D"font-style:inherit;font-variant:inhe=
rit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:=
inherit">void</span></span><span><span style=3D"font-family:inherit;color:r=
gb(48,51,54);border-width:1pt;border-style:none;border-color:windowtext;pad=
ding:0in"><span style=3D"font-style:inherit;font-variant:inherit;font-weigh=
t:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit"> blah=
Blah</span></span></span><span><span style=3D"font-family:inherit;color:rgb=
(48,51,54);border-width:1pt;border-style:none;border-color:windowtext;paddi=
ng:0in"><span style=3D"font-style:inherit;font-variant:inherit;font-weight:=
inherit;font-stretch:inherit;font-size:inherit;line-height:inherit">();</sp=
an></span></span><span><span style=3D"font-family:inherit;color:rgb(48,51,5=
4);border-width:1pt;border-style:none;border-color:windowtext;padding:0in">=
<u></u><u></u></span></span></pre><span style=3D"font-style:inherit;font-va=
riant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;li=
ne-height:inherit"><pre style=3D"background:#eff0f1;vertical-align:baseline=
"><span><span style=3D"font-family:inherit;color:rgb(48,51,54);border-width=
:1pt;border-style:none;border-color:windowtext;padding:0in">=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=
=A0</span></span><span></span><span style=3D"font-family:inherit;color:rgb(=
48,51,54);border-width:1pt;border-style:none;border-color:windowtext;paddin=
g:0in"><span style=3D"font-style:inherit;font-variant:inherit;font-weight:i=
nherit;font-stretch:inherit;font-size:inherit;line-height:inherit">..</span=
></span><span><span style=3D"font-family:inherit;color:rgb(48,51,54);border=
-width:1pt;border-style:none;border-color:windowtext;padding:0in"><span sty=
le=3D"font-style:inherit;font-variant:inherit;font-weight:inherit;font-stre=
tch:inherit;font-size:inherit;line-height:inherit"> and so on<u></u><u></u>=
</span></span></span></pre><pre style=3D"background:#eff0f1;vertical-align:=
baseline"><span><span style=3D"font-family:inherit;color:rgb(48,51,54);bord=
er-width:1pt;border-style:none;border-color:windowtext;padding:0in">=C2=A0=
=C2=A0=C2=A0=C2=A0 =C2=A0</span></span><span><span style=3D"font-family:inh=
erit;color:rgb(48,51,54);border-width:1pt;border-style:none;border-color:wi=
ndowtext;padding:0in"><span style=3D"font-style:inherit;font-variant:inheri=
t;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:in=
herit">}</span></span></span></pre><span style=3D"font-style:inherit;font-v=
ariant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;l=
ine-height:inherit"><pre style=3D"background:#eff0f1;vertical-align:baselin=
e"><span></span><span style=3D"font-family:inherit;color:rgb(48,51,54);bord=
er-width:1pt;border-style:none;border-color:windowtext;padding:0in"><span s=
tyle=3D"font-style:inherit;font-variant:inherit;font-weight:inherit;font-st=
retch:inherit;font-size:inherit;line-height:inherit">};</span></span><span =
style=3D"font-family:Consolas;color:#393318"><u></u><u></u></span></pre></s=
pan></span></span></span></span></span></td>
</tr>
</tbody></table>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<p class=3D"MsoNormal">The above code is supposed to be same as writing ove=
rride
after each method.<u></u><u></u></p><p class=3D"MsoNormal"><br></p><p class=
=3D"MsoNormal">Thanks</p><p class=3D"MsoNormal">Husen Jiruwala</p></div></d=
iv>
<p></p>
-- <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"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"=
HohpmrRTAAAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D'javascript:&=
#39;;return true;" onclick=3D"this.href=3D'javascript:';return true=
;">std-proposal...@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"javascript:" target=3D"_bla=
nk" gdf-obfuscated-mailto=3D"HohpmrRTAAAJ" rel=3D"nofollow" onmousedown=3D"=
this.href=3D'javascript:';return true;" onclick=3D"this.href=3D'=
;javascript:';return true;">std-pr...@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/9ec15216-718e-4733-8ae0-9e23fd223fd0%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" target=3D"_blank" =
rel=3D"nofollow" onmousedown=3D"this.href=3D'https://groups.google.com/=
a/isocpp.org/d/msgid/std-proposals/9ec15216-718e-4733-8ae0-9e23fd223fd0%40i=
socpp.org?utm_medium\x3demail\x26utm_source\x3dfooter';return true;" on=
click=3D"this.href=3D'https://groups.google.com/a/isocpp.org/d/msgid/st=
d-proposals/9ec15216-718e-4733-8ae0-9e23fd223fd0%40isocpp.org?utm_medium\x3=
demail\x26utm_source\x3dfooter';return true;">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/9ec15216-718e-4733-<wbr>8ae0-=
9e23fd223fd0%40isocpp.org</a><wbr>.<br>
</blockquote></div>
<p></p>
-- <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"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"=
HohpmrRTAAAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D'javascript:&=
#39;;return true;" onclick=3D"this.href=3D'javascript:';return true=
;">std-proposal...@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"javascript:" target=3D"_bla=
nk" gdf-obfuscated-mailto=3D"HohpmrRTAAAJ" rel=3D"nofollow" onmousedown=3D"=
this.href=3D'javascript:';return true;" onclick=3D"this.href=3D'=
;javascript:';return true;">std-pr...@isocpp.org</a>.<br></div></div>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAPCFJdRX3AHDu03Dr4GVqn4j0hybs%2B7N_m=
s0r-AScZasV7J5Hg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoote=
r" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D'https=
://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAPCFJdRX3AHDu03Dr4=
GVqn4j0hybs%2B7N_ms0r-AScZasV7J5Hg%40mail.gmail.com?utm_medium\x3demail\x26=
utm_source\x3dfooter';return true;" onclick=3D"this.href=3D'https:/=
/groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAPCFJdRX3AHDu03Dr4GV=
qn4j0hybs%2B7N_ms0r-AScZasV7J5Hg%40mail.gmail.com?utm_medium\x3demail\x26ut=
m_source\x3dfooter';return true;">https://groups.google.com/a/<wbr>isoc=
pp.org/d/msgid/std-<wbr>proposals/<wbr>CAPCFJdRX3AHDu03Dr4GVqn4j0hybs<wbr>%=
2B7N_ms0r-AScZasV7J5Hg%<wbr>40mail.gmail.com</a>.<br>
</blockquote></div><br></div></div>
</blockquote></div></div>
<p></p>
-- <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+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/3669926d-6c95-4e47-835a-ce2dd4834718%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/3669926d-6c95-4e47-835a-ce2dd4834718=
%40isocpp.org</a>.<br />
------=_Part_4800_1107891127.1498047632532--
------=_Part_4799_1600992728.1498047632531--
.