Skip to content

Commit

Permalink
format: Fixes compilation for C++17
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Paleologue committed Sep 8, 2021
1 parent 175dba0 commit 314a3a2
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/format_doc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

#include <iostream>
#include <ka/scoped.hpp>
#include <qi/log.hpp>
#include <qilang/node.hpp>
#include <qilang/formatter.hpp>
Expand All @@ -14,8 +15,6 @@
#include <qi/os.hpp>
#include "formatter_p.hpp"
#include <boost/algorithm/string/replace.hpp>
#include <boost/lambda/lambda.hpp>
#include <boost/scope_exit.hpp>
#include <stack>
#include "cpptype.hpp"

Expand Down Expand Up @@ -94,7 +93,7 @@ class QiLangGenDoc: public NodeFormatter<>
}

std::stack<bool> first;
boost::scoped_ptr<Doc> curDoc;
std::unique_ptr<Doc> curDoc;

void putComma() {
if (first.top())
Expand Down Expand Up @@ -169,9 +168,7 @@ class QiLangGenDoc: public NodeFormatter<>

curDoc.reset(new Doc(doc));
}
BOOST_SCOPE_EXIT(&curDoc) {
curDoc.reset();
} BOOST_SCOPE_EXIT_END
ka::scoped([this] { curDoc.reset(); });

out() << "\"" << node->name << "\" : {";
out() << "\"type\" : \"method\", ";
Expand Down

0 comments on commit 314a3a2

Please sign in to comment.