. ( const&):
template <typename... Substrs>
bool containsAllSubstr(std::string_view str, Substrs const&... substrs)
{
return (containsSubstr(str, substrs) && ...);
}
, -, string_view. SFINAE-, :
template <typename... Substrs,
std::enable_if_t<(std::is_convertible_v<Substrs const&, std::string_view> && ...), int> = 0>
bool containsAllSubstr(std::string_view str, Substrs const&... substrs)
{
return (containsSubstr(str, substrs) && ...);
}
, , :
template <size_t N>
bool containsAllSubstr(std::string_view str, std::string_view (&substrs)[N]);
. . :
bool containsAllSubstr(std::string_view str, std::initializer_list<std::string_view> substrs);