Most of the functions in <functional>
use functors. If I write a struct like this:
struct Test
{
bool operator()
{
//Something
}
//No member variables
};
Is there a perf hit? Would an object of Test
be created? Or can the compiler optimize the object away?