C++: How do I work out the usage count of a function template?
1 21 Nov 2017 13:48 by u/skruf
Purely out of curiosity, I wonder how many times the compiler used a given function template to make a function. Is this possible?
I couldn't find anything using the search engines I utilize, so... any wizards here?
7 comments
0 u/gabara 21 Nov 2017 13:56
I can't program in D.
1 u/skruf [OP] 21 Nov 2017 13:58
So you're saying this isn't really possible in C++ ?
0 u/gabara 21 Nov 2017 13:58
No, you typed C but then you added ++ incrementing it to D. I only know C, not D.
1 u/skruf [OP] 21 Nov 2017 14:00
facepalm I'm kinda slow on taking jokes. but yeah fair enough lol
0 u/gabara 21 Nov 2017 14:01
You weren't in joke mode. I get it. I'm just being a smart ass.
0 u/theMETA 21 Nov 2017 15:26
If you can read the object file that is created upon compilation, you should be able to see exactly what's going into the binaries. That'll tell you exactly what's going on in your code, which functions are being called, and how they're being used
0 u/skruf [OP] 21 Nov 2017 16:35
Don't know why I did not think of this myself... well, thank you for the tip!