A
Alvin
Hello all,
I'm curious as to your opinions on explicitly inlining function? I'm talking
about functions as members of a class. For example, so class A defines a
operator==() and a operator!=():
class_a.h:
class A
{
public:
A();
bool operator==(A &rhs);
inline bool operator!=(A &rhs);
...
};
bool A:perator!=(A &rhs)
{
return !(*this == rhs);
}
Is it something that should be done by the programmer or should we assume
that compiler optimisations will take care of it?
I'm curious as to your opinions on explicitly inlining function? I'm talking
about functions as members of a class. For example, so class A defines a
operator==() and a operator!=():
class_a.h:
class A
{
public:
A();
bool operator==(A &rhs);
inline bool operator!=(A &rhs);
...
};
bool A:perator!=(A &rhs)
{
return !(*this == rhs);
}
Is it something that should be done by the programmer or should we assume
that compiler optimisations will take care of it?