Though it may not be a good idea to inline such a large amount of codes, I hope that there is a way to deliberately inline all designated STL codes. For example,
#include <list>
#include <iostream>
std::list<int> list;
/* SKIPPED : INSERT RANDOM NUMBERS */
list.sort(); // forcibly inlined
for (int &num : list)
std::cout << num << std::endl;
The goal is that I have to eliminate every possible STL function invocation overhead no matter how ridiculous it is and how small or large the member functions they are. All of the STL source codes is able to be modified. How to successfully achieve this either in gcc 6.2.0 or clang 3.0?