Boost logo

Boost Users :

From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2007-01-19 16:04:29


A while back there was discussion of detecting smart pointers. The
discussion started with Ovanes Markarian

Date: Thu, 22 Jun 2006 19:19:07 +0200 (CEST)
From: "Ovanes Markarian" <om_boost_at_[hidden]>
Subject: [Boost-users] inspecting templates and boost::is_pointer
To: boost-users_at_[hidden]
Message-ID:
        <41230.194.138.18.132.115099674
>
> 7.squirrel_at_[hidden]>
> Content-Type: text/plain;charset=iso-8859-1
>
> Hello all,
>
> I am trying to specialize boost::is_pointer so, that it can determine if a
> type is a pointer
> wrapper (shared_ptr, auto_ptr, weak_ptr).

.....

And, first off, yes, we now know that expanding is_pointer would be bad. So,
instead we want 'is_pointer_like' or something like that.
There were suggestions regarding detecting operator->() and/or unary
operator *().

What ever came of this? I am asking, of course, because I could really use
an 'is_pointer_like<>' or 'is_smart_ptr' right now.

And if it is still unsolved, I've got 2 more suggestions:

detecting that boost::get_pointer() (for boost::bind) has been defined,
and/or
just looking for some common internals of the smart_ptrs (hack!) - or adding
some common internal typedef/value - ie T::is_smart_pointer.

Thanks,
Tony



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