I tried this: immutable int[char] xx = ['Q':0, 'B':1, 'N':2, 'R':3, 'P':4];
And got a "non-constant expression" error (with or without 'immutable').
What's the correct way?
Yuxuan Shui via Digitalmars-d-learn Fri, 23 Dec 2016 17:01:22 -0800
I tried this: immutable int[char] xx = ['Q':0, 'B':1, 'N':2, 'R':3, 'P':4];
And got a "non-constant expression" error (with or without 'immutable').
What's the correct way?