Core/Bitset: Add operator<<(ostream&)

This commit is contained in:
Lynix 2016-11-17 18:26:05 +01:00
parent 91010fffa6
commit 180a8edf3b
2 changed files with 11 additions and 0 deletions

View File

@ -154,6 +154,9 @@ namespace Nz
Block m_mask;
};
template<typename Block, class Allocator>
std::ostream& operator<<(std::ostream& out, const Bitset<Block, Allocator>& bitset);
template<typename Block, class Allocator>
bool operator==(const Bitset<Block, Allocator>& lhs, const Nz::Bitset<Block, Allocator>& rhs);

View File

@ -1269,6 +1269,14 @@ namespace Nz
return *this;
}
template<typename Block, class Allocator>
std::ostream& operator<<(std::ostream& out, const Bitset<Block, Allocator>& bitset)
{
return out << bitset.ToString();
}
/*!
* \brief Compares two bitsets
* \return true if the two bitsets are the same