"Dmitry Olshansky" <[email protected]> wrote in message news:[email protected]... > > How about this (untested)? > > void func()(dstring s) { > dstring t = s; > //... funcImpl(t); > } > void func(S)(S s) { > dstring t = to!dstring(s); > //... funcImpl(t); > } >
That fails to compile when passed a dstring because it matches both
functions. Adding an "if(!is(S==dstring))" constraint to the second makes it
compile, but then func("abc") just calls the second one instead of the
first.
