On Thu, Jun 21, 2012 at 6:41 AM, Jeff Flinn <Jeffrey.Flinn@gmail.com> 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