Bug 2996 – std.typetuple: add support for any static tuples

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
All
Creation time
2009-05-17T00:43:00Z
Last change time
2015-06-09T01:27:57Z
Keywords
patch
Assigned to
andrei
Creator
rsinfu
Blocks
3019

Attachments

IDFilenameSummaryContent-TypeSize
371enh_typetuple.patchAdds support for any static tuplestext/plain14095

Comments

Comment #0 by rsinfu — 2009-05-17T00:43:36Z
Created attachment 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 --------------------
Comment #1 by andrei — 2009-08-27T21:29:57Z
Integrated patch. This is getting a bit hairy so probably it points to a problem in the language. Thanks, Shin!