range: correct the ostream operator template variable refs
This commit is contained in:
parent
4250e71d6e
commit
252a870a22
16
range.cpp
16
range.cpp
@ -169,6 +169,22 @@ cruft::range<T>::operator ==(const cruft::range<T> &rhs) const
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
template <typename T>
|
||||
std::ostream&
|
||||
cruft::operator <<(std::ostream &os, const range<T> &rhs) {
|
||||
os << '[' << rhs.lo << ", " << rhs.hi << ']';
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
template std::ostream& cruft::operator<< (std::ostream&, range<int> const&);
|
||||
template std::ostream& cruft::operator<< (std::ostream&, range<long> const&);
|
||||
template std::ostream& cruft::operator<< (std::ostream&, range<unsigned int> const&);
|
||||
template std::ostream& cruft::operator<< (std::ostream&, range<unsigned long> const&);
|
||||
template std::ostream& cruft::operator<< (std::ostream&, range<float> const&);
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
template <typename T>
|
||||
void
|
||||
|
15
range.hpp
15
range.hpp
@ -3,17 +3,15 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* Copyright 2010-2015 Danny Robson <danny@nerdcruft.net>
|
||||
* Copyright 2010-2020 Danny Robson <danny@nerdcruft.net>
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __UTIL_RANGE_HPP
|
||||
#define __UTIL_RANGE_HPP
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <ostream>
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
#include <iosfwd>
|
||||
|
||||
namespace cruft {
|
||||
/**
|
||||
@ -119,10 +117,5 @@ namespace cruft {
|
||||
// ostream operators
|
||||
template <typename T>
|
||||
std::ostream&
|
||||
operator <<(std::ostream &os, const range<T> &rhs) {
|
||||
os << '[' << rhs.min << ", " << rhs.max << ']';
|
||||
return os;
|
||||
}
|
||||
operator <<(std::ostream &os, const range<T> &);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user