Cannot make my shared PureMallocator callable in pure functions

rikki cattermole rikki at cattermole.co.nz
Sat Feb 17 12:52:45 UTC 2018


On 17/02/2018 12:48 PM, Nordlöw wrote:
> On Saturday, 17 February 2018 at 12:35:00 UTC, rikki cattermole wrote:
>>> in pure functions?
>>
>> pure means no globals. As in none :)
> 
> I don't understand.
> 
> I thought std.experimental.allocators API was designed to be able 
> express these needs, @andralex?

Library code cannot change the language.

pure functions cannot access globals period, it does not matter what you 
write. Its a hard limit. You simply don't want pure here.


More information about the Digitalmars-d-learn mailing list