[phobos] phobos commit, revision 1670

Sean Kelly sean at invisibleduck.org
Sat Jun 19 21:54:00 PDT 2010


On Jun 19, 2010, at 8:07 PM, Masahiro Nakagawa wrote:
> 
> I use following isTuple.
> 
> template isTuple(T)
> {
>    enum isTuple = __traits(compiles, { void f(X...)(Tuple!X t) {}; f(T.init); });
> }

Thanks!  I still want to look into why the simple version* doesn't work, but that at least solves my immediate problem.

* template isTuple(T : Tuple!(U), U...) { enum isTuple = true; }

This approach even gives an invalid line number for where the problem lies.  I'll also have to submit a bug report for the compiler.


More information about the phobos mailing list