summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/vector20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/include/vector b/src/include/vector
index 133ba9dae..bbe33df47 100644
--- a/src/include/vector
+++ b/src/include/vector
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2014 */
+/* Contributors Listed Below - COPYRIGHT 2011,2015 */
+/* [+] International Business Machines Corp. */
+/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
@@ -684,6 +686,22 @@ namespace std
//}
};
+ template <class T, class U>
+ bool operator==(const vector<T>& l, const vector<U>& r)
+ {
+ if (l.size() != r.size()) return false;
+ auto p = l.begin();
+ auto q = r.begin();
+
+ while(p != l.end())
+ {
+ if (*p != *q) return false;
+ ++p; ++q;
+ }
+
+ return true;
+ }
+
}; // end namespace std
// ------------------------------------------------------------------------------------------------
OpenPOWER on IntegriCloud