8 Oct
2014
8 Oct
'14
2:03 p.m.
Le 8 oct. 2014 à 15:41, Joaquin M Lopez Munoz
Joaquin M Lopez Munoz
writes: With pointer-like semantics, you have
flyweight<foo> f; flyweight
g; f->x=0; // OK g->x=0; // error
This is again a bad example because stored elements are treated as const :-) Consider instead
std::cout<<f->x; std::cout<<g->x;
for instance. You get the idea, anyway.
Yes, I think this time I see what you mean. You're proposing boost::flyweightstd::string s("foo"); std::cerr << s->size() << std::endl; to make sense, right?