No, smart pointers are irrespective of C++ version. (Except unique_ptr, which hinges on move semantics.) C++0x just made some standard, like @Tomaka17 says. Otherwise, you'd want to look into Boost or something.

Like I said way above, though, good C++ separates usage of a resource from the management of it. It should manage itself. That's all a smart pointer does: you use it, and the smart pointer takes care of the rest.

say I have an array of type A, which has a function A::work() and A::morework() if I want to do function cahining in a loop such as anArray[i]->work()->morework() then A::work() would return an A* but what if I have B: public A that overloads A::work() should B::work() return an A* or a B*?

I'm considering use smart pointers in middle size project, where raw pointers were used all around. From your experience how much it can hurt the performance? I know I need to do profiling. But before changing thousands of SLOC, I want to know if it worth it.

@dimba It depends from the type of smart pointer; for simple ones (e.g. scoped_ptr/unique_ptr) there shouldn't be any overhead. For reference counted ones, there may be some slight overhead, but it should be the same you already have if you implemented such feature by yourself.

@dimba If you create a lot of copies of a ptr in order to pass it to funcitons etc etc then you're in danger of performance hits. If you just "store" smart-ptrs and only pass raw ptrs (or ref-to-smart-ptr) it should be better. (That's why i mostly use intrusive_ptr or shared_from_this.)

@MarcusLindblom I don't know, I wouldn't mind so much about that... after all, a new copy of a `shared_ptr` should result in just an increment of the reference counter and other lightweight stuff... yes, it's not free as a `scoped_ptr/unique_ptr`, but it's not heavy at all.

what's the general view on function names for classes, should the imply what the caller wants the to do to the class or what the class will do ie, should enemy.DealDamage() reduce the health of enemy or should it work out how much damage enemy can do

I'd like to know people's thoughts on using forward declarations vs. including headers. That is, when you have the option (so, not when you have to use a forward declaration), do you include a header or use a forward declaration?

@Dragory: IMO it defeats the whole idea of SO. We struggle to keep it a tidy place, we whine about the accept rate, the tags, the upvotes/downvotes and everything and then it's ok to throw in any big question in chat? :S

@RogerPate Well, that's my opinion, and having worked on several large projects, I've never encountered "concerning build times." But apparently there are a lot of people that are in favor of using forward declarations everywhere, and I don't understand why.

wow, for once I am actually using enum rather then making up some lame ass work around to get the same functionality with out actually using an enum. Not sure why, but I always fail to think of it as a c++ feature