Created
April 16, 2015 21:30
-
-
Save sguzman/5954983f12a52846b792 to your computer and use it in GitHub Desktop.
My first use of template template parameters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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