When a function which take a pointer in argument is inlined, does the compiler remove the indirection during the optimization process ? Of course when it makes sense..
Here is an obvious example:
inline void say_hello (person* p) {
std::cout << "hello " << p->name << std::endl;
}
int main () {
person goldorak;
goldorak.name = "Goldorak";
say_hello(&goldorak);
return 0;
}
This case is trivial but if the compiler does the optimization is there some cases in which it doesn't ?
Bonus: where can I get a list of some "basic" optimizations made by my compiler ?
Ps: I'm just curious