Bitcoin full node and query server

Feb 26, 2019

View in context in the libbitcoin Slack #general mirror.

neillm17:38
Stack Overflow
My question is in regards to friend functions as well as overloading the << and >>. From my understanding I thought friend functions could (and should) access private member variables directly.
2 replies · Phil · last Feb 27, 2019
P
Phil17:51
Thanks for sharing that, but still, @neillm, there is no access to private attribute on the methods implementations. So is friend needed?
P
Phil10:16
@neillm I figured it out why friend is needed on the overloading of >> and << in payment_address.hpp. friend makes the overloading a non-member method. So it can be declared in the right way inside the payment_address class. Interesting