On 12/17/21 1:57 AM, bauss wrote:

> You can also do it as a normal template:
>
> ```d
> template is_same(alias value, T)
> {
>      enum is_same = is(typeof(value) == T);
> }
> ```

And even shorter by realizing that it's an eponymous template:

enum is_same(alias value, T) = is(typeof(value) == T);

Ali

Reply via email to