[Issue 16519] toHexString always returns stack allocated string

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 20 15:40:45 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=16519

--- Comment #4 from anonymous4 <dfj1esp02 at sneakemail.com> ---
(In reply to Seb from comment #3)
> foo.d(8): Deprecation: slice of static array temporary returned by
> toHexString(hash) assigned to longer lived variable a
> 
> but I still think we should do something about the API.

Slicing a temporary and storing it anywhere should be deprecated in unsafe code
too. It should be valid to only pass it as a function argument.

--


More information about the Digitalmars-d-bugs mailing list