deprecated enum and to!string warnings

Vladimirs Nordholm v at vladde.net
Mon Nov 19 21:15:22 UTC 2018


On Monday, 19 November 2018 at 21:03:31 UTC, Jonathan M Davis 
wrote:
> On Monday, November 19, 2018 12:47:44 PM MST Vladimirs Nordholm 
> via Digitalmars-d wrote:
>> [...]
>
> You're going to get a deprecation message every time baz is 
> used, and in order for to!string to do its thing, it uses it in 
> a bunch of places internally. Glancing at the output there, it 
> does look like the messages are doubled up for some reason, 
> with each line being listed twice, which is a bit odd, and I'd 
> have to do some digging to see why that is happening, but the 
> fact that you're getting multiple deprecation messages is not 
> surprising considering that you're compiling a templated 
> function that is using a deprecated symbol. If you were calling 
> a non-templated function, then you would just get a deprecation 
> message at the call point, but you're calling a templated 
> function that's then doing type introspection on the deprecated 
> symbol, so it refers to it a lot internally.
>
> [...]

Thank you for your answer Jonathan.

And yes, I realised after posting that D.Learn would be a better 
place for this type of question. Will keep this in mind until 
next time :-)

Best regards,
Vladimirs Nordholm


More information about the Digitalmars-d mailing list