C++ Logo

std-proposals

Advanced search

Re: [std-proposals] std::arithmetic (concept)

From: Sebastian Wittmeier <wittmeier_at_[hidden]>
Date: Thu, 17 Apr 2025 17:48:18 +0200
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_at_[hidden]> Gesendet:Do 17.04.2025 16:42 Betreff:Re: [std-proposals] std::arithmetic (concept) An:std-proposals_at_[hidden]; CC:Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>; 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_at_[hidden] https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2025-04-17 15:54:37