On Thursday, October 21, 2010 16:56:48 Simen kjaeraas wrote:
> Adam D. Ruppe <[email protected]> wrote:
> 
> [snip]
> 
> > Anyway, what's the right thing to do here?
> 
> I'd say:
> 
> void fun( T )( T t ) if ( isInputRange!T && is( ElementType!T == dchar ) )
> {}

Though I'd suggest using Unqual!(ElementType!T). I'm not sure that it's 
necessary in this case (sinc ElementType!() is already cheating on string 
types), but I have found that if you want stuff to work with templates when 
dealing with const and/or immutable, you really need to watch out for places to 
use Unqual!().

- Jonathan M Davis

Reply via email to