Skip to content

Commit 715bf72

Browse files
committed
modify jsoncpp because we aren't using stdc++11
1 parent 198cc35 commit 715bf72

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib_json/json_writer.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <math.h>
1616
#include <stdio.h>
1717
#include <string.h>
18+
#include <boost/shared_ptr.hpp>
1819

1920
#if defined(_MSC_VER) && _MSC_VER < 1500 // VC++ 8.0 and below
2021
#include <float.h>
@@ -1017,14 +1018,14 @@ StreamWriter* OldCompressingStreamWriterBuilder::newStreamWriter(
10171018

10181019
std::string writeString(Value const& root, StreamWriter::Factory const& builder) {
10191020
std::ostringstream sout;
1020-
std::unique_ptr<StreamWriter> const sw(builder.newStreamWriter(&sout));
1021+
boost::shared_ptr<StreamWriter> const sw(builder.newStreamWriter(&sout));
10211022
sw->write(root);
10221023
return sout.str();
10231024
}
10241025

10251026
std::ostream& operator<<(std::ostream& sout, Value const& root) {
10261027
StreamWriterBuilder builder;
1027-
std::shared_ptr<StreamWriter> writer(builder.newStreamWriter(&sout));
1028+
boost::shared_ptr<StreamWriter> writer(builder.newStreamWriter(&sout));
10281029
writer->write(root);
10291030
return sout;
10301031
}

0 commit comments

Comments
 (0)