Thread overview
[Issue 2996] New: std.typetuple: add support for any static tuples
May 17, 2009
rsinfu@gmail.com
May 17, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2996

           Summary: std.typetuple: add support for any static tuples
           Product: D
           Version: 2.030
          Platform: PC
        OS/Version: All
            Status: NEW
          Keywords: patch
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: rsinfu@gmail.com


Created an attachment (id=371)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=371)
Adds support for any static tuples

With the patch applied, indexOf, Erase, EraseAll, NoDuplicates, Replace, ReplaceAll, and Reverse in std.typetuple will be able to deal with any static tuples (type tuple, symbol tuple, expression tuple, and even mixed one).

This enhancement does not break existing code.

Example and output:
--------------------
import std.stdio;
import std.typetuple;
void main()
{
    alias TypeTuple!(short, int, int, short, int) T;
    alias NoDuplicates!(ReplaceAll!(short, "Fizz",
                        ReplaceAll!(  int, "Buzz", T))) R;
    writeln(R);
}
--------------------
FizzBuzz
--------------------

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 18, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2996


Andrei Alexandrescu <andrei@metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |andrei@metalanguage.com
         AssignedTo|bugzilla@digitalmars.com    |andrei@metalanguage.com




-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
August 28, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2996


Andrei Alexandrescu <andrei@metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED




--- Comment #1 from Andrei Alexandrescu <andrei@metalanguage.com>  2009-08-27 21:29:57 PDT ---
Integrated patch. This is getting a bit hairy so probably it points to a problem in the language. Thanks, Shin!

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