Overload operator<< for UnknownElement as gcc complains about abiguous calls otherwise
Originally committed to SVN as r6024.
This commit is contained in:
parent
b0c17b9be2
commit
10255ae201
1 changed files with 10 additions and 2 deletions
|
@ -11,8 +11,11 @@ Author: Terry Caton
|
||||||
#include "elements.h"
|
#include "elements.h"
|
||||||
#include "visitor.h"
|
#include "visitor.h"
|
||||||
|
|
||||||
namespace json
|
#ifndef LAGI_PRE
|
||||||
{
|
#include <ostream>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace json {
|
||||||
|
|
||||||
class Writer : private ConstVisitor {
|
class Writer : private ConstVisitor {
|
||||||
Writer(std::ostream& ostr);
|
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
|
} // End namespace
|
||||||
|
|
Loading…
Reference in a new issue