uri: add an ostream operator

This commit is contained in:
Danny Robson 2021-12-13 15:55:01 +10:00
parent 76842f18ba
commit 1181291852
2 changed files with 10 additions and 0 deletions

View File

@ -207,3 +207,11 @@ cruft::operator<< (std::ostream &os, cruft::uri::component c)
unreachable ();
}
//-----------------------------------------------------------------------------
std::ostream&
cruft::operator<< (std::ostream &os, cruft::uri const &val)
{
return os << val.value ();
}

View File

@ -15,6 +15,7 @@
#include <array>
#include <string>
#include <stdexcept>
#include <iosfwd>
namespace cruft {
@ -95,6 +96,7 @@ namespace cruft {
std::string m_value;
};
std::ostream& operator<< (std::ostream&, uri const&);
std::ostream& operator<< (std::ostream&, uri::component);
}