Boost logo

Boost Users :

Subject: Re: [Boost-users] shared_ptr and Visual Studio 2008 Express SP1
From: Sergey Sadovnikov (flex_ferrum_at_[hidden])
Date: 2008-11-05 13:25:43

Hello, John.

Wednesday, November 5, 2008 at 7:37:00 PM you wrote:

JM> Nothing unusual about that: you have two different shared_ptr's visible in
JM> scope: boost::shared_ptr and std::tr1::shared_ptr. You need to decide which
JM> you intend to use and either prefix all shared_ptr usages with the
JM> appropriate qualifiers, or else just take care to only import the one
JM> shared_ptr in the first place.

I understand what I have two visible versions of shared_ptr. And in my
code I exclude all "boost/shared_ptr.hpp" inclusions. But what I have
to do with boost headers such as
"date_time/gregorian/greg_month.hpp" which also include shared_ptrs?
I understand, what 'using' is quite dangerous directive, but I use it
only in implementation files and never in headers. It makes source
code more shortly and readable. Just compare:

std::tr1::placeholders::_1, /* ... */);


bind(&shared_ptr<SomeType>::get, _1);

:) In the first case code semantic hidden under fully-qualified names.

Best Regards,
 Sergey                          mailto:ssadovnikov_at_[hidden]

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at