Does C++11 have C#-style properties?

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

    Foo foo;
    Foo getFoo() { return foo; }

Is there some such concept in the C++11 allowing me to have some syntax sugar on this?

Leave a Comment