mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-08 00:22:31 -06:00
Bump project requirement to C++17
This commit is contained in:
@@ -30,5 +30,4 @@
|
||||
|
||||
#include <QString>
|
||||
|
||||
// TODO: Make it inline in C++17
|
||||
extern const QString QB_EXT;
|
||||
inline const QString QB_EXT {QStringLiteral(".!qB")};
|
||||
|
||||
@@ -30,9 +30,6 @@
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
template <typename ...>
|
||||
using void_t = void; // replace this with std::void_t in C++17
|
||||
|
||||
template <typename T, typename = void>
|
||||
struct HasUnderlyingType
|
||||
: std::false_type
|
||||
@@ -40,7 +37,7 @@ struct HasUnderlyingType
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct HasUnderlyingType<T, void_t<typename T::underlying_type>>
|
||||
struct HasUnderlyingType<T, std::void_t<typename T::underlying_type>>
|
||||
: std::true_type
|
||||
{
|
||||
};
|
||||
|
||||
@@ -291,9 +291,8 @@ namespace
|
||||
LowerLimited<T> lowerLimited(T limit, T ret) { return LowerLimited<T>(limit, ret); }
|
||||
|
||||
template <typename T>
|
||||
std::function<T (const T&)> clampValue(const T lower, const T upper)
|
||||
auto clampValue(const T lower, const T upper)
|
||||
{
|
||||
// TODO: change return type to `auto` when using C++17
|
||||
return [lower, upper](const T value) -> T
|
||||
{
|
||||
if (value < lower)
|
||||
|
||||
@@ -69,8 +69,6 @@
|
||||
#include "session.h"
|
||||
#include "trackerentry.h"
|
||||
|
||||
const QString QB_EXT {QStringLiteral(".!qB")};
|
||||
|
||||
using namespace BitTorrent;
|
||||
|
||||
namespace
|
||||
|
||||
Reference in New Issue
Block a user