Check-in [86489420ef]
Not logged in
Overview
SHA1 Hash:86489420efcfc6d3e617e2c701854dfdf5a37fa6
Date: 2012-07-15 15:03:56
User: kinaba
Comment:Avoid ICE.
Timelines: family | ancestors | descendants | both | trunk
Diffs: redesign
Downloads: Tarball | ZIP archive
Other Links: files | file ages | manifest
Tags And Properties
Changes

Modified src/util.d from [0665970b47ba63ed] to [3ea557146e66a2fa].

2 2 public import std.array; 3 3 public import std.conv; 4 4 public import std.range; 5 5 public import std.stdio; 6 6 public import std.string; 7 7 public import std.typecons; 8 8 import std.c.stdlib; 9 + 10 +// To avoide the following ICE: 11 +// src\phobos\std\algorithm.d(4552): 12 +// Error: function std.algorithm.count!("a == b",string,char).count 13 +// compiler error, parameter 'value', bugzilla 2962? 14 +// Assertion failure: '0' on line 717 in file 'glue.c' 15 +int count(T,V)(T[] a, V v) 16 +{ 17 + int cnt = 0; 18 + foreach(e; a) 19 + if(e == v) 20 + ++cnt; 21 + return cnt; 22 +} 9 23 10 24 void application_exit() 11 25 { 12 26 std.c.stdlib.exit(0); 13 27 } 14 28 15 29 template DeriveCreate()