mirror of https://github.com/adamdruppe/arsd.git
fix regression in databasedatum
This commit is contained in:
parent
6cb9b0349e
commit
d26e98f247
|
@ -174,9 +174,15 @@ struct DatabaseDatum {
|
||||||
return storage.toString();
|
return storage.toString();
|
||||||
}
|
}
|
||||||
/++
|
/++
|
||||||
For compatibility with earlier versions of the api, all data can easily convert to string implicitly.
|
For compatibility with earlier versions of the api, all data can easily convert to string implicitly and opCast keeps to!x(this) working.
|
||||||
+/
|
+/
|
||||||
alias toString this;
|
alias toString this;
|
||||||
|
|
||||||
|
/// ditto
|
||||||
|
T opCast(T)() {
|
||||||
|
import std.conv;
|
||||||
|
return to!T(this.toString);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/++
|
/++
|
||||||
|
|
Loading…
Reference in New Issue