Make using C++ type with snew() a compiler error
authorTeemu Murtola <teemu.murtola@gmail.com>
Sun, 4 Oct 2015 06:33:01 +0000 (09:33 +0300)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Mon, 5 Oct 2015 12:32:32 +0000 (14:32 +0200)
commit21a48bde8ad1f5fac2f7afbbf4c88d63155bbea1
tree34c4a3d89d916a91c3b70a8a5ffabaf87de338b3
parent041719a20ccdc273703f718787841d386fbffe58
Make using C++ type with snew() a compiler error

Make it impossible to use snew() and friends on a C++ type (now gives a
compiler error).  This is possible with C++11, and makes it much less
error-prone to start introducing C++ code into existing C structs.

As a side effect, this enforces also proper encapsulation of memory
management for opaque structs.  Fixed a few instances where this wasn't
the case.

CUDA code skips these assertions.

Change-Id: I470dc077bb82c6ca7da5fb9a2daa64211b6d632c
src/gromacs/gmxana/gmx_anadock.cpp
src/gromacs/gmxana/gmx_dipoles.cpp
src/gromacs/gmxana/gmx_msd.cpp
src/gromacs/statistics/statistics.cpp
src/gromacs/statistics/statistics.h
src/gromacs/utility/basedefinitions.h
src/gromacs/utility/smalloc.h
src/programs/mdrun/membed.cpp
src/programs/mdrun/membed.h
src/programs/mdrun/runner.cpp