|
Boost Users : |
From: Klaus Backert (Klaus.Backert_at_[hidden])
Date: 2007-10-16 14:47:56
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 <boost/shared_ptr.hpp>
namespace MyNameSpace
{
typedef boost::shared_ptr<std::string> StringPtr;
}
I get the following warning:
/usr/local/include/boost/shared_ptr.hpp: In instantiation of
'boost::shared_ptr<std::string>':
/Volumes/blablabla/MyClass.cpp:81: instantiated from here
/usr/local/include/boost/shared_ptr.hpp:131: warning: 'class
boost::shared_ptr<std::string>' has pointer data members
/usr/local/include/boost/shared_ptr.hpp:131: warning: but does not
override 'boost::shared_ptr<std::string>(const
boost::shared_ptr<std::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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net