aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2018-05-31 11:31:59 +0200
committerEike Ziller <eike.ziller@qt.io>2018-06-05 12:04:59 +0000
commitf8e88e8ce45a462f27d274c654e31a67032da757 (patch)
treeafc9e80462531ba4852db36533a1787bbf966a1b /src/libs/3rdparty
parent8798990fb1fad04dca8337479e22d17c1fcbfebd (diff)
Fix compilation issues with C++17
Testable on Linux/macOS by changing c++14 to c++1z in qtcreator.pri. Testable with latest MSVC2017 by setting _CL_=/std:c++17. unary_function, binary_function, and a few other things that were deprecated are removed in C++17. std::string got a non-const overload for its "data" member function, so we cannot create a function pointer on it without specifying its type. Use std::declval instead (though it requires a default constructor for the type). MSVC seems to have an issue with Utils::transform for std::vector (used in Nim plugin), but that looks like a compiler issue. Change-Id: I94f9a93d591d55b610f86fabfc618158927d6221 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/libs/3rdparty')
-rw-r--r--src/libs/3rdparty/botan/botan.cpp2
-rw-r--r--src/libs/3rdparty/cplusplus/Name.h2
-rw-r--r--src/libs/3rdparty/cplusplus/Names.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/libs/3rdparty/botan/botan.cpp b/src/libs/3rdparty/botan/botan.cpp
index 87736d5fe3..0d912062b3 100644
--- a/src/libs/3rdparty/botan/botan.cpp
+++ b/src/libs/3rdparty/botan/botan.cpp
@@ -465,7 +465,7 @@ inline V search_map(const std::map<K, V>& mapping,
* Function adaptor for delete operation
*/
template<class T>
-class del_fun : public std::unary_function<T, void>
+class del_fun
{
public:
void operator()(T* ptr) { delete ptr; }
diff --git a/src/libs/3rdparty/cplusplus/Name.h b/src/libs/3rdparty/cplusplus/Name.h
index 200ccac75d..460f0bca11 100644
--- a/src/libs/3rdparty/cplusplus/Name.h
+++ b/src/libs/3rdparty/cplusplus/Name.h
@@ -59,7 +59,7 @@ public:
bool match(const Name *other, Matcher *matcher = 0) const;
public:
- struct Compare: std::binary_function<const Name *, const Name *, bool> {
+ struct Compare {
bool operator()(const Name *name, const Name *other) const;
};
diff --git a/src/libs/3rdparty/cplusplus/Names.h b/src/libs/3rdparty/cplusplus/Names.h
index 41f3e761b4..b8d090da2f 100644
--- a/src/libs/3rdparty/cplusplus/Names.h
+++ b/src/libs/3rdparty/cplusplus/Names.h
@@ -101,7 +101,7 @@ public:
bool isSpecialization() const { return _isSpecialization; }
// Comparator needed to distinguish between two different TemplateNameId(e.g.:used in std::map)
- struct Compare: std::binary_function<const TemplateNameId *, const TemplateNameId *, bool> {
+ struct Compare {
bool operator()(const TemplateNameId *name, const TemplateNameId *other) const;
};