refs #413 Removed one overload of CRange::findBy and one of CSequence::applyIf; they were never used and they caused a circular dependency.

Templatized another overload of applyIf to break a circular dependency.
This commit is contained in:
Mathew Sutcliffe
2015-05-04 14:43:20 +01:00
parent aeb95ebb30
commit 36d116b4e9
5 changed files with 7 additions and 37 deletions

View File

@@ -13,10 +13,10 @@
#define BLACKMISC_RANGE_H
#include "blackmiscexport.h"
#include "propertyindexvariantmap.h"
#include "iterator.h"
#include "predicates.h"
#include <QtGlobal>
#include <QDebug>
#include <algorithm>
#include <type_traits>
#include <iterator>
@@ -71,12 +71,6 @@ namespace BlackMisc
inline auto findBy(K0 k0, V0 v0, KeysValues... keysValues) const
-> CRange<Iterators::ConditionalIterator<CIt, decltype(BlackMisc::Predicates::MemberEqual(k0, v0, keysValues...))>>;
/*!
* \brief Return a copy containing only those elements matching a given value map.
*/
inline auto findBy(CPropertyIndexVariantMap valueMap) const
-> CRange<Iterators::ConditionalIterator<CIt, decltype(BlackMisc::Predicates::Equals(std::move(valueMap)))>>;
/*!
* \brief Return true if there is an element for which a given predicate returns true.
*/
@@ -268,13 +262,6 @@ namespace BlackMisc
return findBy(BlackMisc::Predicates::MemberEqual(k0, v0, keysValues...));
}
template <class Derived, class CIt>
auto CRangeBase<Derived, CIt>::findBy(CPropertyIndexVariantMap valueMap) const
-> CRange<Iterators::ConditionalIterator<CIt, decltype(BlackMisc::Predicates::Equals(std::move(valueMap)))>>
{
return findBy(BlackMisc::Predicates::Equals(std::move(valueMap)));
}
}
#endif // guard