1 Jun
2016
1 Jun
'16
12:03 a.m.
Vladimir Batov wrote:
On 2016-06-01 05:03, Emil Dotchevski wrote:
It would have been useful for C++ to allow the declaration of non-friend "member" functions outside of the type definition. This would require no change in syntax.
Interesting... and liberating... and dangerous... :-) Aren't you suggesting to actually officially support encapsulation violation?
These are called "extension methods" and they don't violate encapsulation because they aren't "friends". http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0079r0.pdf