pascal: move ostream operators to util namespace
This commit is contained in:
parent
3c57e6b6c7
commit
b442db41ec
17
pascal.cpp
17
pascal.cpp
@ -101,22 +101,25 @@ parray<T>::cend (void) const {
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
template <typename T>
|
template <typename T>
|
||||||
std::ostream&
|
std::ostream&
|
||||||
operator<< (std::ostream &os, parray<T> p) {
|
util::operator<< (std::ostream &os, parray<T> p) {
|
||||||
os << "[" << p.size << ", " << std::hex << p.data << std::dec << "]";
|
os << "[" << p.size << ", " << std::hex << p.data << std::dec << "]";
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template std::ostream& operator<< (std::ostream&, parray<uint16_t>);
|
template std::ostream& util::operator<< (std::ostream&, parray<uint16_t>);
|
||||||
template std::ostream& operator<< (std::ostream&, parray<uint32_t>);
|
template std::ostream& util::operator<< (std::ostream&, parray<uint32_t>);
|
||||||
template std::ostream& operator<< (std::ostream&, parray<uint64_t>);
|
template std::ostream& util::operator<< (std::ostream&, parray<uint64_t>);
|
||||||
|
|
||||||
template std::ostream& operator<< (std::ostream&, parray<const uint16_t>);
|
template std::ostream& util::operator<< (std::ostream&, parray<const uint16_t>);
|
||||||
template std::ostream& operator<< (std::ostream&, parray<const uint32_t>);
|
template std::ostream& util::operator<< (std::ostream&, parray<const uint32_t>);
|
||||||
template std::ostream& operator<< (std::ostream&, parray<const uint64_t>);
|
template std::ostream& util::operator<< (std::ostream&, parray<const uint64_t>);
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
namespace util {
|
namespace util {
|
||||||
|
template struct parray<char>;
|
||||||
|
template struct parray<const char>;
|
||||||
|
|
||||||
template struct parray<int8_t>;
|
template struct parray<int8_t>;
|
||||||
template struct parray<int16_t>;
|
template struct parray<int16_t>;
|
||||||
template struct parray<int32_t>;
|
template struct parray<int32_t>;
|
||||||
|
@ -43,9 +43,10 @@ namespace util {
|
|||||||
const T* cbegin (void) const;
|
const T* cbegin (void) const;
|
||||||
const T* cend (void) const;
|
const T* cend (void) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
std::ostream& operator<< (std::ostream&, util::parray<T>);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
std::ostream& operator<< (std::ostream&, util::parray<T>);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user