>>740
ちょっと違う
getx(){return x;} がクラスの中に書かれ、そのクラスがヘッダーファイルなら。
インライン展開されるので
aa = getx(){return x;}
 ||
aa = A.x と同じ
最適化は関係ない