diff --git a/regtest/basic/rt-make-wrappers/COLVAR.reference b/regtest/basic/rt-make-wrappers/COLVAR.reference index b4d38c02e0c0b44b2d34f4261138e39d8e878ce3..1d11bf0959bca59a5690c9dc11143bc22f8726fc 100644 --- a/regtest/basic/rt-make-wrappers/COLVAR.reference +++ b/regtest/basic/rt-make-wrappers/COLVAR.reference @@ -54,3 +54,7 @@ 0.000000 0.000000 #! FIELDS time d 0.000000 0.000000 +#! FIELDS time d + 0.000000 0.000000 +#! FIELDS time d + 0.000000 0.000000 diff --git a/regtest/basic/rt-make-wrappers/main.cpp b/regtest/basic/rt-make-wrappers/main.cpp index 047ece96b60f105f106ae3c2b1c602afe9ee3ed7..e36280be43a998379d021db3fe15b6345522e93e 100644 --- a/regtest/basic/rt-make-wrappers/main.cpp +++ b/regtest/basic/rt-make-wrappers/main.cpp @@ -137,13 +137,26 @@ int main(){ testmecpp(p); } + { +// test move semantics + PLMD::Plumed p; + PLMD::Plumed q(std::move(p)); + testmecpp(q); + } + + { + PLMD::Plumed p,q; + q=std::move(p); + testmecpp(q); + } + if(PLMD::Plumed::ginitialized()) return 0; PLMD::Plumed::gcreate(); if(!PLMD::Plumed::ginitialized()) return 0; // this requires move semantics and only works with C++11 - //PLMD::Plumed fromglobal(PLMD::Plumed::global()); + PLMD::Plumed fromglobal(PLMD::Plumed::global()); // here's a workaround for plumed 2.3: - PLMD::Plumed fromglobal(plumed_global()); + //PLMD::Plumed fromglobal(plumed_global()); testmecpp(fromglobal); PLMD::Plumed::gfinalize(); if(PLMD::Plumed::ginitialized()) return 0;