After trying your solution I found out I was calling
indexOf(string, char) which apparently is different than
indexOf(string, string) as I now no longer have that error.
Instead, when I call parse on compile time I get the following
at the method parse:
Error: URI class literals cannot be returned from CTFE
It looks like you can't have class enums. This fails too:
class A{}
enum a = new A;
I don't think you can get around this, but you can still test if
your URI class works at compile time by doing something like this:
auto foo()
{
// Write code that uses the URI class here
// return something that can be assigned to an enum
return something;
}
enum bar = foo();