mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-04 08:55:43 +08:00
Fixed trait so "compare" is properly called
This commit is contained in:
@@ -241,7 +241,7 @@ namespace BlackMisc
|
|||||||
return [index = *this](const auto & a, const auto & b)
|
return [index = *this](const auto & a, const auto & b)
|
||||||
{
|
{
|
||||||
using T = std::decay_t<decltype(a)>;
|
using T = std::decay_t<decltype(a)>;
|
||||||
return Private::compareByProperty(a, b, index, THasCompareByPropertyIndex<T>(), THasPropertyByIndex<T>());
|
return Private::compareByProperty(a, b, index, THasComparePropertyByIndex<T>(), THasPropertyByIndex<T>());
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -164,10 +164,10 @@ namespace BlackMisc
|
|||||||
* and i is an instance of CPropertyIndex.
|
* and i is an instance of CPropertyIndex.
|
||||||
*/
|
*/
|
||||||
template <typename T, typename = void_t<>>
|
template <typename T, typename = void_t<>>
|
||||||
struct THasCompareByPropertyIndex : public std::false_type {};
|
struct THasComparePropertyByIndex : public std::false_type {};
|
||||||
//! \cond
|
//! \cond
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct THasCompareByPropertyIndex<T, void_t<decltype(std::declval<T>().compareByPropertyIndex(std::declval<CPropertyIndex>(), std::declval<T>()))>> : public std::true_type {};
|
struct THasComparePropertyByIndex<T, void_t<decltype(std::declval<T>().comparePropertyByIndex(std::declval<const CPropertyIndex &>(), std::declval<const T &>()))>> : public std::true_type {};
|
||||||
//! \endcond
|
//! \endcond
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
Reference in New Issue
Block a user