<div dir="ltr">Okay, so I feel like this should be possible, but I can't make it work...<div style>I want to use template deduction to deduce the argument type, but I want the function arg to be Unqual!T of the deduced type, rather than the verbatim type of the argument given.</div>
<div style><br></div><div style>I've tried: void f(T : Unqual!U, U)(T a) {}</div><div style>and: void f(T)(Unqual!T a) {}<br></div><div style><br></div><div style>Ie, if called with:</div><div style> const int x;</div>
<div style> f(x);</div><div style>Then f() should be generated void f(int) rather than void f(const int).</div><div style><br></div><div style>I don't want a million permutations of the template function for each combination of const/immutabe/shared/etc, which especially blows out when the function has 2 or more args.</div>
<div style><br></div><div style>Note: T may only be a primitive type. Obviously const(int*) can never be passed to int*.</div></div>