Overload operator<< for UnknownElement as gcc complains about abiguous calls otherwise

Originally committed to SVN as r6024.
This commit is contained in:
Thomas Goyne 2011-12-22 21:13:22 +00:00
parent b0c17b9be2
commit 10255ae201

View file

@ -11,8 +11,11 @@ Author: Terry Caton
#include "elements.h"
#include "visitor.h"
namespace json
{
#ifndef LAGI_PRE
#include <ostream>
#endif
namespace json {
class Writer : private ConstVisitor {
Writer(std::ostream& ostr);
@ -45,5 +48,10 @@ public:
}
};
inline std::ostream& operator <<(std::ostream& ostr, UnknownElement const& elementRoot) {
Writer::Write(elementRoot, ostr);
return ostr;
}
} // End namespace