Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cassert>
- #include <string>
- #include <string_view>
- /* Напишите вашу реализацию EqualsToOneOf здесь*/
- using namespace std;
- template <typename Type0, typename... Types>
- bool EqualsToOneOf(const Type0& first, const Types&... values) {
- return ((first == values) || ...);
- }
- int main() {
- assert(EqualsToOneOf("hello"sv, "hi"s, "hello"s));
- assert(!EqualsToOneOf(1, 10, 2, 3, 6));
- assert(!EqualsToOneOf(8));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement