Boost logo

Boost :

Subject: Re: [boost] Pimpl Again?
From: Peter Dimov (lists_at_[hidden])
Date: 2016-05-31 20:03:40


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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk