C++ Logo

std-proposals

Advanced search

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

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Thu, 17 Apr 2025 15:42:04 +0100
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.

Received on 2025-04-17 14:42:17