19 #ifndef MIR_INT_WRAPPER_H_
20 #define MIR_INT_WRAPPER_H_
26 template<
typename Tag,
typename ValueType=
int>
39 template<
typename Tag,
typename ValueType>
40 std::ostream& operator<<(std::ostream& out, IntWrapper<Tag,ValueType>
const& value)
42 out << value.as_value();
46 template<
typename Tag,
typename ValueType>
52 template<
typename Tag,
typename ValueType>
58 template<
typename Tag,
typename ValueType>
61 return lhs.
as_value() <= rhs.as_value();
64 template<
typename Tag,
typename ValueType>
70 template<
typename Tag,
typename ValueType>
73 return lhs.
as_value() < rhs.as_value();
80 template<
typename Tag,
typename ValueType>
86 return self(
id.as_value());
91 #endif // MIR_INT_WRAPPER_H_
bool operator==(IntWrapper< Tag, ValueType > const &lhs, IntWrapper< Tag, ValueType > const &rhs)
Definition: int_wrapper.h:47
ValueType as_value() const
Definition: int_wrapper.h:33
IntWrapper()
Definition: int_wrapper.h:30
bool operator>=(IntWrapper< Tag, ValueType > const &lhs, IntWrapper< Tag, ValueType > const &rhs)
Definition: int_wrapper.h:65
IntWrapper(ValueType value)
Definition: int_wrapper.h:32
bool operator!=(IntWrapper< Tag, ValueType > const &lhs, IntWrapper< Tag, ValueType > const &rhs)
Definition: int_wrapper.h:53
Definition: int_wrapper.h:27
std::size_t operator()(::mir::IntWrapper< Tag, ValueType > const &id) const
Definition: int_wrapper.h:84