Boost logo

Boost Users :

Subject: Re: [Boost-users] [range] indirected requirements for custom smart pointer
From: Jeffrey Lee Hellrung, Jr. (jeffrey.hellrung_at_[hidden])
Date: 2012-06-21 12:58:31


On Thu, Jun 21, 2012 at 6:41 AM, Jeff Flinn <Jeffrey.Flinn_at_[hidden]> wrote:

> Using boost::adaptors::indirected with a custom templated smart pointer
> failed compilation due to missing MyCustomSmartPointer::element_**type
> typedef. Indeed supplying this typedef, all compiles and tests run.
>
> Is this the canonical approach to making a compatible pointer type usable
> with range? Is this specific to range only? Will this make my custom smart
> pointer 'more' compatible with other boost/std facilities?
>

My guess is "yes", based on

http://www.boost.org/doc/libs/1_49_0/libs/iterator/doc/pointee.html

I'm guessing the pointee and indirect_reference metafunctions are what
indirected_range uses to infer its value_type and
reference/const_reference. But, to be sure, one would have to check the
code.

- Jeff



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