forked from qt-creator/qt-creator
libs: clang-19 compile fixes
* clang-19 seems to be stricter at instantiating code, causing compile errors if functions might not compile * use cpp feature detection macro instead of detecting compilers Change-Id: I47d8b5e325e1528e672fd713d7622305ced1149d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -411,10 +411,6 @@ public:
|
||||
|
||||
BaseSqliteResultRange(BaseSqliteResultRange &) = delete;
|
||||
BaseSqliteResultRange &operator=(BaseSqliteResultRange &) = delete;
|
||||
|
||||
BaseSqliteResultRange(BaseSqliteResultRange &&other)
|
||||
: m_statement{std::move(other.resetter)}
|
||||
{}
|
||||
BaseSqliteResultRange &operator=(BaseSqliteResultRange &&) = delete;
|
||||
|
||||
iterator begin() & { return iterator{m_statement}; }
|
||||
|
@@ -147,7 +147,7 @@ public:
|
||||
friend void convertToString(String &string, CompoundBasicId id)
|
||||
{
|
||||
convertToString(string, id.id);
|
||||
convertToString(string, id.contextId);
|
||||
convertToString(string, id.contextId());
|
||||
}
|
||||
|
||||
friend bool compareId(CompoundBasicId first, CompoundBasicId second)
|
||||
|
@@ -258,7 +258,7 @@ template<template<typename> class C, // result container type
|
||||
typename Result = std::decay_t<std::invoke_result_t<F, Value&>>,
|
||||
typename ResultContainer = C<Result>>
|
||||
Q_REQUIRED_RESULT decltype(auto) transform(SC &&container, F function);
|
||||
#ifdef Q_CC_CLANG
|
||||
#if __cpp_template_template_args < 201611L
|
||||
// "Matching of template template-arguments excludes compatible templates"
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0522r0.html (P0522R0)
|
||||
// in C++17 makes the above match e.g. C=std::vector even though that takes two
|
||||
@@ -833,7 +833,7 @@ Q_REQUIRED_RESULT decltype(auto) transform(SC &&container, F function)
|
||||
return transform<ResultContainer>(std::forward<SC>(container), function);
|
||||
}
|
||||
|
||||
#ifdef Q_CC_CLANG
|
||||
#if __cpp_template_template_args < 201611L
|
||||
template<template<typename, typename> class C, // result container type
|
||||
typename SC, // input container type
|
||||
typename F, // function type
|
||||
|
Reference in New Issue
Block a user