Posted on 2002-07-20
Is there some kind of a problem with inline functions when using MFC?
I have written a class which manages arrays and it has several inline functions. For example, the operator  is inline.
First of all, if the header and the body of a function are in different files and the function is declared inline, the program does not link! If I put the body inside the class declaration (which is supposed to make it automatically inline), the program links. However, there is no difference from the not-inline function. I measured times and realized that a simple array (straightforward memory usage) works far more quickly than a class which has a simple array as its data member and uses inline  operator!
Am I doing something wrong? If so, please point it out. If not, could someone explain to me, what is the point of writing a class for managing arrays when it wastes tons of time?