summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2024-04-12 15:23:05 +0200
committerSlávek Banko <slavek.banko@axis.cz>2024-04-12 15:57:34 +0200
commitd77e599ffae91b697a57f56a9d29223cb6a52063 (patch)
treef411a5e873e39e26b77c964ed7bb9fd2812d7e50
parent9a6cea11e93d2a7e26995d8d98119ae04e46efa9 (diff)
downloadtdepim-d77e599ffae91b697a57f56a9d29223cb6a52063.tar.gz
tdepim-d77e599ffae91b697a57f56a9d29223cb6a52063.zip
Fix compatibility with C++17.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 3d5bff624aa23bdf6521d15449b385558fff5a8d)
-rw-r--r--indexlib/ifile.cpp2
-rw-r--r--kmail/keyresolver.cpp10
2 files changed, 6 insertions, 6 deletions
diff --git a/indexlib/ifile.cpp b/indexlib/ifile.cpp
index 8ef5d2c6b..430574339 100644
--- a/indexlib/ifile.cpp
+++ b/indexlib/ifile.cpp
@@ -169,7 +169,7 @@ std::vector<std::string> ifile::break_clean( const char* complete ) const {
std::sort( words.begin(), words.end() );
words.erase( std::unique( words.begin(), words.end() ), words.end() );
words.erase( std::remove_if( words.begin(), words.end(), &ifile::invalid_word ), words.end() );
- words.erase( std::remove_if( words.begin(), words.end(), std::bind1st( std::mem_fun( &ifile::is_stop_word ), this ) ), words.end() );
+ words.erase( std::remove_if( words.begin(), words.end(), std::bind( std::mem_fn( &ifile::is_stop_word ), this, std::placeholders::_1 ) ), words.end() );
return words;
}
diff --git a/kmail/keyresolver.cpp b/kmail/keyresolver.cpp
index 68187d2a2..c0b0cf692 100644
--- a/kmail/keyresolver.cpp
+++ b/kmail/keyresolver.cpp
@@ -335,7 +335,7 @@ static std::vector<GpgME::Key> trustedOrConfirmed( const std::vector<GpgME::Key>
}
namespace {
- struct IsNotForFormat : public std::unary_function<GpgME::Key,bool> {
+ struct IsNotForFormat : public std::function<bool(GpgME::Key)> {
IsNotForFormat( Kleo::CryptoMessageFormat f ) : format( f ) {}
bool operator()( const GpgME::Key & key ) const {
@@ -347,7 +347,7 @@ namespace {
const Kleo::CryptoMessageFormat format;
};
- struct IsForFormat : std::unary_function<GpgME::Key,bool> {
+ struct IsForFormat : std::function<bool(GpgME::Key)> {
explicit IsForFormat( Kleo::CryptoMessageFormat f )
: protocol( isOpenPGP( f ) ? GpgME::Context::OpenPGP :
isSMIME( f ) ? GpgME::Context::CMS :
@@ -364,7 +364,7 @@ namespace {
-class Kleo::KeyResolver::SigningPreferenceCounter : public std::unary_function<Kleo::KeyResolver::Item,void> {
+class Kleo::KeyResolver::SigningPreferenceCounter : public std::function<void(Kleo::KeyResolver::Item)> {
public:
SigningPreferenceCounter()
: mTotal( 0 ),
@@ -409,7 +409,7 @@ void Kleo::KeyResolver::SigningPreferenceCounter::operator()( const Kleo::KeyRes
-class Kleo::KeyResolver::EncryptionPreferenceCounter : public std::unary_function<Item,void> {
+class Kleo::KeyResolver::EncryptionPreferenceCounter : public std::function<void(Item)> {
const Kleo::KeyResolver * _this;
public:
EncryptionPreferenceCounter( const Kleo::KeyResolver * kr, EncryptionPreference defaultPreference )
@@ -476,7 +476,7 @@ void Kleo::KeyResolver::EncryptionPreferenceCounter::operator()( Item & item ) {
namespace {
- class FormatPreferenceCounterBase : public std::unary_function<Kleo::KeyResolver::Item,void> {
+ class FormatPreferenceCounterBase : public std::function<void(Kleo::KeyResolver::Item)> {
public:
FormatPreferenceCounterBase()
: mTotal( 0 ),