According to the C++ specification, are the following two classes equivalently defined?
class A
{
void f()
{
}
};
class B
{
inline void f()
{
}
};
i.e., is putting the "inline" qualifier on such member function defined in the class definition completely redundant?
Followon question: Assuming it is redundant, for code style, would it be sensible to keep the "inline" tag, so a future developer realises that function should be inlined, and does not remove the definition somewhere else and remove the inlining?
Thanks :)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…