You can emulate getter and setter to some extent by having a member of dedicated type and overriding operator(type) and operator= for it. Whether it's a good idea is another question and I'm going to +1 Kerrek SB's answer to express my opinion thereon :)