Change hardcoded std::size_t into size_type so it can be customised.

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.
This commit is contained in:
King_DuckZ 2016-11-02 03:41:03 +01:00
parent c3844dc246
commit 00470290fe
6 changed files with 88 additions and 66 deletions

View file

@ -62,7 +62,7 @@ namespace vwr {
typedef float scalar_type;
typedef SimpleVector2 higher_vector_type;
static scalar_type& get_at (std::size_t, vector_type& parVector) {
static scalar_type& get_at (size_type, vector_type& parVector) {
return parVector;
}
};