17 Oct
2018
17 Oct
'18
3:52 p.m.
Robert Ramey wrote:
When I looked at the test my attention was immediately drawn to the following:
const char* impossible = "impossible"; return impossible != boost::serialization::extended_type_info_typeid<float>::get_const_instance().get_key();
I memory serves me, get_key() will return the address of string of characters inside the the address space of the DLL. This address is compared to the address of "impossible" which is an address inside the address space of the calling mainline application. I could not and cannot understand what is being tested here.
It's a dummy comparison whose only purpose is to make use of the return value to prevent the optimizer from removing the call entirely.