std.container.RedBlackTree versus C++ std::set
monarch_dodra
monarchdodra at gmail.com
Thu Feb 14 02:52:27 PST 2013
On Thursday, 14 February 2013 at 10:44:22 UTC, Namespace wrote:
>> Another good balance are stack based struct pointer wrappers
>> to implementation : You can pass them by value, but they carry
>> a complex payload.
>
> I'm not sure what that is.
> Can you give a small example?
struct S
{
static struct Payload
{
//Tons of data here
}
Payload* _p;
//fonctions
}
Ref counted is implemented that way. most of the containers are
also implemented that way. associative arrays are also
implemented that way under the hood.
More information about the Digitalmars-d-learn
mailing list