On 4/22/16 10:14 AM, Elizabeta wrote:
Hi but private functions from base are not inherited in the derived right? so serialize should not be seen in the derived class imho. Also why is not wrong, one can forget to write serialize for the derived class.
LOL - good point - you're clearly a smart person. But there's a catch here. people want to be able to serialize private members. So the serialization library calls through the serialization::access which is a friend. This "works around" the normal way of calling a function from a derived class so the "private" is in effect broken. So serialization::access basically converts a private "serialize" function so it means "private except for serialization". You can see this be puting a debug trap on the serialize function and running under the debugger and then checking the stack. That should make clear. Robert Ramey
-- View this message in context: http://boost.2283326.n4.nabble.com/Serialization-Compiler-does-not-give-erro... Sent from the Boost - Users mailing list archive at Nabble.com.