aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cpp/src/configuration.cpp
diff options
context:
space:
mode:
authorAndre Heinecke <[email protected]>2016-04-11 13:50:17 +0000
committerAndre Heinecke <[email protected]>2016-04-11 15:00:59 +0000
commit691950e18cf08a3f9bbc2004501834cd47bea579 (patch)
tree25253f07fa380bb00b89e5a8f0461f90e6e40379 /lang/cpp/src/configuration.cpp
parentAdd pthread in gpgmepp config (diff)
downloadgpgme-691950e18cf08a3f9bbc2004501834cd47bea579.tar.gz
gpgme-691950e18cf08a3f9bbc2004501834cd47bea579.zip
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.
Diffstat (limited to 'lang/cpp/src/configuration.cpp')
-rw-r--r--lang/cpp/src/configuration.cpp18
1 files changed, 8 insertions, 10 deletions
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 <gpgme.h>
-#include <boost/foreach.hpp>
-
#include <iterator>
#include <algorithm>
#include <ostream>
@@ -37,14 +35,14 @@
using namespace GpgME;
using namespace GpgME::Configuration;
-typedef std::shared_ptr< boost::remove_pointer<gpgme_conf_opt_t>::type > shared_gpgme_conf_opt_t;
-typedef std::weak_ptr< boost::remove_pointer<gpgme_conf_opt_t>::type > weak_gpgme_conf_opt_t;
+typedef std::shared_ptr< std::remove_pointer<gpgme_conf_opt_t>::type > shared_gpgme_conf_opt_t;
+typedef std::weak_ptr< std::remove_pointer<gpgme_conf_opt_t>::type > weak_gpgme_conf_opt_t;
-typedef std::shared_ptr< boost::remove_pointer<gpgme_conf_arg_t>::type > shared_gpgme_conf_arg_t;
-typedef std::weak_ptr< boost::remove_pointer<gpgme_conf_arg_t>::type > weak_gpgme_conf_arg_t;
+typedef std::shared_ptr< std::remove_pointer<gpgme_conf_arg_t>::type > shared_gpgme_conf_arg_t;
+typedef std::weak_ptr< std::remove_pointer<gpgme_conf_arg_t>::type > weak_gpgme_conf_arg_t;
-typedef std::shared_ptr< boost::remove_pointer<gpgme_ctx_t>::type > shared_gpgme_ctx_t;
-typedef std::weak_ptr< boost::remove_pointer<gpgme_ctx_t>::type > weak_gpgme_ctx_t;
+typedef std::shared_ptr< std::remove_pointer<gpgme_ctx_t>::type > shared_gpgme_ctx_t;
+typedef std::weak_ptr< std::remove_pointer<gpgme_ctx_t>::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());
}