[clang-tidy] Fix linkage-related compiler errors in clang-tidy tests

llvm-svn: 313752
This commit is contained in:
Alexander Kornienko 2017-09-20 12:16:35 +00:00
parent ceb4494786
commit 621e555788
2 changed files with 13 additions and 7 deletions

View File

@ -43,19 +43,23 @@ template <typename K, typename V> struct unordered_multimap : map<K, V> {};
template <typename K, typename Cmp = less<K>> struct multiset : set<K, Cmp> {};
template <typename FwIt, typename K> FwIt find(FwIt, FwIt, const K &);
template <typename FwIt, typename K>
FwIt find(FwIt, FwIt end, const K &) { return end; }
template <typename FwIt, typename K, typename Cmp>
FwIt find(FwIt, FwIt, const K &, Cmp);
FwIt find(FwIt, FwIt end, const K &, Cmp) { return end; }
template <typename FwIt, typename Pred> FwIt find_if(FwIt, FwIt, Pred);
template <typename FwIt, typename Pred>
FwIt find_if(FwIt, FwIt end, Pred) { return end; }
template <typename FwIt, typename K> FwIt count(FwIt, FwIt, const K &);
template <typename FwIt, typename K>
unsigned count(FwIt, FwIt, const K &) { return 0; }
template <typename FwIt, typename K> FwIt lower_bound(FwIt, FwIt, const K &);
template <typename FwIt, typename K>
FwIt lower_bound(FwIt, FwIt end, const K &) { return end; }
template <typename FwIt, typename K, typename Ord>
FwIt lower_bound(FwIt, FwIt, const K &, Ord);
FwIt lower_bound(FwIt, FwIt end, const K &, Ord) { return end; }
}
#define FIND_IN_SET(x) find(x.begin(), x.end(), 10)

View File

@ -10,7 +10,9 @@ template <typename _Tp> struct remove_reference<_Tp &> { typedef _Tp type; };
template <typename _Tp> struct remove_reference<_Tp &&> { typedef _Tp type; };
template <typename _Tp>
constexpr typename std::remove_reference<_Tp>::type &&move(_Tp &&__t);
constexpr typename std::remove_reference<_Tp>::type &&move(_Tp &&__t) {
return static_cast<typename std::remove_reference<_Tp>::type &&>(__t);
}
} // namespace std