Why didn't the C ++ standard add “properties” a la C #?

By properties, I mean C # style properties with getters and setters.

I am interested to know why they are not part of the C ++ language. I suppose that such a function should have been discussed at the time of writing the specification, so a good faith decision not to include it in the language.

+6
source share
1 answer

here is one implementation: http://www.codeguru.com/cpp/cpp/cpp_mfc/article.php/c4031/Implementing-a-Property-in-C.htm

int i = 5,j; PropTest test; test.Count = i; //-- call the set method -- j= test.Count; //-- call the get method -- 
+1
source

Source: https://habr.com/ru/post/911247/


All Articles