|
@@ -409,6 +409,12 @@ public:
|
|
|
return it;
|
|
return it;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /// Return index of value in vector, or size if not found.
|
|
|
|
|
+ unsigned IndexOf(const T& value) const
|
|
|
|
|
+ {
|
|
|
|
|
+ return Find(value) - Begin();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/// Return whether contains a specific value.
|
|
/// Return whether contains a specific value.
|
|
|
bool Contains(const T& value) const { return Find(value) != End(); }
|
|
bool Contains(const T& value) const { return Find(value) != End(); }
|
|
|
|
|
|
|
@@ -989,6 +995,12 @@ public:
|
|
|
return it;
|
|
return it;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /// Return index of value in vector, or size if not found.
|
|
|
|
|
+ unsigned IndexOf(const T& value) const
|
|
|
|
|
+ {
|
|
|
|
|
+ return Find(value) - Begin();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/// Return whether contains a specific value.
|
|
/// Return whether contains a specific value.
|
|
|
bool Contains(const T& value) const { return Find(value) != End(); }
|
|
bool Contains(const T& value) const { return Find(value) != End(); }
|
|
|
|
|
|