intrusive

Is there a way to increase the efficiency of shared_ptr by storing the reference count inside the controlled object?

Hello everyone :) This is becoming a common pattern in my code, for when I need to manage an object that needs to be noncopyable because either A. it is "heavy" or B. it is an operating system resource, such as a critical section: class Resource; class Implementation : public boost::noncopyable { friend class Resource; HANDLE ...

using intrusive containers to tokenize a wide c string

I was wondering if I could tokenize my string (lpcwszBuffer) using boost::tokenizer without making a copy of the string. I heard about using intrusive containers to avoid giant memory footprints, but I'm not really sure if it's applicable here. If I was unclear, here's what I mean: size_t Tokenize(const wchar_t* lpcwszBuffer, boost::sc...