Added istream/ostream funcs/operators

This commit is contained in:
Christopher Dunn
2007-03-23 09:57:01 +00:00
parent 2370789d67
commit 56a1d6cbf5
5 changed files with 82 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
#include <utility>
#include <assert.h>
#include <stdio.h>
#include <ostream>
#if _MSC_VER >= 1400 // VC++ 8.0
#pragma warning( disable : 4996 ) // disable warning about strdup being deprecated.
@@ -475,5 +476,12 @@ StyledWriter::normalizeEOL( const std::string &text )
return normalized;
}
std::ostream& operator<<( std::ostream &sout, const Value &root )
{
Json::StyledWriter writer;
sout << writer.write(root);
return sout;
}
} // namespace Json