Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2006-06-12 09:35:12


Malte Clasen <news_at_[hidden]> writes:

> Hi,
>
> I usually use shared_ptrs to const as function parameters, such as
> boost::shared_ptr<const A>, to explicitly state that this function does
> not modify the pointee. Now I'm trying to do the same in boost.python:
>
<snip>

> Is there a way to use the automatic conversion from A to const A in
> boost.python?

You might try:

    implicitly_convertible<shared_ptr<A>, shared_ptr<const A> >();

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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