Re: Code compiles with g++ 3.3 but not g++ 4.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dave,
> 
> Is there a "correct" way to name these files? I had never seen this ".inc"
> idea before. If I change to #include the ".cpp" file, should it be a ".txx"
> file? That's the extension I've seen for template files... is it a "real"
> one?
Just look at the C++-standard-library of gcc - that's exactly the way it
is written: the include-files contain the complete template definitions
of e.g. std::map, ... .

I don't know of a general "correct" way:

 - looking at the man-page of g++, I would propose something of
   .hh, .H, .hp, .hxx, .hpp, .HPP, .h++, .tcc

 - in the standard - library, ".tcc" is used for the template
   definitions, if they are in a separate file. If not, everything is in
   a ".h" file
 
 - the blitz-library uses .cc and .h

 - the boost-library includes the definitions and the declarations both
   in a single ".hpp"-file

So: just do it as you like:-)

Axel

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux