From d26e98f247ae2057de65ec4f057d51bbb5a3aad6 Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Thu, 31 Aug 2023 10:39:14 -0400 Subject: [PATCH] fix regression in databasedatum --- database.d | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/database.d b/database.d index f7ea38d..1cd55df 100644 --- a/database.d +++ b/database.d @@ -174,9 +174,15 @@ struct DatabaseDatum { 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; + + /// ditto + T opCast(T)() { + import std.conv; + return to!T(this.toString); + } } /++