provide << operator for optionals
This commit is contained in:
parent
99d851cd29
commit
41354f10f5
@ -26,6 +26,14 @@ using namespace thin_provisioning;
|
||||
//----------------------------------------------------------------
|
||||
|
||||
namespace {
|
||||
template <typename T>
|
||||
std::ostream &operator << (ostream &out, boost::optional<T> const &maybe) {
|
||||
if (maybe)
|
||||
out << *maybe;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
class hr_emitter : public emitter {
|
||||
public:
|
||||
hr_emitter(ostream &out)
|
||||
|
Loading…
Reference in New Issue
Block a user