range: add convenience typedefs

This commit is contained in:
Danny Robson 2015-02-20 21:53:16 +11:00
parent f77cb9d1d8
commit c29be43fd1

View File

@ -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) {