template <int IntBits, FPOverflowHandling OverflowHandling>
struct NumericTraits<FixedPoint16<IntBits, OverflowHandling> >
{
typedef FixedPoint16<IntBits, OverflowHandling> Type;
typedef Type Promote;
typedef Type ValueType;
typedef VigraFalseType isIntegral;
typedef VigraTrueType isScalar;
typedef VigraTrueType isSigned;
typedef VigraTrueType isOrdered;
typedef VigraFalseType isComplex;
...
};
template <int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2>
struct PromoteTraits<FixedPoint16<IntBits1, OverflowHandling>,
FixedPoint16<IntBits2, OverflowHandling> >
{
typedef FixedPoint16<MetaMax<IntBits1, IntBits2>::value, OverflowHandling> Promote;
...
};
template <int IntBits, FPOverflowHandling OverflowHandling>
struct NormTraits<FixedPoint16<IntBits, OverflowHandling> >
{
typedef FixedPoint16<IntBits, OverflowHandling> Type;
typedef typename PromoteTraits<Type, Type>::Promote SquaredNormType;
typedef Type NormType;
};
template <int IntBits, FPOverflowHandling OverflowHandling>
struct SquareRootTraits<FixedPoint16<IntBits, OverflowHandling> >
{
typedef FixedPoint16<IntBits, OverflowHandling> Type;
typedef FixedPoint16<(IntBits + 1) / 2, OverflowHandling> SquareRootResult;
typedef Type SquareRootArgument;
};