18#ifndef CORE_UBUNTU_MEDIA_VIDEO_DIMENSIONS_H_
19#define CORE_UBUNTU_MEDIA_VIDEO_DIMENSIONS_H_
67template<DimensionTag Tag,
typename IntegerType>
71 static_assert(std::is_integral<IntegerType>::value,
"IntWrapper<> only supports integral types.");
75 template<
typename AnyInteger>
78 template<
typename T = IntegerType>
81 static_assert(std::is_arithmetic<T>::value,
"as() only supports arithmetic types.");
82 return static_cast<T
>(value);
89template<DimensionTag Tag,
typename IntegerType>
92 out << value.template as<>();
96template<DimensionTag Tag,
typename IntegerType>
99 return lhs.template as<>() == rhs.template as<>();
102template<DimensionTag Tag,
typename IntegerType>
105 return lhs.template as<>() != rhs.template as<>();
108template<DimensionTag Tag,
typename IntegerType>
111 return lhs.template as<>() <= rhs.template as<>();
114template<DimensionTag Tag,
typename IntegerType>
117 return lhs.template as<>() >= rhs.template as<>();
120template<DimensionTag Tag,
typename IntegerType>
123 return lhs.template as<>() < rhs.template as<>();
126template<DimensionTag Tag,
typename IntegerType>
129 return lhs.template as<>() > rhs.template as<>();