The documents say:
A member function that is defined inside its class member list is called an inline member function.
Then a sample code I wirtten here :
// main.cpp
class Screen {
int width = 0;
int height = 0;
public:
int pixels() {
return width * height;
}
};
int main(int argc, char** argv) {
Screen s;
int pixels = s.pixels();
return 0;
}
Then, execute 'gcc -S main.cpp' and 'cat main.s', there are codes :
As you see above, there are several independent and complete functions, include 'Screen::pixels()'.
So here, I am puzzled,
why does the document say :
the member functions in the class are inline functions?
In the end, what I am most interested in is :
how to verify it?