fix6208 on inout

This commit is contained in:
k-hara 2011-09-09 14:42:58 +09:00
parent 5687e20d2b
commit 42324e028b
3 changed files with 20 additions and 13 deletions

View file

@ -787,7 +787,7 @@ that points to $(D target)'s representation or somewhere inside
it. Note that evaluating $(D pointsTo(x, x)) checks whether $(D x) has
internal pointers.
*/
bool pointsTo(S, T)(ref const S source, ref const T target) @trusted pure nothrow
bool pointsTo(S, T, Tdummy=void)(ref const S source, ref const T target) @trusted pure nothrow
{
static if (is(S P : U*, U))
{
@ -813,6 +813,12 @@ bool pointsTo(S, T)(ref const S source, ref const T target) @trusted pure nothro
return false;
}
}
// for shared objects
bool pointsTo(S, T)(ref const shared S source, ref const shared T target) @trusted pure nothrow
{
alias pointsTo!(shared(S), shared(T), void) ptsTo; // do instantiate explicitly
return ptsTo(source, target);
}
unittest
{