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 · Its error prone to mark each method override when you are dealing with legacy code and introducing the override keyword in the existing class · You have too many override methods · Override methods maybe scattered around in class declaration 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 method 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-proposal...@isocpp.org.
To post to this group, send email to std-pr...@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9ec15216-718e-4733-8ae0-9e23fd223fd0%40isocpp.org.
`override` is a contextual keyword; this won't fly.
On Wed, Jun 21, 2017 at 12:42 PM husain jiruwala <husai...@gmail.com> wrote:
Hi--
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
· Its error prone to mark each method override when you are dealing with legacy code and introducing the override keyword in the existing class
· You have too many override methods
· Override methods maybe scattered around in class declaration 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 method 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-pr...@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9ec15216-718e-4733-8ae0-9e23fd223fd0%40isocpp.org.
--
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 view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAPCFJdRX3AHDu03Dr4GVqn4j0hybs%2B7N_ms0r-AScZasV7J5Hg%40mail.gmail.com.
On 21 June 2017 at 14:34, Michał Dominiak <gri...@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.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposal...@isocpp.org.
To post to this group, send email to std-pr...@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9ec15216-718e-4733-8ae0-9e23fd223fd0%40isocpp.org.
--
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-proposal...@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAPCFJdRX3AHDu03Dr4GVqn4j0hybs%2B7N_ms0r-AScZasV7J5Hg%40mail.gmail.com.
--
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-proposal...@isocpp.org.
To post to this group, send email to std-pr...@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAFk2RUa7i%3DmDe6_X2C8%2BMtgARe4toQrsd0zOoprpf8CK38Za8Q%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposal...@isocpp.org.
To post to this group, send email to std-pr...@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9ec15216-718e-4733-8ae0-9e23fd223fd0%40isocpp.org.
--
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-proposal...@isocpp.org.