How can I get around this?

```
struct Foo(T) {

  static foreach (m; __traits(derivedMembers, T)) {
    static foreach (i, method; __traits(getOverloads, T, m)) {
      static if (is(typeof(method) Params == __parameters)) {
      }
    }
  }
}
```

Error: declaration `Params` is already defined here.

If I recall, there used to be a trick for static foreach using double braces, but the compiler complains "declaration expected not {".


  • static foreach d... Ssenni via Digitalmars-d-learn

Reply via email to