#pragma once #include template bool is_empty(const T& val) { return val == 0; } template <> bool is_empty(const std::string& val); template T get_first_non_empty(T&& last) { return last; } template T get_first_non_empty(T&& first, Args&&... args) { if (!is_empty(first)) return first; return get_first_non_empty(std::forward(args)...); }