Generic questions on inline functions and linking
Jonathan Wakely
jwakely@redhat.com
Thu Jul 23 09:18:00 GMT 2015
On 22/07/15 21:36 -0700, Tim Shen wrote:
>Thanks for the detailed explanation of ODR. :)
Remember that what I described as a harmless ODR violation *is still
an ODR violation* and so undefined behaviour, but as soon as someone
uses -fno-exceptions or -fno-rtti they are using a non-standard
dialect of C++ which is not defined by the standard anyway.
So some variance from what the standard allows is to be expected when
using those options, especially when mixing objects with and without
those options. In practice it works OK as long as the library is
written with a little care.
More information about the Libstdc++
mailing list