Hi, so if you have this piece of code:

struct C {

  void f() {
    string[] others;
    const string[] restArgs;
    foreach (i, arg; args) {
      if (isValidArg(arg)) {
        restArgs = args[i + 1 .. $];
        break;
      }
      others ~= arg;
    }
// "others" is a list of args before the valid arg is encountered
    // "restArgs" is a list that is the args after the valid arg
  }
}

Is there anyway to set a const object after declaring it in the above context?

Cheers,
- Ali

Reply via email to