range: add convenience typedefs
This commit is contained in:
parent
f77cb9d1d8
commit
c29be43fd1
@ -21,9 +21,9 @@
|
||||
#ifndef __UTIL_RANGE_HPP
|
||||
#define __UTIL_RANGE_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
namespace util {
|
||||
/**
|
||||
* Represents a continuous range of values. Contains convenience functions
|
||||
@ -87,6 +87,12 @@ namespace util {
|
||||
};
|
||||
|
||||
|
||||
// convenience typedefs
|
||||
typedef util::range<float> rangef;
|
||||
typedef util::range<uintmax_t> rangeu;
|
||||
typedef util::range<intmax_t> rangei;
|
||||
|
||||
// ostream operators
|
||||
template <typename T>
|
||||
std::ostream&
|
||||
operator <<(std::ostream &os, const range<T> &rhs) {
|
||||
|
Loading…
Reference in New Issue
Block a user