explicitly flag ForceConst class destructor as noexcept(false) since call to set_ntypes() may throw exception
This commit is contained in:
@ -59,7 +59,7 @@ class AngleCharmmIntel : public AngleCharmm {
|
||||
|
||||
fc_packed1 *fc;
|
||||
ForceConst() : fc(nullptr), _nangletypes(0) {}
|
||||
~ForceConst() { set_ntypes(0, nullptr); }
|
||||
~ForceConst() noexcept(false) { set_ntypes(0, nullptr); }
|
||||
|
||||
void set_ntypes(const int nangletypes, Memory *memory);
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@ class AngleHarmonicIntel : public AngleHarmonic {
|
||||
|
||||
fc_packed1 *fc;
|
||||
ForceConst() : fc(nullptr), _nangletypes(0) {}
|
||||
~ForceConst() { set_ntypes(0, nullptr); }
|
||||
~ForceConst() noexcept(false) { set_ntypes(0, nullptr); }
|
||||
|
||||
void set_ntypes(const int nangletypes, Memory *memory);
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@ class BondFENEIntel : public BondFENE {
|
||||
fc_packed1 *fc;
|
||||
|
||||
ForceConst() : fc(nullptr), _nbondtypes(0) {}
|
||||
~ForceConst() { set_ntypes(0, nullptr); }
|
||||
~ForceConst() noexcept(false) { set_ntypes(0, nullptr); }
|
||||
|
||||
void set_ntypes(const int nbondtypes, Memory *memory);
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@ class BondHarmonicIntel : public BondHarmonic {
|
||||
fc_packed1 *fc;
|
||||
|
||||
ForceConst() : fc(nullptr), _nbondtypes(0) {}
|
||||
~ForceConst() { set_ntypes(0, nullptr); }
|
||||
~ForceConst() noexcept(false) { set_ntypes(0, nullptr); }
|
||||
|
||||
void set_ntypes(const int nbondtypes, Memory *memory);
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@ class DihedralCharmmIntel : public DihedralCharmm {
|
||||
flt_t *weight;
|
||||
|
||||
ForceConst() : ljp(nullptr), fc(nullptr), weight(nullptr), _npairtypes(0), _ndihderaltypes(0) {}
|
||||
~ForceConst() { set_ntypes(0, 0, nullptr); }
|
||||
~ForceConst() noexcept(false) { set_ntypes(0, 0, nullptr); }
|
||||
|
||||
void set_ntypes(const int npairtypes, const int ndihderaltypes, Memory *memory);
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@ class DihedralFourierIntel : public DihedralFourier {
|
||||
fc_packed1 **fc;
|
||||
|
||||
ForceConst() : fc(nullptr), _ndihedraltypes(0) {}
|
||||
~ForceConst() { set_ntypes(0, nullptr, nullptr, nullptr); }
|
||||
~ForceConst() noexcept(false) { set_ntypes(0, nullptr, nullptr, nullptr); }
|
||||
|
||||
void set_ntypes(const int ndihedraltypes, int *setflag, int *nterms, Memory *memory);
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@ class DihedralHarmonicIntel : public DihedralHarmonic {
|
||||
fc_packed1 *fc;
|
||||
|
||||
ForceConst() : fc(nullptr), _ndihderaltypes(0) {}
|
||||
~ForceConst() { set_ntypes(0, nullptr); }
|
||||
~ForceConst() noexcept(false) { set_ntypes(0, nullptr); }
|
||||
|
||||
void set_ntypes(const int ndihderaltypes, Memory *memory);
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ class DihedralOPLSIntel : public DihedralOPLS {
|
||||
fc_packed1 *fc;
|
||||
|
||||
ForceConst() : fc(nullptr), _ndihderaltypes(0) {}
|
||||
~ForceConst() { set_ntypes(0, nullptr); }
|
||||
~ForceConst() noexcept(false) { set_ntypes(0, nullptr); }
|
||||
|
||||
void set_ntypes(const int ndihderaltypes, Memory *memory);
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ class ImproperCvffIntel : public ImproperCvff {
|
||||
fc_packed1 *fc;
|
||||
|
||||
ForceConst() : fc(nullptr), _nimpropertypes(0) {}
|
||||
~ForceConst() { set_ntypes(0, nullptr); }
|
||||
~ForceConst() noexcept(false) { set_ntypes(0, nullptr); }
|
||||
|
||||
void set_ntypes(const int nimpropertypes, Memory *memory);
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@ class ImproperHarmonicIntel : public ImproperHarmonic {
|
||||
fc_packed1 *fc;
|
||||
|
||||
ForceConst() : fc(nullptr), _nimpropertypes(0) {}
|
||||
~ForceConst() { set_ntypes(0, nullptr); }
|
||||
~ForceConst() noexcept(false) { set_ntypes(0, nullptr); }
|
||||
|
||||
void set_ntypes(const int nimpropertypes, Memory *memory);
|
||||
|
||||
|
||||
@ -77,7 +77,7 @@ class PairBuckCoulCutIntel : public PairBuckCoulCut {
|
||||
c_cut_t **c_cut;
|
||||
|
||||
ForceConst() : _ntypes(0), _ntable(0) {}
|
||||
~ForceConst() { set_ntypes(0, 0, nullptr, _cop); }
|
||||
~ForceConst() noexcept(false) { set_ntypes(0, 0, nullptr, _cop); }
|
||||
|
||||
void set_ntypes(const int ntypes, const int ntable, Memory *memory, const int cop);
|
||||
|
||||
|
||||
@ -79,7 +79,7 @@ class PairBuckCoulLongIntel : public PairBuckCoulLong {
|
||||
flt_t *etable, *detable, *ctable, *dctable;
|
||||
|
||||
ForceConst() : _ntypes(0), _ntable(0) {}
|
||||
~ForceConst() { set_ntypes(0, 0, nullptr, _cop); }
|
||||
~ForceConst() noexcept(false) { set_ntypes(0, 0, nullptr, _cop); }
|
||||
|
||||
void set_ntypes(const int ntypes, const int ntable, Memory *memory, const int cop);
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ class PairBuckIntel : public PairBuck {
|
||||
c_energy_t **c_energy;
|
||||
|
||||
ForceConst() : _ntypes(0) {}
|
||||
~ForceConst() { set_ntypes(0, nullptr, _cop); }
|
||||
~ForceConst() noexcept(false) { set_ntypes(0, nullptr, _cop); }
|
||||
|
||||
void set_ntypes(const int ntypes, Memory *memory, const int cop);
|
||||
|
||||
|
||||
@ -83,7 +83,7 @@ class PairDPDIntel : public PairDPD {
|
||||
int *rngi;
|
||||
|
||||
ForceConst() : _ntypes(0) {}
|
||||
~ForceConst() { set_ntypes(0, 0, 0, nullptr, _cop); }
|
||||
~ForceConst() noexcept(false) { set_ntypes(0, 0, 0, nullptr, _cop); }
|
||||
|
||||
void set_ntypes(const int ntypes, const int nthreads, const int max_nbors, Memory *memory,
|
||||
const int cop);
|
||||
|
||||
@ -73,7 +73,7 @@ class PairEAMIntel : public PairEAM {
|
||||
fc_packed2 *z2r_spline_t;
|
||||
|
||||
ForceConst() : _ntypes(0), _nr(0) {}
|
||||
~ForceConst() { set_ntypes(0, 0, 0, nullptr, _cop); }
|
||||
~ForceConst() noexcept(false) { set_ntypes(0, 0, 0, nullptr, _cop); }
|
||||
|
||||
void set_ntypes(const int ntypes, const int nr, const int nrho, Memory *memory, const int cop);
|
||||
inline int rhor_jstride() const { return _nr; }
|
||||
|
||||
@ -76,7 +76,7 @@ class PairGayBerneIntel : public PairGayBerne {
|
||||
int **jtype_form, **jlist_form;
|
||||
|
||||
ForceConst() : _ntypes(0) {}
|
||||
~ForceConst() { set_ntypes(0, 0, 0, nullptr, _cop); }
|
||||
~ForceConst() noexcept(false) { set_ntypes(0, 0, 0, nullptr, _cop); }
|
||||
|
||||
void set_ntypes(const int ntypes, const int one_length, const int nthreads, Memory *memory,
|
||||
const int cop);
|
||||
|
||||
@ -68,7 +68,7 @@ class PairLJCharmmCoulCharmmIntel : public PairLJCharmmCoulCharmm {
|
||||
typename IntelBuffers<flt_t, flt_t>::vec4_t **lj;
|
||||
|
||||
ForceConst() : _ntypes(0) {}
|
||||
~ForceConst() { set_ntypes(0, nullptr, _cop); }
|
||||
~ForceConst() noexcept(false) { set_ntypes(0, nullptr, _cop); }
|
||||
|
||||
void set_ntypes(const int ntypes, Memory *memory, const int cop);
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ class PairLJCharmmCoulLongIntel : public PairLJCharmmCoulLong {
|
||||
typename IntelBuffers<flt_t, flt_t>::vec2_t **lj;
|
||||
|
||||
ForceConst() : _ntypes(0), _ntable(0) {}
|
||||
~ForceConst() { set_ntypes(0, 0, nullptr, _cop); }
|
||||
~ForceConst() noexcept(false) { set_ntypes(0, 0, nullptr, _cop); }
|
||||
|
||||
void set_ntypes(const int ntypes, const int ntable, Memory *memory, const int cop);
|
||||
|
||||
|
||||
@ -78,7 +78,7 @@ class PairLJCutCoulLongIntel : public PairLJCutCoulLong {
|
||||
flt_t *etable, *detable, *ctable, *dctable;
|
||||
|
||||
ForceConst() : _ntypes(0), _ntable(0) {}
|
||||
~ForceConst() { set_ntypes(0, 0, nullptr, _cop); }
|
||||
~ForceConst() noexcept(false) { set_ntypes(0, 0, nullptr, _cop); }
|
||||
|
||||
void set_ntypes(const int ntypes, const int ntable, Memory *memory, const int cop);
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ class PairLJCutIntel : public PairLJCut {
|
||||
fc_packed2 **lj34;
|
||||
|
||||
ForceConst() : _ntypes(0) {}
|
||||
~ForceConst() { set_ntypes(0, nullptr, _cop); }
|
||||
~ForceConst() noexcept(false) { set_ntypes(0, nullptr, _cop); }
|
||||
|
||||
void set_ntypes(const int ntypes, Memory *memory, const int cop);
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@ class PairSWIntel : public PairSW {
|
||||
fc_packed3 ***p3;
|
||||
|
||||
ForceConst() : p2(0), p2f(0), p2f2(0), p2e(0), p3(0), _ntypes(0) {}
|
||||
~ForceConst() { set_ntypes(0, nullptr, _cop); }
|
||||
~ForceConst() noexcept(false) { set_ntypes(0, nullptr, _cop); }
|
||||
|
||||
void set_ntypes(const int ntypes, Memory *memory, const int cop);
|
||||
|
||||
|
||||
@ -84,7 +84,7 @@ class PairTersoffIntel : public PairTersoff {
|
||||
c_outer_t **c_outer;
|
||||
c_inner_t ***c_inner;
|
||||
ForceConst() : _ntypes(0) {}
|
||||
~ForceConst() { set_ntypes(0, nullptr, _cop); }
|
||||
~ForceConst() noexcept(false) { set_ntypes(0, nullptr, _cop); }
|
||||
|
||||
void set_ntypes(const int ntypes, Memory *memory, const int cop);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user