summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2018-04-06 11:30:10 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2018-04-06 11:54:07 +0100
commit2be827457aeed4780259ae3d8407bff26fcdb415 (patch)
treeeb22f81e7434a7d63befbcc6cf1dfec7993b76cb
parentC++17 (diff)
downloadlibadhocutil-2be827457aeed4780259ae3d8407bff26fcdb415.tar.bz2
libadhocutil-2be827457aeed4780259ae3d8407bff26fcdb415.tar.xz
libadhocutil-2be827457aeed4780259ae3d8407bff26fcdb415.zip
C++17
Remove all boost things now in the standard library from nvpParse.
-rw-r--r--libadhocutil/nvpParse.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/libadhocutil/nvpParse.h b/libadhocutil/nvpParse.h
index 185ec60..2a3eba9 100644
--- a/libadhocutil/nvpParse.h
+++ b/libadhocutil/nvpParse.h
@@ -5,7 +5,8 @@
#include <string>
#include <map>
#include <istream>
-#include <boost/function.hpp>
+#include <functional>
+#include <memory>
#include <boost/lexical_cast.hpp>
#ifndef yyFlexLexer
#define yyFlexLexer nvpBaseFlexLexer
@@ -29,7 +30,7 @@ class NvpParse : public yyFlexLexer {
ValueNotFound(const std::string &);
};
- typedef boost::function<void(const std::string &)> AssignFunc;
+ typedef std::function<void(const std::string &)> AssignFunc;
typedef std::map<std::string, AssignFunc> AssignMap;
template <typename T>
@@ -58,8 +59,8 @@ class NvpParse : public yyFlexLexer {
};
/// @endcond
-#define NvpTarget(T) std::map<std::string, boost::shared_ptr<::AdHoc::NvpParse::TargetBase<T>>>
-#define NvpValue(c, m) { #m, boost::shared_ptr<::AdHoc::NvpParse::Target<c, decltype(c::m)>>(new ::AdHoc::NvpParse::Target<c, decltype(c::m)>(&c::m)) }
+#define NvpTarget(T) std::map<std::string, std::shared_ptr<::AdHoc::NvpParse::TargetBase<T>>>
+#define NvpValue(c, m) { #m, std::shared_ptr<::AdHoc::NvpParse::Target<c, decltype(c::m)>>(new ::AdHoc::NvpParse::Target<c, decltype(c::m)>(&c::m)) }
/** Parse an input stream into the given object.
* @param in The input stream.