C#-style property in C++

C# has a nice feature called class/struct property. It is a public data member but with the ability to control read/write access, underlying storage or to compute the value on the fly. You can think of it as a glorified getter/setter mechanism: a syntax sugar around get/set methods. My idea to implement something like this […]