In C#, there is a nice syntax sugar for fields with getter and setter. Moreover, I like the auto-implemented properties which allow me to write
public Foo foo { get; private set; }
In C++ I have to write
private: Foo foo; public: Foo getFoo() { return foo; }
Is there some such concept in the C++11 allowing me to have some syntax sugar on this?