
On Mon, Aug 15, 2011 at 7:22 PM, Gordon Woodhull <gordon@woodhull.com> wrote:
If you still have the container type at the place where you're trying to deduce is_continuous, I think that would be the way to go.
Unfortunately I don't have access to the container type, because my iterator comes from any boost.range compatible type. I'm doing something along the lines of /** Some policy */ struct error { /** Test if range iterator can be handled like a pointer to continuous memory */ template<class Range> inline bool operator()(const Range &r) const { // If your compiler traps here, you probably used the memory_policies::error // policy and failed to supply an appropriate is_continuous_in_memory for your // range argument. BOOST_STATIC_ASSERT((is_continuous_in_memory<boost::range_iterator<Range>::type>::value)); return true; } }; Best regards, Christoph