Why emsi containers have @disabled this(this) ?

Luis luis.panadero at gmail.com
Tue May 19 20:51:01 UTC 2020


So, I'm writing my own implementation of sparse sets, and I take 
as reference emsi_containers for allocator usage. I saw that they 
have disabled postblit operator... But i don't understand exactly 
why. In special, when they implement InputRange over the 
containers, but having disabled postblit, make nearly useless (at 
least as I see on this old post 
https://forum.dlang.org/thread/n1sutu$1ugm$1@digitalmars.com?page=1 )

Taking a look to std.container.array, I see that it have postblit 
disabled, but here the range interface isn't implemented. Instead 
it's recommended to do a slice, where apply range algorithms.

I should take this way (ie. forgot to implement front and 
popFront)? I actually have postblit disabled and implemented 
InputForward, but as I say, this make it useless as range. I 
need, like std.container.array, to use slice for do a foreach or 
any range algorithm.


More information about the Digitalmars-d-learn mailing list