Date: Tue, 11 Aug 2020 13:55:53 +0300
On Tue, 11 Aug 2020 at 13:52, Ville Voutilainen
<ville.voutilainen_at_[hidden]> wrote:
> void g(std::same_as<std::string_view> auto&... stringviews)
> {
> ((std::cout << stringviews << std::endl),...);
> }
..and if you want perfect forwarding for this one,
template <class... T>
void g(T&&... stringviews) requires
(std::same_as<std::remove_reference_t<T>, std::string_view> &&...)
{
((std::cout << stringviews << std::endl),...);
}
<ville.voutilainen_at_[hidden]> wrote:
> void g(std::same_as<std::string_view> auto&... stringviews)
> {
> ((std::cout << stringviews << std::endl),...);
> }
..and if you want perfect forwarding for this one,
template <class... T>
void g(T&&... stringviews) requires
(std::same_as<std::remove_reference_t<T>, std::string_view> &&...)
{
((std::cout << stringviews << std::endl),...);
}
Received on 2020-08-11 05:59:27