From 314a3a206ee188b01dbd0179d9528c57fa26a863 Mon Sep 17 00:00:00 2001 From: Victor Paleologue Date: Wed, 8 Sep 2021 17:37:07 +0200 Subject: [PATCH] format: Fixes compilation for C++17 --- src/format_doc.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/format_doc.cpp b/src/format_doc.cpp index b707d68..61591a2 100644 --- a/src/format_doc.cpp +++ b/src/format_doc.cpp @@ -6,6 +6,7 @@ */ #include +#include #include #include #include @@ -14,8 +15,6 @@ #include #include "formatter_p.hpp" #include -#include -#include #include #include "cpptype.hpp" @@ -94,7 +93,7 @@ class QiLangGenDoc: public NodeFormatter<> } std::stack first; - boost::scoped_ptr curDoc; + std::unique_ptr curDoc; void putComma() { if (first.top()) @@ -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\", ";