According to the C++ specification, are the following two classes equivalently defined?
class A { void f() { } }; class B { inline void f() {
The C++ ISO standard says:
A function defined within a class definition is an inline function.
But, this doesn't mean the function will necessarily be inlined: generally nowadays, it appears that the compiler will decide if inlining the function will lead to any benefits.