Can Static-libraries functions get inlined?
lets say I have these files
main.cpp
#include <lib/header.hpp>
int main() {
return lib::meaningoflife();
}
lib/header.hpp
namespace lib {
int meaningoflife();
}
lib/source.cpp
namespace lib {
int meaningoflife(){ return 42;}
}
Will main just return 42 directly or will it have to call the function? If I make lib
a ststic library and link it to my program or does it still require LTO?