Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

Inlining virtual member function calls

$
0
0

Hi,


I wonder if the TI C++ compiler/linker is capable of inlining virtual member function calls given that only one class implementing that virtual function is instantiated in a statically linked program.


We want to write well testable code and are therefore currently concerning writing pure virtual interface classes for almost every class. We hope that we will be able to easily exchange those classes with mock-up implementations while testing. However, we are worried that we will see a massive drop in performance in our release build when enforcing this design rule because the compiler might not be able to inline most of our function calls anymore.

Is this a valid concern? If so, how would you write unit tests without making use of virtual functions?


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>