Multiple versions of the same library can't be used in the same
project because even tho project take care to include from
the right vectorwrapper-1.0/ dir the inclusion guard is the
same. So in spite of having a different path and livingi in a
different namespace, ifndef is preventing the inclusions to work.
This is useful when vwr is used and publicly exposed in a
library. If both the library and the standalone project depend
on vwr, this change gives the user the opportunity to keep the
two usages separate. This is especially important if both the
library and the standalone program happen to specialize the
Info template for the same type.
Define VWR_SIZE_TYPE to the type you want to use as the template
index type. It defaults to std::size_t so if you don't do anything
you still get the old behaviour.
Also drop the std::index_range in vector_cast in favour of the custom
bt::number_range, which is already used elsewhere in the code.
Casting conditions got clarified.
User is now able to say he doesn't care if casting a wrapper on a
type larger than just the coordinates will stomp on extra data
from the casted type.
Add vector_type to is_vec, because vector_type is private
and it couldn't be used in cast. Besides if not is_vec, you can't
expect to find vector_type. The conditional in the cast return type
works like if V2 is not a Vec, you can just use V as the vector_type,
anyways the first is_vec is false so the whole condition is going to
be false anyways, even if it results that V == V.