This is working perfectly fine with g++ compiler:
class AliasTest {
private:
int value;
public:
const int &Value = value;
AliasTest(int Value) {
value = Value;
}
};
I have read-only-access on the outside (attempted write access fails at compilation) and full access on the inside and I don't need a function. Could that become a problem for other compilers?