template<typename... T>
void foo(T... args)
{
return bar(args...);
}
In this bad but simple example, bar is called with the same* parameters as foo.
Parameter unpacking uses the postfix … operator.
* To some extent. Doing the right thing adds a lot of noise.
> Le 13 avr. 2017 à 11:18, David Sweeris <[email protected]> a écrit :
>
>
>> On Apr 12, 2017, at 20:31, Félix Cloutier via swift-evolution
>> <[email protected]> wrote:
>>
>> I don't have a strong opinion; are we sure enough that this is what we want
>> the postfix operator … to be for? For instance, C++ uses it a lot with
>> variadic templates.
>
> I don't think the two usages conflict... maybe later if "literal values as
> generic parameters" and "variadic generic parameters" get added, there might
> be a problem involving variadic literal one-sided ranges, but otherwise we
> should be good on that front... I think...
>
> I should probably learn more about how C++ templates have changed since they
> were first introduced.
>
> - Dave Sweeris
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution