static assert("nothing")

Andrea Fontana nospam at example.com
Tue May 31 10:08:07 UTC 2022


On Tuesday, 31 May 2022 at 09:52:10 UTC, realhet wrote:
> On Tuesday, 31 May 2022 at 09:35:30 UTC, Andrea Fontana wrote:
>> On Tuesday, 31 May 2022 at 08:51:45 UTC, realhet wrote:
>> Check if that string is init.
>
> assert("", "cool");
> assert("ehh", "cool");
> assert(string.init, "Not cool");
>
> I feel some "JavaScript equality operator" vibes in this :D
> Anyways, I will be extra careful with these.

assert(string.init is null) is the answer :)


More information about the Digitalmars-d-learn mailing list