diff --git a/std/getopt.d b/std/getopt.d index f01051cad..a1440b8e9 100644 --- a/std/getopt.d +++ b/std/getopt.d @@ -595,6 +595,9 @@ void handleOption(R)(string option, R receiver, ref string[] args, alias K = typeof(receiver.keys[0]); alias V = typeof(receiver.values[0]); + import std.range : only; + import std.typecons : Tuple, tuple; + static Tuple!(K, V) getter(string input) { auto j = std.string.indexOf(input, assignChar); @@ -609,8 +612,6 @@ void handleOption(R)(string option, R receiver, ref string[] args, (*receiver)[k] = v; } - import std.range : only; - if (arraySep == "") setHash(receiver, val.only); else