Hello,
a Boost newbie question:
Arch: PPC, OS: Mac OS X 10.4.10, Compiler: GCC 4.0.1
In a C++ dynamic library, I'm just developing, I have:
#include
namespace MyNameSpace
{
typedef boost::shared_ptrstd::string StringPtr;
}
I get the following warning:
/usr/local/include/boost/shared_ptr.hpp: In instantiation of
'boost::shared_ptrstd::string':
/Volumes/blablabla/MyClass.cpp:81: instantiated from here
/usr/local/include/boost/shared_ptr.hpp:131: warning: 'class
boost::shared_ptrstd::string' has pointer data members
/usr/local/include/boost/shared_ptr.hpp:131: warning: but does not
override 'boost::shared_ptrstd::string(const
boost::shared_ptrstd::string&)'
The incriminated line in MyClass.cpp is the second line here:
__attribute__((visibility("default")))
MyNameSpace::StringPtr MyClass::myFunction() const
{
/* .......... */
}
I have experienced the same with classes of my own instead of
std::string, i.e. with
typedef boost::shared_ptr<MyOtherClass> MyOtherClassPtr;
etc.
May be it's just me, but the boost documentation and Google don't help.
Can I ignore the warnings or should I do something?
Thanks in advance
Klaus