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

Mark Abraham mark.j.abraham at gmail.com
Fri Mar 15 09:46:20 CET 2013

I'm happy with .hpp. Some clarity about code that is supposed to be "C++"
and that which is still "C perhaps being called by some C++ interface" is a
good thing. Some of that clarity will come from the location in the source
tree, of course.

Happy to keep gmx_bool. I can't think of a real advantage with switching to
bool, even after the transition. Keeping gmx_bool as a typedef gives us
some leverage if we ever need it to be something else.


On Fri, Mar 15, 2013 at 8:56 AM, Magnus Lundborg <
magnus.lundborg at scilifelab.se> wrote:

> Hi,
> I agree that it's good to be able to tell the headers apart, so I vote for
> .hpp. I actually think .hpp would be a good choice even if we had only c++
> code.
> I don't see any problem with gmx_bool. If we manage to switch to pure c++
> later on we can always change to bool then (with some extra work).
> /Magnus
> On 03/15/2013 08:49 AM, David van der Spoel wrote:
>> Hi,
>> I have two simple questions that have been brought up before but would be
>> good to settle.
>> First is about header file name. Since we will for the foreseeable future
>> at least have both C and C++ code it would be good in my opinion to have a
>> clear distinction in file names. The C++ files have extension .cpp
>> throughout, but the header files are .h. I would like to propose to mv
>> those to .hpp.
>> Second is the use of bool versus gmx_bool. I was convinced at first that
>> bool was the way to go, but of course this is not portable to C code, so it
>> is probably better to stick with gmx_bool.
>> Comments, opinions?
> --
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://lists.gromacs.org/**mailman/listinfo/gmx-**developers<http://lists.gromacs.org/mailman/listinfo/gmx-developers>
> Please don't post (un)subscribe requests to the list. Use the www
> interface or send it to gmx-developers-request@**gromacs.org<gmx-developers-request at gromacs.org>
> .
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20130315/7b585620/attachment.html>

More information about the gromacs.org_gmx-developers mailing list