From 691950e18cf08a3f9bbc2004501834cd47bea579 Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Mon, 11 Apr 2016 15:50:17 +0200 Subject: Cpp: Remove last usages of boost * lang/cpp/src/configuration.cpp: Use std::remove_pointer. (Configuration::operator<<): std::for_each. * lang/cpp/src/context.cpp: Delete manually instead of scoped ptr. * lang/cpp/src/scdgetinfoassuantransaction.cpp: Use static_assert. (to_reader_list): Tokenize with getline. --- lang/cpp/src/configuration.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'lang/cpp/src/configuration.cpp') diff --git a/lang/cpp/src/configuration.cpp b/lang/cpp/src/configuration.cpp index 4bd01867..7ef28836 100644 --- a/lang/cpp/src/configuration.cpp +++ b/lang/cpp/src/configuration.cpp @@ -26,8 +26,6 @@ #include -#include - #include #include #include @@ -37,14 +35,14 @@ using namespace GpgME; using namespace GpgME::Configuration; -typedef std::shared_ptr< boost::remove_pointer::type > shared_gpgme_conf_opt_t; -typedef std::weak_ptr< boost::remove_pointer::type > weak_gpgme_conf_opt_t; +typedef std::shared_ptr< std::remove_pointer::type > shared_gpgme_conf_opt_t; +typedef std::weak_ptr< std::remove_pointer::type > weak_gpgme_conf_opt_t; -typedef std::shared_ptr< boost::remove_pointer::type > shared_gpgme_conf_arg_t; -typedef std::weak_ptr< boost::remove_pointer::type > weak_gpgme_conf_arg_t; +typedef std::shared_ptr< std::remove_pointer::type > shared_gpgme_conf_arg_t; +typedef std::weak_ptr< std::remove_pointer::type > weak_gpgme_conf_arg_t; -typedef std::shared_ptr< boost::remove_pointer::type > shared_gpgme_ctx_t; -typedef std::weak_ptr< boost::remove_pointer::type > weak_gpgme_ctx_t; +typedef std::shared_ptr< std::remove_pointer::type > shared_gpgme_ctx_t; +typedef std::weak_ptr< std::remove_pointer::type > weak_gpgme_ctx_t; namespace { @@ -898,14 +896,14 @@ std::ostream &Configuration::operator<<(std::ostream &os, const Argument &a) os << v.size() << ':'; // can't use std::copy + ostream_iterator here, since we need the protect() call bool first = true; - BOOST_FOREACH(const char *s, v) { + std::for_each(v.begin(), v.end(), [&first, &os](const char *s) { if (first) { first = false; } else { os << ','; } os << protect(s); - } + }); } else { os << protect(a.stringValue()); } -- cgit v1.2.3