This header defines the scalar_traits template which can be specialized to register user-defined scalar types into Boost QVM.
#include <boost/qvm/scalar_traits.hpp>
namespace boost
{
namespace qvm
{
template <class Scalar>
struct scalar_traits
{
BOOST_QVM_INLINE_CRITICAL
static Scalar value( int v )
{
return Scalar(v);
}
};
template <class T>
struct scalar
{
typedef /*exact definition unspecified*/ type;
};
}
}