Skip to content

Commit 3d102b6

Browse files
authored
Merge pull request #29032 from compnerd/28737
Basic: out-of-line equality operator (NFCI)
2 parents 6b85e35 + 040050a commit 3d102b6

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

include/swift/Basic/Located.h

+6-7
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ namespace swift {
3030
/// the ClangImporter needs to keep track of where imports were originally written.
3131
/// Located makes it easy to do so while making the code more readable, compared to
3232
/// using `std::pair`.
33-
template<typename T>
33+
template <typename T>
3434
struct Located {
35-
3635
/// The main item whose source location is being tracked.
3736
T Item;
3837

@@ -45,13 +44,13 @@ struct Located {
4544

4645
SWIFT_DEBUG_DUMP;
4746
void dump(raw_ostream &os) const;
48-
49-
template<typename U>
50-
friend bool operator ==(const Located<U> &lhs, const Located<U> &rhs) {
51-
return lhs.Item == rhs.Item && lhs.Loc == rhs.Loc;
52-
}
5347
};
5448

49+
template <typename T>
50+
bool operator ==(const Located<T> &lhs, const Located<T> &rhs) {
51+
return lhs.Item == rhs.Item && lhs.Loc == rhs.Loc;
52+
}
53+
5554
} // end namespace swift
5655

5756
namespace llvm {

0 commit comments

Comments
 (0)