C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] Specific Override Specifier
From: Michał Policht (michal_at_[hidden])
Date: 2020-03-19 13:51:55


> 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ł


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

Standard Proposals Archives on Google Groups