[gmx-developers] C++ decisions - header file extension - use of bool

Teemu Murtola teemu.murtola at gmail.com
Mon Mar 18 20:40:44 CET 2013


On Fri, Mar 15, 2013 at 4:56 PM, David van der Spoel
<spoel at xray.bmc.uu.se>wrote:

> All C header files that can in principle be included by C++ code need to
> have the extern "C" included. I guess we need a strict 1:1 correspondence
> language wise (i.e. .c file with .h header and .cpp file with .hpp header)
> and .cpp files can include .h files (which therefore need to be adapted),
> but .c files can not include .hpp files.

This probably needs to be relaxed a bit: for the foreseeable future, we
will probably need some files where the implementation is (partly) C++, but
the interface is callable from C. Right now, e.g., statutil.cpp/.h are such
a pair.

I'm ready to do the renaming if we agree.

As I said earlier, I don't care that much about the extension, so if you
manage to reach a consensus on what to do (or are happy with "silent
approval"), I won't object. Just note that #include statements are not the
only thing that are affected by the rename, so some care is needed. At
least the following come to mind:

   - Include guards are derived from the name of the header, and would be
   best renamed for consistency.
   - Build system contains references to the headers (e.g., listing
   installed headers).
   - Doxygen documentation may reference headers by file name, and this may
   silently break if the referenced header gets renamed.
   - Several scripts may have dependencies/references on the extensions: at
   least admin/includedeps.* and src/gromacs/selection/regenerate_parser.sh
   (and the .y, .l files).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20130318/ba0406dd/attachment.html>

More information about the gromacs.org_gmx-developers mailing list