summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2015-11-05 23:39:12 -0600
committerPatrick Williams <iawillia@us.ibm.com>2015-12-11 15:30:27 -0600
commite95f1b15004d7c0c53673f879a99bf0e1ae9cd97 (patch)
treea2bb6d4618ea39870dabfd4ee83e49d7bc6b8180 /src
parenta17fbd3cb1027617aee6915d9b4a6c8640f562cc (diff)
downloadtalos-hostboot-e95f1b15004d7c0c53673f879a99bf0e1ae9cd97.tar.gz
talos-hostboot-e95f1b15004d7c0c53673f879a99bf0e1ae9cd97.zip
Implement std::vector::operator==
RTC: 124148 Change-Id: Ib93efc0c1f1f4371573037047e39bb6e36e7e536 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/21801 Tested-by: Jenkins Server Reviewed-by: STEPHEN M. CPREK <smcprek@us.ibm.com> Reviewed-by: Brian Silver <bsilver@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
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