code substitutions
GNU g++ seems to try to automatically match STL templates to patterns
in your code. E.g. if you code a swap looking function it substitutes std::swap, is this so or am I inadvertently specifying a template ? |
Avoid specifying "using namespace std" in your code!
Also, you can always reference functions using the :: operator. Here's an example that you can play with: Code:
#include <algorithm> |
whoops
I(Loarn) was trying to get the compiler to use my code and not what it considered a match
from the template supply, What finally dawned on me, I have been away for awhile, was that is was not necessarily using the template but since I had #included <algorithm> and was compiling with the -E flag, it was including the entire algorithm header file in the assembler stage of the compile. Thanks for your assistance, please ignore the misspelling I was schooled in the progressive era. |
All times are GMT -5. The time now is 07:22 AM. |