Skip to content

Instantly share code, notes, and snippets.

@sguzman
Created April 16, 2015 21:30
Show Gist options
  • Save sguzman/5954983f12a52846b792 to your computer and use it in GitHub Desktop.
Save sguzman/5954983f12a52846b792 to your computer and use it in GitHub Desktop.
My first use of template template parameters
template <class C, template <class C> class A, template <class C> class B>
static inline void assertEquals(const A<C>& expected, const B<C>& actual) {
auto success = 0, failure = 0;
for (auto iter1 = expected.cbegin(), iter2 = actual.cbegin();
iter1 != expected.cend() && iter2 != actual.cend(); ++iter1, ++iter2) {
if (Test::assertEquals<C>(*iter1, *iter2)) {
++success;
} else {
++failure;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment