This is the mail archive of the cygwin-talk mailing list for the cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: how come #include "*.cpp" works?


On 18 May 2006 19:28, mwoehlke wrote:


>>   Something like this?
> (moved below)
> 
> Hey, that's pretty slick... thanks!

  :)  It's a fairly standard technique.  The particularly good thing about it
is that there's no danger of anything getting out-of-sync because it all comes
from one source and hence has to remain consistent.  Gcc and other big
highly-configurable projects do this all the time, and even more advanced
stuff.

> Upon further thought, I may actually do something with my Makefile and
> auto-generation of some file, but I think I'm still going to use part of
> this. (Having an entire class declaration inside of a macro kind-of rubs
> me wrong ;-). Also, I want to keep each class in its own header.)

  Yep, it's certainly a little ugly, but it serves to illustrate the
technique; feel free to adapt and mutate to best serve your own purposes!


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]