C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] Specific Override Specifier
From: Michał Policht (michal_at_[hidden])
Date: 2020-03-19 11:31:00


Or... One could think about extending existing `using` syntax to allow
for aliasing of not only types [1]

```
class A: public B, public C
{
        using lock_mutex = B::lock;
        using lock_device = C::lock;

        int lock_mutex() override;
        int lock_device() override;
}
```

^^
Maybe above scenario should be shown in the proposal.

[1]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0945r0.html

Regards
Michał

> I would suggest a better syntax would reuse the = operator as used in
> constructors now:
>
> virtual int lock_mutex() = int B::lock();
> virtual int lock_device() = int C::lock();
>
>


STD-PROPOSALS list run by herb.sutter at gmail.com

Standard Proposals Archives on Google Groups