std::string has over 30 member functions that can be called on a string object.
What if I only use a few of them?
I assume the unused member functions will not take up space in the executable code section.
I'm curious to know whether or not it's possible for the linker to determine a member function unused, remove it from being part of the compiled binary, and report what functions it threw away.
Is there any way to do this? I was looking at gcc's linker flags, but I couldn't find anything relevant.