#Is it safe to return the address of a local comptime variable?

1 messages · Page 1 of 1 (latest)

ruby lion
#

Const things go in read only memory once you compile stuff.

#

They arent "local variables" in that sense.

echo idol
#

more specifically: comptime doesn't have lifetimes, everything will always exist (until you lose a reference to it)

ruby lion
#

inside of functions they technically might not be. So you can detail them as comptime just to be safe.

#

To make sure you don't bork up your code later.