I’ve added the -std=c++0x flag via the VisualGDB Project Properties dialog in CFGLAGS to utilize the smart pointers such as shared_ptr. That gave me access to the std::shared_ptr all right, and I can define a smart pointer like this:
class CQueueData
{
public:
CQueueData(void);
virtual ~CQueueData(void);
virtual std::string getContentType();
};
typedef std::shared_ptr qd_ptr;
I can define variables using this qd_ptr, and it compiles. If I want to reference a member of CQueueData through the shared_ptr like this
void CRaceSvr::ok(int child_socket, qd_ptr dat)
{
... dat.getContentType() ...
}
I get the error:
class std::shared_ptr' has no member named 'getContentType'
If I reference it as
dat->getContentType()
, the error is
'qd_ptr' has no member named 'getContentType'
What is wrong?
note:
build system: Windows 7 / VS2010 / RaspberryPi
complete CFLAGS: -ggdb -ffunction-sections -O0 -std=c++0x