>>I notice that compiling older C++ program with /clr option needs a lot of
>>time. Now I have a program below which use mix code feature in C++/CLI:
[quoted text clipped - 15 lines]
> function definitions placed inline, java-style, that should be moved to a
> separate .cpp file.
Ben, he said lines, not members.
Ben Voigt [C++ MVP] - 22 Jun 2007 21:45 GMT
>>>I notice that compiling older C++ program with /clr option needs a lot of
>>>time. Now I have a program below which use mix code feature in C++/CLI:
[quoted text clipped - 17 lines]
>
> Ben, he said lines, not members.
C++ class definitions should have (not counting blanks and comments) one
line per member.
Any function body too long to fit on a single line should be defined outside
the class definition. Failing to do this will affect build time, which was
the original complaint. It also causes changes to cause the compiler to
reprocess code that wasn't affected. The only reason to recompile all code
using the header is if the public interface changed. Implementation changes
should only require recompiling the matching .cpp file, not users.