What about option C
: A mathematical vector with a sparse interface in a namespace that provides free-functions such as Cross
that accept any vector you wish but throws an exception if it doesn't meet pre-conditions?
See also one of the fine books at the SO book list: http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-listhttps://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list