Re: Compiler complaining about code that can't be reached, builtin types .equals()

2015-06-25 Thread Sean Grimes via Digitalmars-d-learn
On Thursday, 25 June 2015 at 18:43:31 UTC, Ali Çehreli wrote: On 06/25/2015 11:26 AM, Sean Grimes wrote: Here is a short example which treats 'int' and 'double' as built-in only: import std.typetuple; bool isBuiltIn(T)() { foreach (T2; TypeTuple!(int, double/*, ... */)) { if (is

Compiler complaining about code that can't be reached, builtin types .equals()

2015-06-25 Thread Sean Grimes via Digitalmars-d-learn
I have a method, containsValue() in a class similar to java.util.HashMap. The class is a template class, instantiated with 2 parameters, K key, V value. bool containsValue(V value){ // dlang associative array, .values returns dynamic array of values in the aa auto values = this.inter