http://d.puremagic.com/issues/show_bug.cgi?id=1642


Simen Kjaeraas <simen.kja...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simen.kja...@gmail.com


--- Comment #2 from Simen Kjaeraas <simen.kja...@gmail.com> 2010-05-10 01:51:48 
PDT ---
This template lets you iterate through a compile-time array as a tuple. Not as
good as the real thing, but might be worth having around.

template ArrayToTuple( alias T ) {
    static if( T.length > 1 ) {
        alias TypeTuple!( T[ 0 ], ArrayToTuple!( T[ 1..$ ] ) ) ArrayToTuple;
    } else {
        alias TypeTuple!( T[ 0 ] ) ArrayToTuple;
    }
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to