My Little Dustmite: Bisect is Magic
Ethan
gooberman at gmail.com
Sat Jul 27 22:22:57 UTC 2019
On Saturday, 27 July 2019 at 22:19:20 UTC, Bastiaan Veelo wrote:
> If continuing is desired, would a `static if` combined with
> `pragma (msg, ...)` not be more appropriate than `static
> assert`? This can probably go into a ct function like
> `static_check`.
>
> Bastiaan.
I was considering making that point myself. The static assert
here is kinda useless, a pragma( msg ) won't stop compilation.
This is in that weird <non-PC word> area that people keep
bringing up. The recommended course of development with templates
is to static assert with your own handy error message. The
reality is that you lose vital information about why that
template is not instantiating unless you litter your code with
static ifs and pragma( msg )s.
More information about the Digitalmars-d
mailing list