The point is that you can tag a class from outside, that you can choose whether to include derived classes and especially
that no core language change is necessary.
-----Ursprüngliche Nachricht-----
Von: Frederick Virchanza Gotham via Std-Proposals <std-proposals@lists.isocpp.org>
Gesendet: Do 17.04.2025 16:42
Betreff: Re: [std-proposals] std::arithmetic (concept)
An: std-proposals@lists.isocpp.org;
CC: Frederick Virchanza Gotham <cauldwell.thomas@gmail.com>;
On Thu, Apr 17, 2025 at 12:17 PM Sebastian Wittmeier wrote:
>
> template <typename T>
> requires std::is_base_of_v<MyString, std::remove_cvref_t<T>>
> constexpr bool enable_arithmetic<T> = true;
Not sure what point you're making here other than to say that there's
half a dozen ways of 'tagging' a class. I'm least keen on the strategy
of using an empty base class as a tag, however it might have benefits
when it comes to dynamic_cast.
--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals