On Tuesday, 7 September 2021 at 05:00:50 UTC, Chris Piker wrote:
On Tuesday, 7 September 2021 at 04:40:25 UTC, jfondren wrote:

    typeof(parseXML!simpleXML("")) xml;

Hey, I like this trick!

I was wondering what to use for the const(char)[] variable in the typeof statement. It's blindingly obvious in retrospect. Wouldn't work so well if there wasn't a literal for the input data range type.

You can always use the `.init` value of a type (in this case, `(const(char)[]).init`) as a dummy value for things like this.

Reply via email to