Given the following: class Curve { public: typedef boost::shared_ptr<Curve> Pointer; // ... private:
I\'m implementing several classes using the pimpl idiom and am coming across some design issues. Firstly, I\'ve always seen pimpl done like this
I am having a base class and i want to convert its this pointer to its derived class shared_ptr. I can`t use inheriting enable_shared_from_this in my case. So is there any other efficient way around?
Has anyo开发者_StackOverflow社区ne tested this in release mode builds? Or are the implementations so similar there\'s no significant difference?
Consider the following code: class B { int x; public: B() : x( 10 ) {} int get_x() const { return x; } void set_x( int value ) { x = value; }
I have several objects which share a data via a pointer. The pointer parameter was sent via in the constructor functions, as follows.
Consider the following code #include <boost/unordered_set.hpp> #include <boos开发者_开发问答t/shared_ptr.hpp>
Please consider the following piece of code: int main() { typedef boost::ptr_vector<int> ptr_vector;
boost::shared_polymorphic_downcast and the other boost::shared_ptr functions reside in <boost/shared_ptr开发者_StackOverflow中文版.hpp>
I would like to enable support for C++0x in GCC with -std=c++0x. I don\'t absolutely necessarily need any of the currently supported C++11 features in GCC 4.5 (and soon 4.6), but I would like to start