C++ Logo

std-proposals

Advanced search

Re: Specific Override Specifier

From: Michał Policht <michal_at_[hidden]>
Date: Thu, 19 Mar 2020 19:51:55 +0100
> I would go the other way around:
>
> using B::lock = lock_mutex();
>

1. You should remain consistent with the rest of the language (i.e. type
aliases).
2. Assigning it the other way around is confusing, because it suggests
that you
modify `B::lock`.

> Also, the I believe the parameters need to be included if not the return
> type.

That should be a separate proposal - addressing `using` declarations.

>
> Or better,
>
> using override B::lock = lock_mutex();
>
> Or maybe
>
> using B::lock override = lock_mutex();
>
> As the last one might have less syntax conflict potential. Could "using
> override X = Y;" cause a conflict? I prefer the first version if not.
>

IDK why do you want to put `override` there, if you can override aliased
function with normal syntax.


Regards,
Michał

Received on 2020-03-19 13:54:45