Hi,
-fvisibility-inlines-hidden only affects inline methods. It does not
affect inline functions which are not methods. E.g., your test cases
uses std::sort, but std::sort is not an inline method of any
class. In
general -fvisibility-inlines-hidden does not apply to template
instantiations, since that would break explicit instantiations.
Thanks. We do see this happening for members as well such as
std::vector<T>::_M_insert_aux. Do I understand you correctly the
option only applies to non-template inline member functions? That
would be unfortunate as we have by far more template-generated inline
goo than other origins :-/
Is there any way to override the above restriction to apply to all
inlines - or at least templates and out-of-class free functions
included - and/or would a patch to enable such behaviour be accepted?
Should one expect any major drawbacks for such a change on pretty bog
standard C++ use, such as standard library or boost?
Is different visibility for template specialisations common for those
that use the option? I couldn't think of any construct in our code
that would call for it, and was wondering if there were examples of
how it's used elsewhere so that I don't misunderstand this feature.
Lassi