forked from qt-creator/qt-creator
KitManager: Consider sdk kits for initial default kit
Change-Id: I86874f3d138f49d9962e11323364ba856b03bffd Task-number: QTCREATORBUG-15002 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
@@ -109,6 +109,13 @@ typename T::value_type findOr(const T &container, typename T::value_type other,
|
||||
return *it;
|
||||
}
|
||||
|
||||
template<typename T, typename R, typename S>
|
||||
typename T::value_type findOr(const T &container, typename T::value_type other, R (S::*function)() const)
|
||||
{
|
||||
return findOr(container, other, std::mem_fn(function));
|
||||
}
|
||||
|
||||
|
||||
template<typename T, typename F>
|
||||
int indexOf(const T &container, F function)
|
||||
{
|
||||
@@ -127,6 +134,12 @@ typename T::value_type findOrDefault(const T &container, F function)
|
||||
return findOr(container, typename T::value_type(), function);
|
||||
}
|
||||
|
||||
template<typename T, typename R, typename S>
|
||||
typename T::value_type findOrDefault(const T &container, R (S::*function)() const)
|
||||
{
|
||||
return findOr(container, typename T::value_type(), function);
|
||||
}
|
||||
|
||||
//////////////////
|
||||
// find helpers
|
||||
//////////////////
|
||||
|
||||
Reference in New Issue
Block a user