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.