#include <boost/qvm/deduce_quat.hpp>
namespace boost
{
namespace qvm
{
template <class Q>
struct deduce_quat
{
typedef Q type;
};
}
}
is_quat<Q>::value is true.
This template is used by Boost QVM whenever it needs to deduce a copyable quaternion type from a single user-supplied function parameter of quaternion type. Note that Q itself may be non-copyable.
The main template definition returns Q, which means that it is suitable only for copyable quaternion types. Boost QVM also defines (partial) specializations for the non-copyable quaternion types it produces. Users can define other (partial) specializations for their own types.
A typical use of the deduce_quat template is for specifying the preferred quaternion type to be returned by the generic function template overloads in Boost QVM depending on the type of their arguments.