Re: Vararg-templated class with matching member func

2013-04-06 Thread Nick Sabalausky
On Sun, 07 Apr 2013 01:53:34 +0200 "bearophile" wrote: > Nick Sabalausky: > > > I have a feeling I'm missing something obvious, but how do I > > create > > something like this?: > > > > class Foo(TArgs...) > > { > > void func(/+ args must exactly match TArgs +/) > > { > > } > > } >

Re: Vararg-templated class with matching member func

2013-04-06 Thread bearophile
Nick Sabalausky: I have a feeling I'm missing something obvious, but how do I create something like this?: class Foo(TArgs...) { void func(/+ args must exactly match TArgs +/) { } } new Foo(int).func(5); // Ok new Foo(int, string).func(5, "hello"); // Ok // Error! Overload not fo

Vararg-templated class with matching member func

2013-04-06 Thread Nick Sabalausky
I have a feeling I'm missing something obvious, but how do I create something like this?: class Foo(TArgs...) { void func(/+ args must exactly match TArgs +/) { } } new Foo(int).func(5); // Ok new Foo(int, string).func(5, "hello"); // Ok // Error! Overload not found! new Foo(int).fun