
15 Aug
2011
15 Aug
'11
5:22 p.m.
On Aug 15, 2011, at 6:13 AM, Christoph Heindl
template<class T> struct is_contingous_in_memory< typename std::vector<T>::iterator > : boost::mpl::true_ {};
I've gotten bitten by this. You can't put a type nesting into a partial specialization pattern because e.g. the compiler can't infer that the iterator type T* came from a vector. You've already lost the container information at that point; T* could be the ::iterator of any number of classes. Seems like the error message could be more helpful! 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. (Apologies if my terminology is a little off; hope this gets the idea across.) Cheers Gordon