Boost logo

Boost :

Subject: Re: [boost] [smart_ptr] shared_ptr template type
From: John Bytheway (jbytheway+boost_at_[hidden])
Date: 2009-07-14 17:42:21

Zachary Turner wrote:
> On Tue, Jul 14, 2009 at 1:40 PM, Frank Mori Hess<frank.hess_at_[hidden]> wrote:
>> So, before I spend any more time on it, is this something worth pursuing
>> further as far as boost goes? Does it stand any chance of making it into the
>> smart_ptr library? Is there a silent majority out there who thinks this is a
>> worthwhile idea, or is it just me? I might even settle for a vocal
>> minority :)
> I would use the heck out of something like this. However I was
> disappointed to see in the comments that the null_value member was
> replaced by a search for a free function lookup. If traits are going
> to be supported at all, I think they should be supported first-class,
> and allow one to just parameterize the class with a traits class to
> begin with.

It's interesting you should say that, because I have had exactly the
reverse experience. I find free function overloads much superior to
traits classes for simple things like this. For example, I think
boost::hash is better than std::hash because it uses a free function and
ADL to find the hashes of my classes. The main advantage is the
possibility of using enable_if which allows one function overload to
apply to many classes. Can you be more explicit about the problems you
have had?

John Bytheway

Boost list run by bdawes at, gregod at, cpdaniel at, john at