#pragma once #include // variadic argument printer template void _print_vargs(std::ostream& s, Head&& head) { s << std::forward(head); } template void _print_vargs(std::ostream& s, Head&& head, Tail&& ...tail) { s << std::forward(head); _print_vargs(s, std::forward(tail)...); } template void print_vargs(Args&&... args) { _print_vargs(std::cout, std::forward(args)...); } // value equality with any of variadic argument // example: value == varg[0] OR value == varg[1] OR ... template bool _or_vargs(Value&& value, Head&& head) { return value == head; } template bool _or_vargs(Value&& value, Head&& head, Tail&& ...tail) { return value == head || _or_vargs(std::forward(value), tail...); } template bool or_vargs(Value&& value, Array&&... array) { return _or_vargs(std::forward(value), std::forward(array)...); }