Skip to content

Extend traits to include VectorSpace tests and wrapped access to pTraits static members

Mark OLESEN requested to merge feature-pTraits-vectorspace into develop

In several places need to check pTraits<Type>::nComponents and/or pTraits<Type>::rank (eg, to decide if transforms are required).
This works well until confronted with an arbitrary type for which no pTraits exists and which doesn't have its own corresponding static members.

Use SFINAE templating to provide new trait tests:

  • pTraits_rank
  • pTraits_nComponents
  • pTraits_has_zero
  • is_vectorspace
Edited by Mark OLESEN

Merge request reports