|
Boost Users : |
Subject: Re: [Boost-users] shared_ptr problem
From: Tim Burgess (tim_at_[hidden])
Date: 2013-07-26 08:57:24
Jeff,
I'll have a dig and see what I can turn up based on your suggestions - many
thanks. I should explain that it's a bit tricky being sure of the contents
of the Issue Navigator, as I'm a blind programmer and XCode's current
support for the VoiceOver accessibility application is a bit hit-and-miss at
times.
Best wishes.
Tim Burgess
Raised Bar Ltd.
-----Original Message-----
From: Boost-users [mailto:boost-users-bounces_at_[hidden]] On Behalf Of
Jeff Flinn
Sent: 25 July 2013 13:39
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] shared_ptr problem
On 7/24/2013 6:02 PM, Tim Burgess wrote:
> Hi,
>
> I'm developing an application for Windows and Mac. My source compiles
> and links fine, but I'm having a problem when building the code on the
> Mac (OSX 10.8 Mountain Lion, Xcode 4.6 using GCC). The contents of the
> Issue Navigator are shown below:
>
> SurfaceReader Group
>
> /Users/tim/developer/libraries/boost_1_54_0/boost/smart_ptr/make_share
> d_object.hpp
>
>
/Users/tim/developer/libraries/boost_1_54_0/boost/smart_ptr/make_shared_obje
ct.hpp:711:
> error: no matching function for call to 'AppConfig::AppConfig(const
> boost::shared_ptr<AppConfig>&)'
>
>
/Users/tim/developer/libraries/boost_1_54_0/boost/smart_ptr/make_shared_obje
ct.hpp:711:
> error: no matching function for call to
> 'SurfaceProtocol::SurfaceProtocol(const
> boost::shared_ptr<SurfaceProtocol>&)'
>
>
/Users/tim/developer/libraries/boost_1_54_0/boost/smart_ptr/make_shared_obje
ct.hpp:711:
> error: no matching function for call to 'RBSpeech::RBSpeech(const
> boost::shared_ptr<RBSpeech>&)'
>
> I'm using shared_ptr in about half the modules in my application and,
> given that the above output doesn't refer to compilation errors in
> particular modules of mine, I'm confused as to how to track this issue
> down. Obviously, the issue has something to do with the constructors
> for my AppConfig, SurfaceProtocol and RBSpeech classes, but these
> don't cause any problems under Windows/VS2010 and only the RBSpeech
> class has any Mac-specific code blocks.
There's probably more error output that's been filtered by the 'Issue
Navigator' that shows what code of yours triggered the errors. I don't
regularly use XCode 4 yet, so I'm not sure how to get the full compile error
text.
Are there ctors taking non-const shared_ptr's for the above classes? If so
I'd look for the make_shared<AppConfig> calls in the cpp file being compiled
that trigger the above errors. Are the shared_ptr args being supplied as the
result of in-place function calls return rvalues? VS
allow(s|ed) binding of rvalues to non-const reference args. You may need to
create named temporary shared_ptr's and pass those as args.
Jeff
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
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