diff --git a/std/getopt.d b/std/getopt.d index d177c2962..1f5154de7 100644 --- a/std/getopt.d +++ b/std/getopt.d @@ -45,6 +45,12 @@ $(UL */ class GetOptException : Exception { + @safe pure nothrow + this(string msg, string file = __FILE__, + size_t line = __LINE__) + { + super(msg, file, line); + } @safe pure nothrow this(string msg, Exception next, string file = __FILE__, size_t line = __LINE__) @@ -53,6 +59,9 @@ class GetOptException : Exception } } +static assert(is(typeof(new GetOptException("message")))); +static assert(is(typeof(new GetOptException("message", Exception.init)))); + /** Parse and remove command line options from an string array.