Replace compat::make_unique with std::make_unique
authorRoland Schulz <roland.schulz@intel.com>
Sat, 2 Feb 2019 19:34:02 +0000 (11:34 -0800)
committerErik Lindahl <erik.lindahl@gmail.com>
Mon, 4 Feb 2019 10:17:22 +0000 (11:17 +0100)
Change-Id: I6b0db007b8a7b9e1d72374dcee15f66587375f75

94 files changed:
docs/doxygen/cycle-suppressions.txt
src/.clang-tidy
src/.clang-tidy.new.code
src/api/cpp/context.cpp
src/api/cpp/include/gmxapi/gmxapi.h
src/api/cpp/md.cpp
src/api/cpp/mdsignals.cpp
src/api/cpp/mdsignals.h
src/api/cpp/session.cpp
src/api/cpp/status.cpp
src/api/cpp/system.cpp
src/api/cpp/workflow.cpp
src/api/cpp/workflow/tests/workflow.cpp
src/gromacs/analysisdata/datastorage.cpp
src/gromacs/awh/awh.cpp
src/gromacs/awh/bias.cpp
src/gromacs/awh/bias.h
src/gromacs/awh/tests/bias.cpp
src/gromacs/awh/tests/biasstate.cpp
src/gromacs/commandline/cmdlinehelpmodule.cpp
src/gromacs/commandline/cmdlineinit.cpp
src/gromacs/commandline/shellcompletions.cpp
src/gromacs/compat/CMakeLists.txt
src/gromacs/compat/make_unique.h [deleted file]
src/gromacs/compat/tests/make_unique.cpp
src/gromacs/correlationfunctions/tests/autocorr.cpp
src/gromacs/domdec/domdec.cpp
src/gromacs/domdec/domdec_constraints.cpp
src/gromacs/domdec/domdec_topology.cpp
src/gromacs/domdec/localatomsetmanager.cpp
src/gromacs/essentialdynamics/edsam.cpp
src/gromacs/ewald/pme-gpu-internal.cpp
src/gromacs/ewald/pme-gpu-program.cpp
src/gromacs/ewald/pme-only.cpp
src/gromacs/ewald/tests/testhardwarecontexts.cpp
src/gromacs/fileio/checkpoint.cpp
src/gromacs/fileio/tpxio.cpp
src/gromacs/gmxana/gmx_awh.cpp
src/gromacs/gmxana/gmx_msd.cpp
src/gromacs/gmxana/gmx_trjconv.cpp
src/gromacs/gmxpreprocess/convparm.cpp
src/gromacs/gmxpreprocess/grompp.cpp
src/gromacs/gmxpreprocess/pdb2gmx.cpp
src/gromacs/gpu_utils/clfftinitializer.cpp
src/gromacs/hardware/detecthardware.cpp
src/gromacs/mdlib/boxdeformation.cpp
src/gromacs/mdlib/broadcaststructs.cpp
src/gromacs/mdlib/forcerec.cpp
src/gromacs/mdlib/makeconstraints.h
src/gromacs/mdlib/mdatoms.cpp
src/gromacs/mdlib/mdebin_bar.cpp
src/gromacs/mdlib/stophandler.cpp
src/gromacs/mdlib/update.cpp
src/gromacs/mdlib/vsite.cpp
src/gromacs/mdrun/md.cpp
src/gromacs/mdrun/mimic.cpp
src/gromacs/mdrun/rerun.cpp
src/gromacs/mdrun/runner.cpp
src/gromacs/mdrun/simulationcontext.cpp
src/gromacs/mdrunutility/mdmodules.cpp
src/gromacs/mdrunutility/tests/threadaffinitytest.cpp
src/gromacs/onlinehelp/helpwritercontext.cpp
src/gromacs/options/basicoptions.h
src/gromacs/options/options.cpp
src/gromacs/options/optionsection.cpp
src/gromacs/options/optionstoragetemplate.h
src/gromacs/options/repeatingsection.h
src/gromacs/pulling/output.cpp
src/gromacs/pulling/pull.cpp
src/gromacs/pulling/pull_rotation.cpp
src/gromacs/restraint/manager.cpp
src/gromacs/restraint/restraintmdmodule.cpp
src/gromacs/selection/parsetree.cpp
src/gromacs/selection/parsetree.h
src/gromacs/selection/selectioncollection.cpp
src/gromacs/selection/tests/toputils.cpp
src/gromacs/swap/swapcoords.cpp
src/gromacs/tools/report-methods.cpp
src/gromacs/topology/atomprop.cpp
src/gromacs/trajectoryanalysis/modules/angle.cpp
src/gromacs/trajectoryanalysis/modules/distance.cpp
src/gromacs/trajectoryanalysis/topologyinformation.cpp
src/gromacs/utility/alignedallocator.cpp
src/gromacs/utility/any.h
src/gromacs/utility/keyvaluetreetransform.cpp
src/programs/mdrun/mdrun.cpp
src/programs/mdrun/tests/energyreader.cpp
src/programs/mdrun/tests/minimize.cpp
src/programs/mdrun/tests/normalmodes.cpp
src/programs/mdrun/tests/rerun.cpp
src/programs/mdrun/tests/simple_mdrun.cpp
src/testutils/refdata-impl.h
src/testutils/testinit.cpp
src/testutils/textblockmatchers.cpp

index 09410e82d6eb878b43f299e366928296b872c9b6..9c8f5a457482360f2e6b952c626d5200beaee2c8 100644 (file)
@@ -1,7 +1,6 @@
 # Order (or more generally, edge selection) is significant (see gmxtree.md);
 # "moduleA -> moduleB" means that moduleA should not depend on moduleB, and is
 # a problem to be addressed at some point.
-compat -> utility
 domdec -> imd
 domdec -> ewald
 domdec -> mdlib
index 20be0b77f7be9e9af9155b8fcabf2578a9e89b0f..88b91c2adde054fe083ae79e92410edf63adb1bb 100644 (file)
@@ -16,10 +16,6 @@ HeaderFilterRegex: .*
 CheckOptions:
   - key:           cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
     value:         1
-  - key:           modernize-make-unique.MakeSmartPtrFunction
-    value:         gmx::compat::make_unique
-  - key:           modernize-make-unique.MakeSmartPtrFunctionHeader
-    value:         gromacs/compat/make_unique.h
   - key:           modernize-make-unique.IncludeStyle
     value:         google
   - key:           modernize-make-shared.IncludeStyle
index e495372d9b597af5828bab8719f8ee195b8b7743..d6d1d93fe43ad9716244131bf4f963dd683475c0 100644 (file)
@@ -20,10 +20,6 @@ HeaderFilterRegex: .*
 CheckOptions:
   - key:           cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
     value:         1
-  - key:           modernize-make-unique.MakeSmartPtrFunction
-    value:         gmx::compat::make_unique
-  - key:           modernize-make-unique.MakeSmartPtrFunctionHeader
-    value:         gromacs/compat/make_unique.h
   - key:           modernize-make-unique.IncludeStyle
     value:         google
   - key:           modernize-make-shared.IncludeStyle
index bea12dbf0f65ea0b57fcee99840275f772d3b693..d11571e878f40708c8aec7c509a65bbecf6f2601 100644 (file)
@@ -54,7 +54,6 @@
 #include "gromacs/commandline/pargs.h"
 #include "gromacs/commandline/filenm.h"
 #include "gromacs/commandline/pargs.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/mdlib/stophandler.h"
 #include "gromacs/mdrun/logging.h"
index ac268ba27b08ad772fe411027773dd9bec9d152b..bc21459b1b1021f1ef3f78035127a449f4df4b06 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -424,7 +424,7 @@ class MDHolder
          *
          *     # With `system` as a gmxapi::System object
          *     auto spec = system->getSpec();
-         *     auto holder = gmx::compat::make_unique<gmxapi::MDHolder>(spec);
+         *     auto holder = std::make_unique<gmxapi::MDHolder>(spec);
          *
          * A PyCapsule object with the name given by gmxapi::MDHolder_Name is assumed to
          * contain a pointer to an MDHolder and to have an appropriate deleter attached.
index b978c67f2345a2cb745fc157c3743c35a019e4b2..5d235301f091f2bbfa8b6490cf932378f9edb883 100644 (file)
@@ -36,7 +36,6 @@
 
 #include <memory>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/mdtypes/state.h"
 #include "gromacs/utility/keyvaluetree.h"
 
@@ -70,7 +69,7 @@ class MDWorkSpec::Impl
 //! \endcond
 
 MDWorkSpec::MDWorkSpec() :
-    impl_ {gmx::compat::make_unique<Impl>()}
+    impl_ {std::make_unique<Impl>()}
 {
     GMX_ASSERT(impl_, "Expected non-null implementation object.");
 }
index da00f81e6e4751ac632f9066b519abb60f416987..17718780c2e737848ce9d11e0537a033a0da6d7e 100644 (file)
@@ -43,7 +43,7 @@
 
 #include <atomic>
 
-#include "gromacs/compat/make_unique.h"
+#include <memory>
 #include "gromacs/mdlib/simulationsignal.h"
 #include "gromacs/mdrun/runner.h"
 #include "gromacs/utility/gmxassert.h"
@@ -164,7 +164,7 @@ Signal SignalManager::getSignal(std::string name,
         throw gmxapi::NotImplementedError("This signaller only handles stop signals.");
     }
 
-    auto   signalImpl = gmx::compat::make_unique<LogicalAND>(this, name);
+    auto   signalImpl = std::make_unique<LogicalAND>(this, name);
     auto   functor    = Signal(std::move(signalImpl));
     return functor;
 }
index 113dcfaa877a464e5d97cac03b8a37d1422e8eda..2ebdd17f85474ef0465ef4b6a7e116e978546459 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -45,7 +45,7 @@
 #include <atomic>
 #include <functional>
 
-#include "gromacs/compat/make_unique.h"
+#include <memory>
 #include "gromacs/mdlib/simulationsignal.h"
 #include "gromacs/mdlib/stophandler.h"
 #include "gromacs/mdrun/runner.h"
index e1abb57b7370fc0fbc18a7761b00065ff389a0c4..a5bfd0d62402f00a0361eb1575a18e9ea132d60e 100644 (file)
@@ -39,7 +39,7 @@
 
 #include "gmxapi/session.h"
 
-#include "gromacs/compat/make_unique.h"
+#include <memory>
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/mdlib/sighandler.h"
 #include "gromacs/mdrun/logging.h"
@@ -193,11 +193,11 @@ std::unique_ptr<SessionImpl> SessionImpl::create(std::shared_ptr<ContextImpl>  c
 {
     // We should be able to get a communicator (or subcommunicator) through the
     // Context.
-    return gmx::compat::make_unique<SessionImpl>(std::move(context),
-                                                 std::move(runnerBuilder),
-                                                 simulationContext,
-                                                 std::move(logFilehandle),
-                                                 multiSim);
+    return std::make_unique<SessionImpl>(std::move(context),
+                                         std::move(runnerBuilder),
+                                         simulationContext,
+                                         std::move(logFilehandle),
+                                         multiSim);
 }
 
 SessionImpl::SessionImpl(std::shared_ptr<ContextImpl>  context,
@@ -206,7 +206,7 @@ SessionImpl::SessionImpl(std::shared_ptr<ContextImpl>  context,
                          gmx::LogFilePtr               fplog,
                          gmx_multisim_t              * multiSim) :
     context_(std::move(context)),
-    mpiContextManager_(gmx::compat::make_unique<MpiContextManager>()),
+    mpiContextManager_(std::make_unique<MpiContextManager>()),
     simulationContext_(simulationContext),
     logFilePtr_(std::move(fplog)),
     multiSim_(multiSim)
@@ -219,12 +219,12 @@ SessionImpl::SessionImpl(std::shared_ptr<ContextImpl>  context,
 
     // \todo Session objects can have logic specialized for the runtime environment.
 
-    auto stopHandlerBuilder = gmx::compat::make_unique<gmx::StopHandlerBuilder>();
-    signalManager_ = gmx::compat::make_unique<SignalManager>(stopHandlerBuilder.get());
+    auto stopHandlerBuilder = std::make_unique<gmx::StopHandlerBuilder>();
+    signalManager_ = std::make_unique<SignalManager>(stopHandlerBuilder.get());
     GMX_ASSERT(signalManager_, "SessionImpl invariant includes a valid SignalManager.");
 
     runnerBuilder.addStopHandlerBuilder(std::move(stopHandlerBuilder));
-    runner_ = gmx::compat::make_unique<gmx::Mdrunner>(runnerBuilder.build());
+    runner_ = std::make_unique<gmx::Mdrunner>(runnerBuilder.build());
     GMX_ASSERT(runner_, "SessionImpl invariant implies valid Mdrunner handle.");
 
     // For the libgromacs context, a session should explicitly reset global variables that could
@@ -324,7 +324,7 @@ gmxapi::SessionResources *SessionImpl::createResources(std::shared_ptr<gmxapi::M
     const auto                &name      = module->name();
     if (resources_.find(name) == resources_.end())
     {
-        auto resourcesInstance = gmx::compat::make_unique<SessionResources>(this, name);
+        auto resourcesInstance = std::make_unique<SessionResources>(this, name);
         resources_.emplace(std::make_pair(name, std::move(resourcesInstance)));
         resources = resources_.at(name).get();
         // To do: This should be more dynamic.
index dde46e59122b5afb8895f921806d5818082a8bfc..017fda99c779b4c914782ed2e7fc1261056017d8 100644 (file)
@@ -35,7 +35,7 @@
 
 #include "gmxapi/status.h"
 
-#include "gromacs/compat/make_unique.h"
+#include <memory>
 
 namespace gmxapi
 {
@@ -82,17 +82,17 @@ class Status::Impl
 /// \endcond
 
 Status::Status() :
-    impl_ {gmx::compat::make_unique<Status::Impl>()}
+    impl_ {std::make_unique<Status::Impl>()}
 {}
 
 Status::Status(const Status &status)
 {
-    impl_ = gmx::compat::make_unique<Impl>(status.success());
+    impl_ = std::make_unique<Impl>(status.success());
 }
 
 Status &Status::operator=(const Status &status)
 {
-    this->impl_ = gmx::compat::make_unique<Impl>(status.success());
+    this->impl_ = std::make_unique<Impl>(status.success());
     return *this;
 }
 
@@ -100,14 +100,14 @@ Status &Status::operator=(Status &&) noexcept = default;
 
 Status &Status::operator=(bool success)
 {
-    this->impl_ = gmx::compat::make_unique<Impl>(success);
+    this->impl_ = std::make_unique<Impl>(success);
     return *this;
 }
 
 Status::Status(Status &&) noexcept = default;
 
 Status::Status(bool success) :
-    impl_ {gmx::compat::make_unique<Status::Impl>(success)}
+    impl_ {std::make_unique<Status::Impl>(success)}
 {}
 
 bool Status::success() const
index 0ae2a5efec4e3bfa774614617885449ff1e18272..2493b0b8e3add8b5a34ac50976aee46767327e9e 100644 (file)
@@ -38,7 +38,7 @@
 #include <array>
 
 #include "gromacs/utility.h"
-#include "gromacs/compat/make_unique.h"
+#include <memory>
 #include "gromacs/mdrun/runner.h"
 
 #include "gmxapi/context.h"
@@ -100,7 +100,7 @@ System fromTprFile(const std::string &filename)
     // This may produce errors or throw exceptions in the future, but as of
     // 0.0.3 only memory allocation errors are possible, and we do not have a
     // plan for how to recover from them.
-    auto systemImpl = gmx::compat::make_unique<System::Impl>(std::move(workflow));
+    auto systemImpl = std::make_unique<System::Impl>(std::move(workflow));
     GMX_ASSERT(systemImpl, "Could not create a valid implementation object.");
     auto system = System(std::move(systemImpl));
 
index c199975330bb94c5abf765cd3ba8220699fdabda..cf90d806fb0ba287a533390572dca524aafff7fe 100644 (file)
@@ -37,7 +37,6 @@
 
 #include <memory>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/utility/gmxassert.h"
 
 #include "workflow-impl.h"
@@ -52,7 +51,7 @@ std::unique_ptr<NodeSpecification> MDNodeSpecification::clone()
 {
     GMX_ASSERT(!tprfilename_.empty(), "Need a non-empty filename string.");
     std::unique_ptr<NodeSpecification> node = nullptr;
-    node = gmx::compat::make_unique<MDNodeSpecification>(tprfilename_);
+    node = std::make_unique<MDNodeSpecification>(tprfilename_);
     return node;
 }
 
@@ -79,10 +78,10 @@ NodeKey Workflow::addNode(std::unique_ptr<NodeSpecification> spec)
 std::unique_ptr<Workflow> Workflow::create(const std::string &filename)
 {
     const std::string name = "MD";
-    auto              spec = gmx::compat::make_unique<MDNodeSpecification>(filename);
+    auto              spec = std::make_unique<MDNodeSpecification>(filename);
     Workflow::Impl    graph;
     graph.emplace(std::make_pair(name, std::move(spec)));
-    auto              workflow = gmx::compat::make_unique<Workflow>(std::move(graph));
+    auto              workflow = std::make_unique<Workflow>(std::move(graph));
     return workflow;
 }
 
index ccc60aed6c28961b81f8435db367b508ed4c8848..ec04474bb4055985b9793943b36e2376121803cc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -41,7 +41,6 @@
 #include "api/cpp/include/gmxapi/status.h"
 #include "api/cpp/include/gmxapi/system.h"
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/utility/arrayref.h"
 
 #include "api/cpp/tests/testingconfiguration.h"
@@ -60,7 +59,7 @@ TEST_F(GmxApiTest, BuildApiWorkflowImpl)
 {
     makeTprFile(100);
     // Create work spec
-    auto node = gmx::compat::make_unique<gmxapi::MDNodeSpecification>(runner_.tprFileName_);
+    auto node = std::make_unique<gmxapi::MDNodeSpecification>(runner_.tprFileName_);
     EXPECT_NE(node, nullptr);
 
     // Create key
index 164f9b877d0d74e0f6e034805157142b7fea67be..c80e91922377da7b8aadb6168223681bbbfe9687 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -53,7 +53,6 @@
 #include "gromacs/analysisdata/dataframe.h"
 #include "gromacs/analysisdata/datamodulemanager.h"
 #include "gromacs/analysisdata/paralleloptions.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/gmxassert.h"
 
@@ -451,7 +450,7 @@ AnalysisDataStorageImpl::extendBuffer(size_t newSize)
     frames_.reserve(newSize);
     while (frames_.size() < newSize)
     {
-        frames_.push_back(compat::make_unique<AnalysisDataStorageFrameData>(this, nextIndex_));
+        frames_.push_back(std::make_unique<AnalysisDataStorageFrameData>(this, nextIndex_));
         ++nextIndex_;
     }
     // The unused frame should not be included in the count.
index c503de4e4889fa302483f18c2c1dfabf41d06dfe..1e731a6fd8ba1e7a5aaf0e7d86a5d763fa996aa8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -421,8 +421,8 @@ prepareAwhModule(FILE                 *fplog,
         GMX_THROW(InvalidInputError("AWH biasing does not support shell particles."));
     }
 
-    auto awh = compat::make_unique<Awh>(fplog, inputRecord, commRecord, multiSimRecord, *inputRecord.awhParams,
-                                        biasInitFilename, pull_work);
+    auto awh = std::make_unique<Awh>(fplog, inputRecord, commRecord, multiSimRecord, *inputRecord.awhParams,
+                                     biasInitFilename, pull_work);
 
     if (startingFromCheckpoint)
     {
index 437784e24d3c4c760af9f068ffec1cbf4c7face9..3c39990acbc191b760488fd51f1f5000090ba065 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -54,8 +54,8 @@
 #include <cstring>
 
 #include <algorithm>
+#include <memory>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/math/functions.h"
@@ -351,11 +351,11 @@ Bias::Bias(int                             biasIndexInCollection,
         double blockLength = 0;
         /* Construct the force correlation object. */
         forceCorrelationGrid_ =
-            compat::make_unique<CorrelationGrid>(state_.points().size(), ndim(),
-                                                 blockLength, CorrelationGrid::BlockLengthMeasure::Time,
-                                                 awhParams.nstSampleCoord*mdTimeStep);
+            std::make_unique<CorrelationGrid>(state_.points().size(), ndim(),
+                                              blockLength, CorrelationGrid::BlockLengthMeasure::Time,
+                                              awhParams.nstSampleCoord*mdTimeStep);
 
-        writer_ = compat::make_unique<BiasWriter>(*this);
+        writer_ = std::make_unique<BiasWriter>(*this);
     }
 }
 
index 8f395bb17b245e223a9abea542ef35bb50b7d0da..27ce32699e1e1b0a33cde5397832cbf40a521631 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -54,7 +54,6 @@
 #include <memory>
 #include <vector>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/math/vectypes.h"
 #include "gromacs/utility/alignedallocator.h"
 #include "gromacs/utility/basedefinitions.h"
index 0a6ad40daadc407a07da92c904b36b91fdc490f7..8e4475ed5cfc0d72bbc1e1e11640474e49977db5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -47,7 +47,6 @@
 
 #include "gromacs/awh/correlationgrid.h"
 #include "gromacs/awh/pointstate.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/mdtypes/awh-params.h"
 #include "gromacs/utility/stringutil.h"
 
@@ -211,7 +210,7 @@ class BiasTest : public ::testing::TestWithParam<BiasTestParameters>
             int    numSamples = coordinates_.size() - 1; // No sample taken at step 0
             GMX_RELEASE_ASSERT(numSamples % params.awhParams.numSamplesUpdateFreeEnergy == 0, "This test is intended to reproduce the situation when the might need to write output during a normal AWH run, therefore the number of samples should be a multiple of the free-energy update interval (but the test should also runs fine without this condition).");
 
-            bias_ = gmx::compat::make_unique<Bias>(-1, params.awhParams, params.awhBiasParams, params.dimParams, params.beta, mdTimeStep, 1, "", Bias::ThisRankWillDoIO::No, disableUpdateSkips);
+            bias_ = std::make_unique<Bias>(-1, params.awhParams, params.awhBiasParams, params.dimParams, params.beta, mdTimeStep, 1, "", Bias::ThisRankWillDoIO::No, disableUpdateSkips);
         }
 };
 
index 57f518ccd202bd351b7fe2474bbe84dab6270346..06c871608d41ec9c5283f8db5252250f88722364 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -46,7 +46,6 @@
 
 #include "gromacs/awh/grid.h"
 #include "gromacs/awh/pointstate.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/math/functions.h"
 #include "gromacs/mdtypes/awh-params.h"
 #include "gromacs/utility/smalloc.h"
@@ -140,7 +139,7 @@ class BiasStateTest : public ::testing::TestWithParam<const char *>
             dimParams.emplace_back(1.0, 15.0, params.beta);
             Grid                    grid(dimParams, awhBiasParams.dimParams);
             BiasParams              biasParams(awhParams, awhBiasParams, dimParams, 1.0, 1.0, BiasParams::DisableUpdateSkips::no, 1, grid.axis(), 0);
-            biasState_ = gmx::compat::make_unique<BiasState>(awhBiasParams, 1.0, dimParams, grid);
+            biasState_ = std::make_unique<BiasState>(awhBiasParams, 1.0, dimParams, grid);
 
             // Here we initialize the grid point state using the input file
             std::string             filename = gmx::test::TestFileManager::getInputFilePath(GetParam());
index 9716758dfa74ead336ff79f3818036e56ff8e620..755617245eaa0d34e8ba83024dfbb4a409b3b428 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -50,7 +50,6 @@
 #include "gromacs/commandline/cmdlinehelpcontext.h"
 #include "gromacs/commandline/cmdlinehelpwriter.h"
 #include "gromacs/commandline/cmdlineparser.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/onlinehelp/helpformat.h"
 #include "gromacs/onlinehelp/helpmanager.h"
 #include "gromacs/onlinehelp/helptopic.h"
@@ -568,12 +567,12 @@ HelpExportReStructuredText::HelpExportReStructuredText(
 
 void HelpExportReStructuredText::startModuleExport()
 {
-    indexFile_ = compat::make_unique<TextWriter>(
+    indexFile_ = std::make_unique<TextWriter>(
                 outputRedirector_->openTextOutputFile("fragments/byname.rst"));
     indexFile_->writeLine(formatString("* :doc:`%s </onlinehelp/%s>` - %s",
                                        binaryName_.c_str(), binaryName_.c_str(),
                                        RootHelpText::title));
-    manPagesFile_ = compat::make_unique<TextWriter>(
+    manPagesFile_ = std::make_unique<TextWriter>(
                 outputRedirector_->openTextOutputFile("conf-man.py"));
     manPagesFile_->writeLine("man_pages = [");
 }
@@ -635,9 +634,9 @@ void HelpExportReStructuredText::finishModuleExport()
 
 void HelpExportReStructuredText::startModuleGroupExport()
 {
-    indexFile_ = compat::make_unique<TextWriter>(
+    indexFile_ = std::make_unique<TextWriter>(
                 outputRedirector_->openTextOutputFile("fragments/bytopic.rst"));
-    manPagesFile_ = compat::make_unique<TextWriter>(
+    manPagesFile_ = std::make_unique<TextWriter>(
                 outputRedirector_->openTextOutputFile("fragments/bytopic-man.rst"));
 }
 
index a9561e08c201816e1e73d51fe779ddb3c3078873..035bcc8e09d2523d586d521283ea708e8e402409 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2013,2014,2015,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -51,7 +51,6 @@
 #include "gromacs/commandline/cmdlinemodulemanager.h"
 #include "gromacs/commandline/cmdlineoptionsmodule.h"
 #include "gromacs/commandline/cmdlineprogramcontext.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/utility/basenetwork.h"
 #include "gromacs/utility/datafilefinder.h"
 #include "gromacs/utility/exceptions.h"
@@ -126,9 +125,9 @@ CommandLineProgramContext &initForCommandLine(int *argc, char ***argv)
     broadcastArguments(argc, argv);
     try
     {
-        g_commandLineContext = compat::make_unique<CommandLineProgramContext>(*argc, *argv);
+        g_commandLineContext = std::make_unique<CommandLineProgramContext>(*argc, *argv);
         setProgramContext(g_commandLineContext.get());
-        g_libFileFinder = compat::make_unique<DataFileFinder>();
+        g_libFileFinder = std::make_unique<DataFileFinder>();
         g_libFileFinder->setSearchPathFromEnv("GMXLIB");
         setLibraryFileFinder(g_libFileFinder.get());
     }
index 7fe52b3884e69efe859d3241d00689a61c73b4d5..18b49bc812e1e11cc55a7ca8fa1f891e6cb103cb 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -53,7 +53,6 @@
 
 #include "gromacs/commandline/cmdlinehelpcontext.h"
 #include "gromacs/commandline/pargs.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/fileio/filetypes.h"
 #include "gromacs/options/basicoptions.h"
 #include "gromacs/options/filenameoption.h"
@@ -222,7 +221,7 @@ TextWriter &ShellCompletionWriter::outputWriter()
 
 void ShellCompletionWriter::startCompletions()
 {
-    impl_->file_ = compat::make_unique<TextWriter>(impl_->binaryName_ + "-completion.bash");
+    impl_->file_ = std::make_unique<TextWriter>(impl_->binaryName_ + "-completion.bash");
 }
 
 void ShellCompletionWriter::writeModuleCompletions(
index 5e4c52a0cdc21c39bd0dc931afd78213d632f143..83326015337c60ce8d07a2a823d1ed62d957a109 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2018, by the GROMACS development team, led by
+# Copyright (c) 2018,2019, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -32,7 +32,6 @@
 # To help us fund GROMACS development, we humbly ask that you cite
 # the research papers on the package. Check out http://www.gromacs.org.
 
-gmx_install_headers(make_unique.h)
 if (BUILD_TESTING)
     add_subdirectory(tests)
 endif()
diff --git a/src/gromacs/compat/make_unique.h b/src/gromacs/compat/make_unique.h
deleted file mode 100644 (file)
index 52bf618..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * This file is part of the GROMACS molecular simulation package.
- *
- * Copyright (c) 2017,2018, by the GROMACS development team, led by
- * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
- * and including many others, as listed in the AUTHORS file in the
- * top-level source directory and at http://www.gromacs.org.
- *
- * GROMACS is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- *
- * GROMACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with GROMACS; if not, see
- * http://www.gnu.org/licenses, or write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
- *
- * If you want to redistribute modifications to GROMACS, please
- * consider that scientific software is very special. Version
- * control is crucial - bugs must be traceable. We will be happy to
- * consider code for inclusion in the official distribution, but
- * derived work must not be called official GROMACS. Details are found
- * in the README & COPYING files - if they are missing, get the
- * official version at http://www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the research papers on the package. Check out http://www.gromacs.org.
- */
-#ifndef GMX_COMPAT_MAKE_UNIQUE_H
-#define GMX_COMPAT_MAKE_UNIQUE_H
-/*! \libinternal
- * \defgroup module_compat C++ "standard" library compatibility helpers.
- *
- * \brief Provide uniform interface to selected C++ standard and
- * popular library features.
- *
- * For some features not available on all platforms supported by
- * \Gromacs, provides back-ports or mappings to available standard
- * library implementations as appropriate.
- *
- * Backported implementations of features from newer C++ standards, or
- * from community libraries such as Abseil or the Guidelines Support
- * Library may also be considered for inclusion here. We generally
- * expect that features included here are either already standard,
- * proposed for the standard, or so useful in solving a frequently
- * occuring problem that their use is not controversial.
- */
-
-/*!
- * \file
- * \brief Provides template gmx::compat::make_unique
- *
- * The implementation of gmx::compat::make_unique is copied with little
- * modification from C++ standardization doc N3656
- * at http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3656.htm
- * though additional wrapping has been added for use in \Gromacs.
- *
- * \author M. Eric Irrgang <ericirrgang@gmail.com>
- * \ingroup module_compat
- * \inlibraryapi
- */
-/*! \addtogroup module_compat
- * ### gmx::compat::make_unique
- *
- * Provide a trivially adapted implementation of the C++ standard library `make_unique` function template.
- * When All supported \Gromacs build platforms provide `std::make_unique`, this should be removed.
- *
- */
-#include <cstddef>
-
-#include <memory>
-#include <type_traits>
-#include <utility>
-
-namespace gmx
-{
-namespace compat
-{
-
-///\cond
-
-// All gmx::compat code should use std::unique_ptr
-using ::std::unique_ptr;
-
-template<class T> struct Unique_if {
-    typedef unique_ptr<T> Single_object;
-};
-
-template<class T> struct Unique_if<T[]> {
-    typedef unique_ptr<T[]> Unknown_bound;
-};
-
-template<class T, size_t N> struct Unique_if<T[N]> {
-    typedef void Known_bound;
-};
-
-template<class T, class ... Args>
-typename Unique_if<T>::Single_object
-make_unique(Args && ... args)
-{
-    return unique_ptr<T>(new T(::std::forward<Args>(args) ...));
-}
-
-template<class T>
-typename Unique_if<T>::Unknown_bound
-make_unique(size_t n)
-{
-    typedef typename ::std::remove_extent<T>::type U;
-    return unique_ptr<T>(new U[n]());
-}
-
-template<class T, class ... Args>
-typename Unique_if<T>::Known_bound
-make_unique(Args && ...) = delete;
-
-///\endcond
-
-}      // namespace compat
-}      // namespace gmx
-
-#endif // header guard
index 72cc32ca7e7007f20ffc212e0add64cadd455e38..5456720e3e2f29f4eaa2e4a886d69528b9bdd0cf 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 /*! \internal \file
- * \brief Tests for gmx::compat::make_unique
+ * \brief Tests for std::make_unique
  *
  * \author M. Eric Irrgang <ericirrgang@gmail.com>
  * \ingroup module_compat
  */
 #include "gmxpre.h"
 
-#include "gromacs/compat/make_unique.h"
+#include <memory>
 
 #include <gtest/gtest.h>
 
@@ -67,14 +67,14 @@ struct dummy
 TEST(CompatibilityHelper, MakeUniqueCompiles)
 {
     // Check template parameters
-    auto ptr = gmx::compat::make_unique<dummy>();
+    auto ptr = std::make_unique<dummy>();
     ASSERT_NE(ptr, nullptr);
     ASSERT_NE(ptr.get(), nullptr);
     constexpr bool is_dummy = std::is_same < decltype(ptr), std::unique_ptr < dummy>>::value;
     ASSERT_TRUE(is_dummy);
 
     // Check template and function parameters
-    ptr = gmx::compat::make_unique<dummy>('a', 'b');
+    ptr = std::make_unique<dummy>('a', 'b');
     ASSERT_EQ(ptr->foo, 'a');
 }
 
index 0cf1b4af141824e735f35545b5dadcdc67f877ac..2da64bd67581d28e4d89a1e9d2ec6b819880294d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -50,7 +50,6 @@
 
 #include <gtest/gtest.h>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/correlationfunctions/expfit.h"
 #include "gromacs/fft/fft.h"
 #include "gromacs/utility/gmxassert.h"
@@ -98,7 +97,7 @@ class AutocorrTest : public ::testing::Test
         {
             int         n        = 0;
             std::string fileName = "testCOS3.xvg";
-            data_                = gmx::compat::make_unique<CorrelationDataSet>(fileName);
+            data_                = std::make_unique<CorrelationDataSet>(fileName);
             nrFrames_            = data_->getNrLines();
             tempArgs_            = add_acf_pargs(&n, nullptr);
         }
index 6ed75fbeaaaddeff2019b6866e6d95f23be221c5..d4a5169b6c4a43ac0bcbee8fee28b03d4e9127c7 100644 (file)
@@ -48,8 +48,8 @@
 #include <cstring>
 
 #include <algorithm>
+#include <memory>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/domdec/collect.h"
 #include "gromacs/domdec/dlb.h"
 #include "gromacs/domdec/dlbtiming.h"
@@ -1167,7 +1167,7 @@ static void make_load_communicator(gmx_domdec_t *dd, int dim_ind, ivec loc)
             if (dd->ci[dim] == dd->master_ci[dim])
             {
                 /* This is the root process of this row */
-                cellsizes.rowMaster  = gmx::compat::make_unique<RowMaster>();
+                cellsizes.rowMaster  = std::make_unique<RowMaster>();
 
                 RowMaster &rowMaster = *cellsizes.rowMaster;
                 rowMaster.cellFrac.resize(ddCellFractionBufferSize(dd, dim_ind));
@@ -1770,9 +1770,9 @@ static void make_dd_communicators(const gmx::MDLogger &mdlog,
     /* We can not use DDMASTER(dd), because dd->masterrank is set later */
     if (MASTER(cr))
     {
-        dd->ma = gmx::compat::make_unique<AtomDistribution>(dd->nc,
-                                                            comm->cgs_gl.nr,
-                                                            comm->cgs_gl.index[comm->cgs_gl.nr]);
+        dd->ma = std::make_unique<AtomDistribution>(dd->nc,
+                                                    comm->cgs_gl.nr,
+                                                    comm->cgs_gl.index[comm->cgs_gl.nr]);
     }
 }
 
@@ -2106,10 +2106,10 @@ static void setupUpdateGroups(const gmx::MDLogger &mdlog,
          */
         int homeAtomCountEstimate =  mtop.natoms/numMpiRanksTotal;
         comm->updateGroupsCog =
-            gmx::compat::make_unique<gmx::UpdateGroupsCog>(mtop,
-                                                           comm->updateGroupingPerMoleculetype,
-                                                           maxReferenceTemperature(inputrec),
-                                                           homeAtomCountEstimate);
+            std::make_unique<gmx::UpdateGroupsCog>(mtop,
+                                                   comm->updateGroupingPerMoleculetype,
+                                                   maxReferenceTemperature(inputrec),
+                                                   homeAtomCountEstimate);
 
         /* To use update groups, the large domain-to-domain cutoff distance
          * should be compatible with the box size.
@@ -2173,7 +2173,7 @@ static void set_dd_limits_and_grid(const gmx::MDLogger &mdlog,
     comm->bPMELoadBalDLBLimits = FALSE;
 
     /* Allocate the charge group/atom sorting struct */
-    comm->sort = gmx::compat::make_unique<gmx_domdec_sort_t>();
+    comm->sort = std::make_unique<gmx_domdec_sort_t>();
 
     comm->bCGs = (ncg_mtop(mtop) < mtop->natoms);
 
index f9c8364336d56f8a0b9c6d684a47c0868cb94c8f..92ffdd85bdd0f3771e582120d89666e815935afc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2006,2007,2008,2009,2010,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2006,2007,2008,2009,2010,2012,2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -49,8 +49,8 @@
 #include <cassert>
 
 #include <algorithm>
+#include <memory>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/domdec/dlbtiming.h"
 #include "gromacs/domdec/domdec.h"
 #include "gromacs/domdec/domdec_struct.h"
@@ -651,7 +651,7 @@ void init_domdec_constraints(gmx_domdec_t     *dd,
      */
     int numKeysEstimate = std::min(mtop->natoms/20,
                                    mtop->natoms/(2*dd->nnodes));
-    dc->ga2la = gmx::compat::make_unique < gmx::HashedMap < int>>(numKeysEstimate);
+    dc->ga2la = std::make_unique < gmx::HashedMap < int>>(numKeysEstimate);
 
     dc->nthread = gmx_omp_nthreads_get(emntDomdec);
     dc->ils.resize(dc->nthread);
index 97587f933a6fc22b8e4419d07b3b37c121ad09f1..566102baff306bfb926099fcd8284297820cfc2a 100644 (file)
@@ -51,9 +51,9 @@
 #include <cstring>
 
 #include <algorithm>
+#include <memory>
 #include <string>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/domdec/domdec.h"
 #include "gromacs/domdec/domdec_network.h"
 #include "gromacs/domdec/ga2la.h"
@@ -739,7 +739,7 @@ static gmx_reverse_top_t make_reverse_top(const gmx_mtop_t *mtop, gmx_bool bFE,
     {
         for (thread_work_t &th_work : rt.th_work)
         {
-            th_work.vsitePbc = gmx::compat::make_unique<VsitePbc>();
+            th_work.vsitePbc = std::make_unique<VsitePbc>();
         }
     }
 
index dfe05ddf675a33ab1a68d1ef0ebb920657f2080d..6305d2bd2de2dcb608ca4894806a66cd9ae0e27a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -46,7 +46,6 @@
 #include <algorithm>
 #include <memory>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/domdec/localatomset.h"
 #include "gromacs/utility/exceptions.h"
 
@@ -78,7 +77,7 @@ LocalAtomSetManager::~LocalAtomSetManager(){}
 LocalAtomSet
 LocalAtomSetManager::add(ArrayRef<const int> globalAtomIndex)
 {
-    impl_->atomSetData_.push_back(compat::make_unique<internal::LocalAtomSetData>(globalAtomIndex));
+    impl_->atomSetData_.push_back(std::make_unique<internal::LocalAtomSetData>(globalAtomIndex));
     return LocalAtomSet(*impl_->atomSetData_.back());
 }
 
index 9e168eed9460c5a042ac1abab59b649ddc62bbd8..8ad287bf6d36de46478344b519e675904dfa5296 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -43,8 +43,9 @@
 #include <cstring>
 #include <ctime>
 
+#include <memory>
+
 #include "gromacs/commandline/filenm.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/domdec/domdec_struct.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/xvgr.h"
@@ -1128,7 +1129,7 @@ static std::unique_ptr<gmx::EssentialDynamics> ed_open(
         const gmx_output_env_t *oenv,
         const t_commrec        *cr)
 {
-    auto        edHandle = gmx::compat::make_unique<gmx::EssentialDynamics>();
+    auto        edHandle = std::make_unique<gmx::EssentialDynamics>();
     auto        ed       = edHandle->getLegacyED();
     /* We want to perform ED (this switch might later be upgraded to EssentialDynamicsType::Flooding) */
     ed->eEDtype = EssentialDynamicsType::EDSampling;
@@ -1138,7 +1139,7 @@ static std::unique_ptr<gmx::EssentialDynamics> ed_open(
         // If we start from a checkpoint file, we already have an edsamHistory struct
         if (oh->edsamHistory == nullptr)
         {
-            oh->edsamHistory = gmx::compat::make_unique<edsamhistory_t>(edsamhistory_t {});
+            oh->edsamHistory = std::make_unique<edsamhistory_t>(edsamhistory_t {});
         }
         edsamhistory_t *EDstate = oh->edsamHistory.get();
 
index 5891a9c425e250e17412c3289f583c7276757820..a8d98e96cf11f71a92630bc24d76d2a2b4bf22fc 100644 (file)
@@ -52,9 +52,9 @@
 #include "config.h"
 
 #include <list>
+#include <memory>
 #include <string>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/ewald/ewald-utils.h"
 #include "gromacs/gpu_utils/gpu_utils.h"
 #include "gromacs/math/invertmatrix.h"
@@ -578,7 +578,7 @@ void pme_gpu_reinit_3dfft(const PmeGpu *pmeGpu)
         pmeGpu->archSpecific->fftSetup.resize(0);
         for (int i = 0; i < pmeGpu->common->ngrids; i++)
         {
-            pmeGpu->archSpecific->fftSetup.push_back(gmx::compat::make_unique<GpuParallel3dFft>(pmeGpu));
+            pmeGpu->archSpecific->fftSetup.push_back(std::make_unique<GpuParallel3dFft>(pmeGpu));
         }
     }
 }
index 46c2103e5e273cda0caf2324dc6c40d4e044efd7..fbb1a8eeb7973050e87a3bd1958dc2cb9888da84 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
 
 #include "pme-gpu-program.h"
 
-#include "gromacs/compat/make_unique.h"
+#include <memory>
 
 #include "pme-gpu-program-impl.h"
 
 PmeGpuProgram::PmeGpuProgram(const gmx_device_info_t *deviceInfo) :
-    impl_(gmx::compat::make_unique<PmeGpuProgramImpl>(deviceInfo))
+    impl_(std::make_unique<PmeGpuProgramImpl>(deviceInfo))
 {
 }
 
@@ -65,5 +65,5 @@ PmeGpuProgramStorage buildPmeGpuProgram(const gmx_device_info_t *deviceInfo)
         // This workaround is only needed for CodePath::CPU dummy in testhardwarecontexts.cpp
         return nullptr;
     }
-    return gmx::compat::make_unique<PmeGpuProgram>(deviceInfo);
+    return std::make_unique<PmeGpuProgram>(deviceInfo);
 }
index 690a19df7439d62d85906ddc1882482e99072ff6..e448d45426fdcfe95f0c63ae2a1db68a87911208 100644 (file)
@@ -71,7 +71,6 @@
 #include <numeric>
 #include <vector>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/domdec/domdec.h"
 #include "gromacs/ewald/pme.h"
 #include "gromacs/fft/parallel_3dfft.h"
@@ -132,7 +131,7 @@ struct gmx_pme_pp {
 /*! \brief Initialize the PME-only side of the PME <-> PP communication */
 static std::unique_ptr<gmx_pme_pp> gmx_pme_pp_init(const t_commrec *cr)
 {
-    auto pme_pp = gmx::compat::make_unique<gmx_pme_pp>();
+    auto pme_pp = std::make_unique<gmx_pme_pp>();
 
 #if GMX_MPI
     int rank;
index b4486fc7caa3d467153ce6f1ea6a170b3d8f7771..6157cd3dd1bc251fe7a692e58c5800ba70865aab 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -44,7 +44,8 @@
 
 #include "testhardwarecontexts.h"
 
-#include "gromacs/compat/make_unique.h"
+#include <memory>
+
 #include "gromacs/ewald/pme.h"
 #include "gromacs/gpu_utils/gpu_utils.h"
 #include "gromacs/hardware/detecthardware.h"
@@ -109,7 +110,7 @@ static gmx_hw_info_t *hardwareInit()
 
 void PmeTestEnvironment::SetUp()
 {
-    hardwareContexts_.emplace_back(compat::make_unique<TestHardwareContext>(CodePath::CPU, "", nullptr));
+    hardwareContexts_.emplace_back(std::make_unique<TestHardwareContext>(CodePath::CPU, "", nullptr));
 
     hardwareInfo_ = hardwareInit();
     if (!pme_gpu_supports_build(*hardwareInfo_, nullptr))
@@ -126,7 +127,7 @@ void PmeTestEnvironment::SetUp()
         char        stmp[200] = {};
         get_gpu_device_info_string(stmp, hardwareInfo_->gpu_info, gpuIndex);
         std::string description = "(GPU " + std::string(stmp) + ") ";
-        hardwareContexts_.emplace_back(compat::make_unique<TestHardwareContext>
+        hardwareContexts_.emplace_back(std::make_unique<TestHardwareContext>
                                            (CodePath::GPU, description.c_str(),
                                            deviceInfo));
     }
index 333342bc4319081a919c065e953d7f7b94e74a03..a3a7a094932894617943ee32053865ae83392bf2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -55,7 +55,6 @@
 #include <memory>
 
 #include "buildinfo.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/fileio/filetypes.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/gmxfio-xdr.h"
@@ -1465,7 +1464,7 @@ static int do_cpt_enerhist(XDR *xd, gmx_bool bRead,
                     {
                         if (deltaH == nullptr)
                         {
-                            enerhist->deltaHForeignLambdas = gmx::compat::make_unique<delta_h_history_t>();
+                            enerhist->deltaHForeignLambdas = std::make_unique<delta_h_history_t>();
                             deltaH = enerhist->deltaHForeignLambdas.get();
                         }
                         deltaH->dh.resize(numDeltaH);
@@ -2580,7 +2579,7 @@ static void read_checkpoint(const char *fn, t_fileio *logfio,
 
     if (headerContents->flags_enh && observablesHistory->energyHistory == nullptr)
     {
-        observablesHistory->energyHistory = gmx::compat::make_unique<energyhistory_t>();
+        observablesHistory->energyHistory = std::make_unique<energyhistory_t>();
     }
     ret = do_cpt_enerhist(gmx_fio_getxdr(fp), TRUE,
                           headerContents->flags_enh, observablesHistory->energyHistory.get(), nullptr);
@@ -2593,7 +2592,7 @@ static void read_checkpoint(const char *fn, t_fileio *logfio,
     {
         if (observablesHistory->pullHistory == nullptr)
         {
-            observablesHistory->pullHistory = gmx::compat::make_unique<PullHistory>();
+            observablesHistory->pullHistory = std::make_unique<PullHistory>();
         }
         ret = doCptPullHist(gmx_fio_getxdr(fp), TRUE,
                             headerContents->flagsPullHistory, observablesHistory->pullHistory.get(), StatePart::pullHistory, nullptr);
@@ -2616,7 +2615,7 @@ static void read_checkpoint(const char *fn, t_fileio *logfio,
 
     if (headerContents->nED > 0 && observablesHistory->edsamHistory == nullptr)
     {
-        observablesHistory->edsamHistory = gmx::compat::make_unique<edsamhistory_t>(edsamhistory_t {});
+        observablesHistory->edsamHistory = std::make_unique<edsamhistory_t>(edsamhistory_t {});
     }
     ret = do_cpt_EDstate(gmx_fio_getxdr(fp), TRUE, headerContents->nED, observablesHistory->edsamHistory.get(), nullptr);
     if (ret)
@@ -2637,7 +2636,7 @@ static void read_checkpoint(const char *fn, t_fileio *logfio,
 
     if (headerContents->eSwapCoords != eswapNO && observablesHistory->swapHistory == nullptr)
     {
-        observablesHistory->swapHistory = gmx::compat::make_unique<swaphistory_t>(swaphistory_t {});
+        observablesHistory->swapHistory = std::make_unique<swaphistory_t>(swaphistory_t {});
     }
     ret = do_cpt_swapstate(gmx_fio_getxdr(fp), TRUE, headerContents->eSwapCoords, observablesHistory->swapHistory.get(), nullptr);
     if (ret)
index 2efb336f97fdba2b37c581a63fe62227f86e3cd5..8891f103cd96cb6f517c0d2e0b14388f06595908 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -45,9 +45,9 @@
 #include <cstring>
 
 #include <algorithm>
+#include <memory>
 #include <vector>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/fileio/filetypes.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/gmxfio-xdr.h"
@@ -2544,7 +2544,7 @@ static void do_mtop(t_fileio *fio, gmx_mtop_t *mtop, gmx_bool bRead,
         {
             if (bRead)
             {
-                mtop->intermolecular_ilist = gmx::compat::make_unique<InteractionLists>();
+                mtop->intermolecular_ilist = std::make_unique<InteractionLists>();
             }
             do_ilists(fio, mtop->intermolecular_ilist.get(), bRead, file_version);
         }
index dd1d4683617f8edaf0e19f836e3dc84a0ed1cd71..e17343a925c27345dbf6b057b9ec4e12f161c4ba 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -52,7 +52,6 @@
 #include <string>
 
 #include "gromacs/commandline/pargs.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/fileio/enxio.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/oenv.h"
@@ -440,7 +439,7 @@ AwhReader::AwhReader(const AwhParams  *awhParams,
         std::unique_ptr<OutputFile> frictionOutputFile;
         if (outputFriction)
         {
-            frictionOutputFile = gmx::compat::make_unique<OutputFile>(opt2fn("-fric", numFileOptions, filenames), "Friction tensor", awhParams->numBias, k);
+            frictionOutputFile = std::make_unique<OutputFile>(opt2fn("-fric", numFileOptions, filenames), "Friction tensor", awhParams->numBias, k);
 
             frictionOutputFile->initializeFrictionOutputFile(subblockStart, numSubBlocks, awhBiasParams, energyUnit, kT);
         }
@@ -640,11 +639,11 @@ int gmx_awh(int argc, char *argv[])
                 AwhGraphSelection awhGraphSelection = (moreGraphs ? AwhGraphSelection::All : AwhGraphSelection::Pmf);
                 EnergyUnit        energyUnit        = (kTUnit ? EnergyUnit::KT : EnergyUnit::KJPerMol);
                 awhReader =
-                    gmx::compat::make_unique<AwhReader>(ir.awhParams,
-                                                        nfile, fnm,
-                                                        awhGraphSelection,
-                                                        energyUnit, BOLTZ*ir.opts.ref_t[0],
-                                                        block);
+                    std::make_unique<AwhReader>(ir.awhParams,
+                                                nfile, fnm,
+                                                awhGraphSelection,
+                                                energyUnit, BOLTZ*ir.opts.ref_t[0],
+                                                block);
             }
 
             awhReader->processAwhFrame(*block, frame->t, oenv);
index 8cbd28a23ee918de0913931d91a131e79b96a0be..f31fd083551d1dfa1b9aab71423b55dd86c33b04 100644 (file)
 #include <cmath>
 #include <cstring>
 
+#include <memory>
+
 #include "gromacs/commandline/pargs.h"
 #include "gromacs/commandline/viewit.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/fileio/confio.h"
 #include "gromacs/fileio/trxio.h"
 #include "gromacs/fileio/xvgr.h"
@@ -907,9 +908,9 @@ static void do_corr(const char *trx_file, const char *ndx_file, const char *msd_
         index_atom2mol(&gnx[0], index[0], &top->mols);
     }
 
-    msd = gmx::compat::make_unique<t_corr>(nrgrp, type, axis, dim_factor,
-                                           mol_file == nullptr ? 0 : gnx[0],
-                                           bTen, bMW, dt, top, beginfit, endfit);
+    msd = std::make_unique<t_corr>(nrgrp, type, axis, dim_factor,
+                                   mol_file == nullptr ? 0 : gnx[0],
+                                   bTen, bMW, dt, top, beginfit, endfit);
 
     nat_trx =
         corr_loop(msd.get(), trx_file, top, ePBC, mol_file ? gnx[0] != 0 : false, gnx.data(), index,
index 47cc18ecb2506a7e693170a254015a9644af7d3b..731618fd6ed475f3d796601dfe27a33fe4da9024 100644 (file)
 #include <cstring>
 
 #include <algorithm>
+#include <memory>
 
 #include "gromacs/commandline/pargs.h"
 #include "gromacs/commandline/viewit.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/fileio/confio.h"
 #include "gromacs/fileio/g96io.h"
 #include "gromacs/fileio/gmxfio.h"
@@ -582,7 +582,7 @@ read_mtop_for_tng(const char *tps_file,
         efTNG == fn2ftp(output_file))
     {
         int temp_natoms = -1;
-        mtop = gmx::compat::make_unique<gmx_mtop_t>();
+        mtop = std::make_unique<gmx_mtop_t>();
         read_tpx(tps_file, nullptr, nullptr, &temp_natoms,
                  nullptr, nullptr, mtop.get());
     }
index ee73c32e20d6343fce04f1e0de9b0804cf266120..a28d9918da62659bdc38ce1bdbf76bab0000612f 100644 (file)
@@ -43,7 +43,8 @@
 #include <cmath>
 #include <cstring>
 
-#include "gromacs/compat/make_unique.h"
+#include <memory>
+
 #include "gromacs/gmxpreprocess/gpp_atomtype.h"
 #include "gromacs/gmxpreprocess/grompp-impl.h"
 #include "gromacs/gmxpreprocess/topio.h"
@@ -565,7 +566,7 @@ void convert_params(int atnr, t_params nbtypes[],
     if (intermolecular_interactions != nullptr)
     {
         /* Process the intermolecular interaction list */
-        mtop->intermolecular_ilist = gmx::compat::make_unique<InteractionLists>();
+        mtop->intermolecular_ilist = std::make_unique<InteractionLists>();
 
         for (i = 0; (i < F_NRE); i++)
         {
index d526d23a6e32900ea18342b97d907484b814dbd6..4e0922fd84cc496c32fb067617fc0a4554526950 100644 (file)
 #include <cstring>
 
 #include <algorithm>
+#include <memory>
 #include <vector>
 
 #include <sys/types.h>
 
 #include "gromacs/awh/read-params.h"
 #include "gromacs/commandline/pargs.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/ewald/ewald-utils.h"
 #include "gromacs/ewald/pme.h"
 #include "gromacs/fft/calcgrid.h"
index 9df3f293cf23669c917601dc75afe7c06a835ebd..cab4521a434e0e22298c8bff8b7cfb7c247a343d 100644 (file)
 #include <ctime>
 
 #include <algorithm>
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "gromacs/commandline/cmdlineoptionsmodule.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/fileio/confio.h"
 #include "gromacs/fileio/filetypes.h"
 #include "gromacs/fileio/gmxfio.h"
@@ -2445,7 +2445,7 @@ const char pdb2gmxInfo::shortDescription[] =
     "Convert coordinate files to topology and FF-compliant coordinate files";
 ICommandLineOptionsModulePointer pdb2gmxInfo::create()
 {
-    return compat::make_unique<pdb2gmx>();
+    return std::make_unique<pdb2gmx>();
 }
 
 } // namespace gmx
index f4ccdda7030f7f9adbf2b6ae27335a009963ffc0..693c32983a2ed019c9c16998deaa6e1b4c5fcfab 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -45,7 +45,8 @@
 
 #include "config.h"
 
-#include "gromacs/compat/make_unique.h"
+#include <memory>
+
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/stringutil.h"
 
@@ -83,7 +84,7 @@ ClfftInitializer::~ClfftInitializer()
 
 std::unique_ptr<ClfftInitializer> initializeClfftLibrary()
 {
-    return compat::make_unique<ClfftInitializer>();
+    return std::make_unique<ClfftInitializer>();
 }
 
 }  // namespace gmx
index aea9a1a3e6fef03dc48374eac44285121de5b85a..ff683eb49ba7c4c42ce4bf506a86ad6fb91edfe0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -52,7 +52,6 @@
 
 #include "thread_mpi/threads.h"
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/gpu_utils/gpu_utils.h"
 #include "gromacs/hardware/cpuinfo.h"
 #include "gromacs/hardware/hardwaretopology.h"
@@ -432,7 +431,7 @@ gmx_hw_info_t *gmx_detect_hardware(const gmx::MDLogger            &mdlog,
     /* only initialize the hwinfo structure if it is not already initalized */
     if (n_hwinfo == 0)
     {
-        hwinfo_g = compat::make_unique<gmx_hw_info_t>();
+        hwinfo_g = std::make_unique<gmx_hw_info_t>();
 
         /* TODO: We should also do CPU hardware detection only once on each
          * physical node and broadcast it, instead of do it on every MPI rank. */
index cf84470f92ff5ef2edc7d848edbef7ddb7703bac..aa8163870815966036c64268788772f810cd75a0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -50,7 +50,8 @@
 
 #include "boxdeformation.h"
 
-#include "gromacs/compat/make_unique.h"
+#include <memory>
+
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/math/invertmatrix.h"
 #include "gromacs/math/vec.h"
@@ -88,10 +89,10 @@ prepareBoxDeformation(const matrix     &initialBox,
         gmx_bcast(sizeof(box), box, cr);
     }
 
-    return compat::make_unique<BoxDeformation>(inputrec.delta_t,
-                                               inputrec.init_step,
-                                               inputrec.deform,
-                                               box);
+    return std::make_unique<BoxDeformation>(inputrec.delta_t,
+                                            inputrec.init_step,
+                                            inputrec.deform,
+                                            box);
 }
 
 BoxDeformation::BoxDeformation(double        timeStep,
index 8591ae634fab9580e1343bb7536ea990ae0daa64..61768551a74c13e8d2f639da562d2747c176044d 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -41,7 +41,8 @@
 
 #include <cstring>
 
-#include "gromacs/compat/make_unique.h"
+#include <memory>
+
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/mdrun.h"
@@ -818,7 +819,7 @@ void bcast_ir_mtop(const t_commrec *cr, t_inputrec *inputrec, gmx_mtop_t *mtop)
     block_bc(cr, mtop->bIntermolecularInteractions);
     if (mtop->bIntermolecularInteractions)
     {
-        mtop->intermolecular_ilist = gmx::compat::make_unique<InteractionLists>();
+        mtop->intermolecular_ilist = std::make_unique<InteractionLists>();
         bc_ilists(cr, mtop->intermolecular_ilist.get());
     }
 
index c231eace7bc4279261b094b2ee9fd6eaab0f988c..dec8a2a0222866127825d9e9c5e5ab1c4cebf003 100644 (file)
@@ -46,9 +46,9 @@
 #include <cstring>
 
 #include <algorithm>
+#include <memory>
 
 #include "gromacs/commandline/filenm.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/domdec/domdec.h"
 #include "gromacs/domdec/domdec_struct.h"
 #include "gromacs/ewald/ewald.h"
@@ -2145,14 +2145,14 @@ static void init_nb_verlet(const gmx::MDLogger     &mdlog,
         }
     }
 
-    nbv->listParams = gmx::compat::make_unique<NbnxnListParameters>(ir->rlist);
+    nbv->listParams = std::make_unique<NbnxnListParameters>(ir->rlist);
     setupDynamicPairlistPruning(mdlog, ir, mtop, box, nbv->grp[0].kernel_type, fr->ic,
                                 nbv->listParams.get());
 
-    nbv->nbs = gmx::compat::make_unique<nbnxn_search>(DOMAINDECOMP(cr) ? &cr->dd->nc : nullptr,
-                                                      DOMAINDECOMP(cr) ? domdec_zones(cr->dd) : nullptr,
-                                                      bFEP_NonBonded,
-                                                      gmx_omp_nthreads_get(emntPairsearch));
+    nbv->nbs = std::make_unique<nbnxn_search>(DOMAINDECOMP(cr) ? &cr->dd->nc : nullptr,
+                                              DOMAINDECOMP(cr) ? domdec_zones(cr->dd) : nullptr,
+                                              bFEP_NonBonded,
+                                              gmx_omp_nthreads_get(emntPairsearch));
 
     for (int i = 0; i < nbv->ngrp; i++)
     {
index 65246ecb7bf0420b0e70de73528b405bada6191c..91fd83b57a96d8f01e21194641362e6276a294d5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -46,7 +46,6 @@
 
 #include <memory>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/mdlib/constr.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/pulling/pull.h"
@@ -112,7 +111,7 @@ std::unique_ptr<Constraints> makeConstraints(const gmx_mtop_t &mtop,
         // No work, so don't make a Constraints object.
         return nullptr;
     }
-    return compat::make_unique<Constraints::CreationHelper>
+    return std::make_unique<Constraints::CreationHelper>
                (mtop, ir, std::forward<Args>(args) ..., numConstraints, numSettles);
 }
 
index 6c015cc6eaae22cf7e20491c93e50f6be6339ee3..c86de049ec7ac5a8f14d6395291d356740dda274 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -42,7 +42,6 @@
 
 #include <memory>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/ewald/pme.h"
 #include "gromacs/gpu_utils/hostallocator.h"
 #include "gromacs/math/functions.h"
@@ -115,7 +114,7 @@ std::unique_ptr<MDAtoms>
 makeMDAtoms(FILE *fp, const gmx_mtop_t &mtop, const t_inputrec &ir,
             const bool rankHasPmeGpuTask)
 {
-    auto       mdAtoms = compat::make_unique<MDAtoms>();
+    auto       mdAtoms = std::make_unique<MDAtoms>();
     // GPU transfers may want to use a suitable pinning mode.
     if (rankHasPmeGpuTask)
     {
index 7b2c030e7978a33437097010bedd3f5c55a07e0b..4b33f86bb6f9a4286ceacaa833d879e88a41469f 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -43,7 +43,8 @@
 #include <cmath>
 #include <cstring>
 
-#include "gromacs/compat/make_unique.h"
+#include <memory>
+
 #include "gromacs/fileio/enxio.h"
 #include "gromacs/mdlib/mdebin.h"
 #include "gromacs/mdtypes/energyhistory.h"
@@ -716,7 +717,7 @@ void mde_delta_h_coll_update_energyhistory(const t_mde_delta_h_coll *dhc,
 {
     if (enerhist->deltaHForeignLambdas == nullptr)
     {
-        enerhist->deltaHForeignLambdas = gmx::compat::make_unique<delta_h_history_t>();
+        enerhist->deltaHForeignLambdas = std::make_unique<delta_h_history_t>();
         enerhist->deltaHForeignLambdas->dh.resize(dhc->ndh);
     }
 
index 3602f26d2856ef418a3f62d803cb07b74dc911b6..94c141aca29ba8ee13f768bfe05eed3f4fef3e89 100644 (file)
@@ -44,7 +44,8 @@
 
 #include "config.h"
 
-#include "gromacs/compat/make_unique.h"
+#include <memory>
+
 #include "gromacs/timing/walltime_accounting.h"
 #include "gromacs/utility/cstringutil.h"
 
@@ -205,7 +206,7 @@ std::unique_ptr<StopHandler> StopHandlerBuilder::getStopHandlerMD (
                 {return stopConditionTime->getSignal(bNS, step, fplog, walltime_accounting); });
     }
 
-    return compat::make_unique<StopHandler>(
+    return std::make_unique<StopHandler>(
             signal, simulationShareState, stopConditions_, neverUpdateNeighborList);
 }
 
index 311d1622980ed37caa564465701074fbd5302cc5..c1f2c983a595be181b14069f3573bc68be2b4c85 100644 (file)
@@ -42,8 +42,8 @@
 #include <cstdio>
 
 #include <algorithm>
+#include <memory>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/domdec/domdec_struct.h"
 #include "gromacs/fileio/confio.h"
 #include "gromacs/gmxlib/network.h"
@@ -875,7 +875,7 @@ void update_temperature_constants(gmx_stochd_t *sd, const t_inputrec *ir)
 
 Update::Impl::Impl(const t_inputrec    *ir, BoxDeformation *boxDeformation)
 {
-    sd = gmx::compat::make_unique<gmx_stochd_t>(ir);
+    sd = std::make_unique<gmx_stochd_t>(ir);
     update_temperature_constants(sd.get(), ir);
     xp.resizeWithPadding(0);
     deform = boxDeformation;
index d5b4e0770922a69300c79a430fbe62659be78b6d..fe98a6ccce9bb3faf696f6d04edc655560bb428e 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -41,9 +41,9 @@
 #include <cstdio>
 
 #include <algorithm>
+#include <memory>
 #include <vector>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/domdec/domdec.h"
 #include "gromacs/domdec/domdec_struct.h"
 #include "gromacs/gmxlib/network.h"
@@ -2039,7 +2039,7 @@ initVsite(const gmx_mtop_t &mtop,
         return vsite;
     }
 
-    vsite = gmx::compat::make_unique<gmx_vsite_t>();
+    vsite = std::make_unique<gmx_vsite_t>();
 
     vsite->n_intercg_vsite   = count_intercg_vsites(&mtop);
 
@@ -2068,7 +2068,7 @@ initVsite(const gmx_mtop_t &mtop,
                                                       molt.cgs);
         }
 
-        vsite->vsite_pbc_loc = gmx::compat::make_unique<VsitePbc>();
+        vsite->vsite_pbc_loc = std::make_unique<VsitePbc>();
     }
 
     vsite->nthreads = gmx_omp_nthreads_get(emntVSITE);
@@ -2082,7 +2082,7 @@ initVsite(const gmx_mtop_t &mtop,
         {
             try
             {
-                vsite->tData[thread] = gmx::compat::make_unique<VsiteThread>();
+                vsite->tData[thread] = std::make_unique<VsiteThread>();
 
                 InterdependentTask &idTask = vsite->tData[thread]->idTask;
                 idTask.nuse                = 0;
@@ -2092,7 +2092,7 @@ initVsite(const gmx_mtop_t &mtop,
         }
         if (vsite->nthreads > 1)
         {
-            vsite->tData[vsite->nthreads] = gmx::compat::make_unique<VsiteThread>();
+            vsite->tData[vsite->nthreads] = std::make_unique<VsiteThread>();
         }
     }
 
@@ -2594,7 +2594,7 @@ void set_vsite_top(gmx_vsite_t          *vsite,
 {
     if (vsite->n_intercg_vsite > 0 && vsite->bHaveChargeGroups)
     {
-        vsite->vsite_pbc_loc  = gmx::compat::make_unique<VsitePbc>();
+        vsite->vsite_pbc_loc  = std::make_unique<VsitePbc>();
         *vsite->vsite_pbc_loc = get_vsite_pbc(top->idef.iparams,
                                               top->idef.il, nullptr, md,
                                               top->cgs);
index 86c7bea16a62524f644139bfc59a260e0cea9f3f..1825b36b1b0e25cd2b5d0d5aea14ff9b16f3097f 100644 (file)
@@ -53,7 +53,6 @@
 
 #include "gromacs/awh/awh.h"
 #include "gromacs/commandline/filenm.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/domdec/collect.h"
 #include "gromacs/domdec/domdec.h"
 #include "gromacs/domdec/domdec_network.h"
@@ -265,7 +264,7 @@ void gmx::Integrator::do_md()
                   enerd);
 
     /* Kinetic energy data */
-    std::unique_ptr<gmx_ekindata_t> eKinData = compat::make_unique<gmx_ekindata_t>();
+    std::unique_ptr<gmx_ekindata_t> eKinData = std::make_unique<gmx_ekindata_t>();
     gmx_ekindata_t                 *ekind    = eKinData.get();
     init_ekindata(fplog, top_global, &(ir->opts), ekind);
     /* Copy the cos acceleration to the groups struct */
@@ -301,7 +300,7 @@ void gmx::Integrator::do_md()
     {
         dd_init_local_top(*top_global, &top);
 
-        stateInstance = compat::make_unique<t_state>();
+        stateInstance = std::make_unique<t_state>();
         state         = stateInstance.get();
         dd_init_local_state(cr->dd, state_global, state);
 
@@ -382,11 +381,11 @@ void gmx::Integrator::do_md()
         }
         if (!observablesHistory->energyHistory)
         {
-            observablesHistory->energyHistory = compat::make_unique<energyhistory_t>();
+            observablesHistory->energyHistory = std::make_unique<energyhistory_t>();
         }
         if (!observablesHistory->pullHistory)
         {
-            observablesHistory->pullHistory = compat::make_unique<PullHistory>();
+            observablesHistory->pullHistory = std::make_unique<PullHistory>();
         }
         /* Set the initial energy history in state by updating once */
         update_energyhistory(observablesHistory->energyHistory.get(), mdebin);
@@ -651,13 +650,13 @@ void gmx::Integrator::do_md()
                 MASTER(cr), ir->nstlist, mdrunOptions.reproducible, nstSignalComm,
                 mdrunOptions.maximumHoursToRun, ir->nstlist == 0, fplog, step, bNS, walltime_accounting);
 
-    auto checkpointHandler = compat::make_unique<CheckpointHandler>(
+    auto checkpointHandler = std::make_unique<CheckpointHandler>(
                 compat::make_not_null<SimulationSignal*>(&signals[eglsCHKPT]),
                 simulationsShareState, ir->nstlist == 0, MASTER(cr),
                 mdrunOptions.writeConfout, mdrunOptions.checkpointOptions.period);
 
     const bool resetCountersIsLocal = true;
-    auto       resetHandler         = compat::make_unique<ResetHandler>(
+    auto       resetHandler         = std::make_unique<ResetHandler>(
                 compat::make_not_null<SimulationSignal*>(&signals[eglsRESETCOUNTERS]), !resetCountersIsLocal,
                 ir->nsteps, MASTER(cr), mdrunOptions.timingOptions.resetHalfway,
                 mdrunOptions.maximumHoursToRun, mdlog, wcycle, walltime_accounting);
index aaec3bbf1f7b51c78397f1596686168109db31f8..ffa3117749d7409329b75f6349d1dc859658b69f 100644 (file)
@@ -52,7 +52,6 @@
 
 #include "gromacs/awh/awh.h"
 #include "gromacs/commandline/filenm.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/domdec/collect.h"
 #include "gromacs/domdec/domdec.h"
 #include "gromacs/domdec/domdec_network.h"
@@ -239,7 +238,7 @@ void gmx::Integrator::do_mimic()
                   enerd);
 
     /* Kinetic energy data */
-    std::unique_ptr<gmx_ekindata_t> eKinData = compat::make_unique<gmx_ekindata_t>();
+    std::unique_ptr<gmx_ekindata_t> eKinData = std::make_unique<gmx_ekindata_t>();
     gmx_ekindata_t                 *ekind    = eKinData.get();
     init_ekindata(fplog, top_global, &(ir->opts), ekind);
     /* Copy the cos acceleration to the groups struct */
@@ -270,7 +269,7 @@ void gmx::Integrator::do_mimic()
     {
         dd_init_local_top(*top_global, &top);
 
-        stateInstance = compat::make_unique<t_state>();
+        stateInstance = std::make_unique<t_state>();
         state         = stateInstance.get();
         dd_init_local_state(cr->dd, state_global, state);
 
index 6ca622a2a12ec64fda6e5308874e54976f5ecf06..aba3f6fc9514e14b449cacd670b12949e15d3704 100644 (file)
@@ -53,7 +53,6 @@
 
 #include "gromacs/awh/awh.h"
 #include "gromacs/commandline/filenm.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/domdec/collect.h"
 #include "gromacs/domdec/domdec.h"
 #include "gromacs/domdec/domdec_network.h"
@@ -305,7 +304,7 @@ void gmx::Integrator::do_rerun()
                   enerd);
 
     /* Kinetic energy data */
-    std::unique_ptr<gmx_ekindata_t> eKinData = compat::make_unique<gmx_ekindata_t>();
+    std::unique_ptr<gmx_ekindata_t> eKinData = std::make_unique<gmx_ekindata_t>();
     gmx_ekindata_t                 *ekind    = eKinData.get();
     init_ekindata(fplog, top_global, &(ir->opts), ekind);
     /* Copy the cos acceleration to the groups struct */
@@ -336,7 +335,7 @@ void gmx::Integrator::do_rerun()
     {
         dd_init_local_top(*top_global, &top);
 
-        stateInstance = compat::make_unique<t_state>();
+        stateInstance = std::make_unique<t_state>();
         state         = stateInstance.get();
         dd_init_local_state(cr->dd, state_global, state);
 
index 7dfeb1293a94aa1b305ac987a715a8154af0673c..5f38a12d47810bd41b24cae0f2b849a9510dac2d 100644 (file)
@@ -54,9 +54,9 @@
 #include <cstring>
 
 #include <algorithm>
+#include <memory>
 
 #include "gromacs/commandline/filenm.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/domdec/domdec.h"
 #include "gromacs/domdec/domdec_struct.h"
 #include "gromacs/domdec/localatomsetmanager.h"
@@ -169,7 +169,7 @@ Mdrunner Mdrunner::cloneOnSpawnedThread() const
     // part of the interface to the client code, which is associated only with the
     // original thread. Handles to the same resources can be obtained by copy.
     {
-        newRunner.restraintManager_ = compat::make_unique<RestraintManager>(*restraintManager_);
+        newRunner.restraintManager_ = std::make_unique<RestraintManager>(*restraintManager_);
     }
 
     // Copy original cr pointer before master thread can pass the thread barrier
@@ -192,7 +192,7 @@ Mdrunner Mdrunner::cloneOnSpawnedThread() const
     newRunner.replExParams        = replExParams;
     newRunner.pforce              = pforce;
     newRunner.ms                  = ms;
-    newRunner.stopHandlerBuilder_ = compat::make_unique<StopHandlerBuilder>(*stopHandlerBuilder_);
+    newRunner.stopHandlerBuilder_ = std::make_unique<StopHandlerBuilder>(*stopHandlerBuilder_);
 
     threadMpiMdrunnerAccessBarrier();
 
@@ -552,7 +552,7 @@ int Mdrunner::mdrunner()
     if (SIMMASTER(cr))
     {
         /* Only the master rank has the global state */
-        globalState = compat::make_unique<t_state>();
+        globalState = std::make_unique<t_state>();
 
         /* Read (nearly) all data required for the simulation */
         read_tpx_state(ftp2fn(efTPR, filenames.size(), filenames.data()), inputrec, globalState.get(), &mtop);
@@ -754,7 +754,7 @@ int Mdrunner::mdrunner()
     {
         if (!MASTER(cr))
         {
-            globalState = compat::make_unique<t_state>();
+            globalState = std::make_unique<t_state>();
         }
         broadcastStateWithoutDynamics(cr, globalState.get());
     }
@@ -1689,7 +1689,7 @@ void Mdrunner::BuilderImplementation::addReplicaExchange(const ReplicaExchangePa
 
 void Mdrunner::BuilderImplementation::addMultiSim(gmx_multisim_t* multisim)
 {
-    multisim_ = compat::make_unique<gmx_multisim_t*>(multisim);
+    multisim_ = std::make_unique<gmx_multisim_t*>(multisim);
 }
 
 Mdrunner Mdrunner::BuilderImplementation::build()
@@ -1766,7 +1766,7 @@ Mdrunner Mdrunner::BuilderImplementation::build()
         GMX_THROW(gmx::APIError("MdrunnerBuilder::addBondedTaskAssignment() is required before build()"));
     }
 
-    newRunner.restraintManager_ = compat::make_unique<gmx::RestraintManager>();
+    newRunner.restraintManager_ = std::make_unique<gmx::RestraintManager>();
 
     if (stopHandlerBuilder_)
     {
@@ -1774,7 +1774,7 @@ Mdrunner Mdrunner::BuilderImplementation::build()
     }
     else
     {
-        newRunner.stopHandlerBuilder_ = compat::make_unique<StopHandlerBuilder>();
+        newRunner.stopHandlerBuilder_ = std::make_unique<StopHandlerBuilder>();
     }
 
     return newRunner;
@@ -1823,7 +1823,7 @@ void Mdrunner::BuilderImplementation::addStopHandlerBuilder(std::unique_ptr<Stop
 }
 
 MdrunnerBuilder::MdrunnerBuilder(compat::not_null<SimulationContext*> context) :
-    impl_ {gmx::compat::make_unique<Mdrunner::BuilderImplementation>(context)}
+    impl_ {std::make_unique<Mdrunner::BuilderImplementation>(context)}
 {
 }
 
index 5a9e98714037f51c6bb421ebb64948b570f17496..19420dfb51f6d283854591efba614434b8d3b598 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -39,8 +39,9 @@
 
 #include <cassert>
 
+#include <memory>
+
 #include "gromacs/commandline/filenm.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/domdec/domdec.h"
 #include "gromacs/fileio/oenv.h"
 #include "gromacs/hardware/hw_info.h"
index fbf1bdd3beceb36903f2158ccf2f3907f23370cd..039a11e774d868651ab9f79264572fd075c94af5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -39,7 +39,6 @@
 #include <memory>
 
 #include "gromacs/applied-forces/electricfield.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/mdtypes/iforceprovider.h"
 #include "gromacs/mdtypes/imdmodule.h"
 #include "gromacs/mdtypes/imdoutputprovider.h"
@@ -151,7 +150,7 @@ ForceProviders *MDModules::initForceProviders()
 {
     GMX_RELEASE_ASSERT(impl_->forceProviders_ == nullptr,
                        "Force providers initialized multiple times");
-    impl_->forceProviders_ = compat::make_unique<ForceProviders>();
+    impl_->forceProviders_ = std::make_unique<ForceProviders>();
     impl_->field_->initForceProviders(impl_->forceProviders_.get());
     for (auto && module : impl_->modules_)
     {
index 3510be85c04d59ef8d6fc047830f205351fb4d75..152960491a84c04e4ff164c431544a5995817f21 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
 
 #include "config.h"
 
+#include <memory>
+
 #include <gmock/gmock.h>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/hardware/hardwaretopology.h"
 #include "gromacs/mdtypes/commrec.h"
 #include "gromacs/utility/basenetwork.h"
@@ -87,7 +88,7 @@ ThreadAffinityTestHelper::~ThreadAffinityTestHelper()
 
 void ThreadAffinityTestHelper::setLogicalProcessorCount(int logicalProcessorCount)
 {
-    hwTop_ = gmx::compat::make_unique<HardwareTopology>(logicalProcessorCount);
+    hwTop_ = std::make_unique<HardwareTopology>(logicalProcessorCount);
 }
 
 } // namespace test
index 831b22fccf29d3b7b180b6356745ca81053617e9..71ff04577e1dd5c2382f17ba525e943513f9dbe2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -50,7 +50,6 @@
 #include <string>
 #include <vector>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/onlinehelp/helpformat.h"
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/gmxassert.h"
@@ -456,7 +455,7 @@ class HelpWriterContext::Impl
                                        "Accessing console formatter for non-console output");
                     if (!consoleOptionsFormatter_)
                     {
-                        consoleOptionsFormatter_ = compat::make_unique<TextTableFormatter>();
+                        consoleOptionsFormatter_ = std::make_unique<TextTableFormatter>();
                         consoleOptionsFormatter_->setFirstColumnIndent(1);
                         consoleOptionsFormatter_->addColumn(nullptr, 7, false);
                         consoleOptionsFormatter_->addColumn(nullptr, 18, false);
index 6f3b73a3fe6b3a9d7d11c565f915c65e79fa54a1..abfe841cdea42e9ad4600f29c429f543e9e97732 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
 #ifndef GMX_OPTIONS_BASICOPTIONS_H
 #define GMX_OPTIONS_BASICOPTIONS_H
 
+#include <memory>
 #include <string>
 #include <vector>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/options/abstractoption.h"
 #include "gromacs/options/ivaluestore.h"
 #include "gromacs/utility/arrayref.h"
@@ -577,7 +577,7 @@ class EnumOption : public OptionTemplate<EnumType, EnumOption<EnumType> >
                     *this, enumValues_, enumValuesCount_,
                     convertToInt(MyBase::defaultValue()),
                     convertToInt(MyBase::defaultValueIfSet()),
-                    compat::make_unique<internal::EnumIndexStore<EnumType> >(
+                    std::make_unique<internal::EnumIndexStore<EnumType> >(
                             MyBase::store(), MyBase::storeVector()));
         }
 
index 9f9486aeea064091a37c573b411483a74c498cc8..c8de6e435a8a2ea3b99d02a902e71e21622289bc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2012,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -43,9 +43,9 @@
 
 #include "options.h"
 
+#include <memory>
 #include <utility>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/options/abstractoption.h"
 #include "gromacs/options/abstractoptionstorage.h"
 #include "gromacs/options/optionsection.h"
@@ -114,7 +114,7 @@ OptionSectionImpl::addSectionImpl(const AbstractOptionSection &section)
     // Make sure that there are no duplicate sections.
     GMX_RELEASE_ASSERT(findSection(name) == nullptr, "Duplicate subsection name");
     std::unique_ptr<IOptionSectionStorage> storage(section.createStorage());
-    subsections_.push_back(compat::make_unique<OptionSectionImpl>(managers_, std::move(storage), name));
+    subsections_.push_back(std::make_unique<OptionSectionImpl>(managers_, std::move(storage), name));
     return subsections_.back().get();
 }
 
index 80835ecf5e3af45852deed42a9be2dd9aa4d948e..4c46b06e4bb6bd02c74dde432905119de5270d6c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2016,2018, by the GROMACS development team, led by
+ * Copyright (c) 2016,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -36,7 +36,8 @@
 
 #include "optionsection.h"
 
-#include "gromacs/compat/make_unique.h"
+#include <memory>
+
 #include "gromacs/options/isectionstorage.h"
 
 namespace gmx
@@ -57,7 +58,7 @@ class OptionSectionStorage : public IOptionSectionStorage
 
 std::unique_ptr<IOptionSectionStorage> OptionSection::createStorage() const
 {
-    return compat::make_unique<OptionSectionStorage>();
+    return std::make_unique<OptionSectionStorage>();
 }
 
 } // namespace gmx
index 0081912bcf3f9c769f2a985cce0926890d7f5ea3..c8abc6a0699cf6faae38be3b125e8e812ce987de 100644 (file)
@@ -601,7 +601,7 @@ void OptionStorageTemplate<T>::setDefaultValueIfSet(const T &value)
         GMX_THROW(APIError("defaultValueIfSet() is not supported with allowMultiple()"));
     }
     setFlag(efOption_DefaultValueIfSetExists);
-    defaultValueIfSet_ = compat::make_unique<T>(value);
+    defaultValueIfSet_ = std::make_unique<T>(value);
 }
 
 } // namespace gmx
index de1cbf6631e84178d06d8bc754e0add514078511..175afd8f17eb11ed2bd4e677607b52f38c50c12d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2016,2018, by the GROMACS development team, led by
+ * Copyright (c) 2016,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -46,7 +46,6 @@
 #include <memory>
 #include <vector>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/options/abstractsection.h"
 #include "gromacs/options/ioptionscontainerwithsections.h"
 #include "gromacs/options/isectionstorage.h"
@@ -154,7 +153,7 @@ template <class T>
 std::unique_ptr<IOptionSectionStorage> RepeatingOptionSection<T>::createStorage() const
 {
 
-    return compat::make_unique<RepeatingOptionSectionStorage<T> >(*this);
+    return std::make_unique<RepeatingOptionSectionStorage<T> >(*this);
 }
 
 /*! \brief
index d0503544adb79cd249956113afc74cf83eb3f5a7..4f5c58ec9d8f516e5db0323f1e054ea0120009ed 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -40,8 +40,9 @@
 
 #include <cstdio>
 
+#include <memory>
+
 #include "gromacs/commandline/filenm.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/math/vec.h"
@@ -565,7 +566,7 @@ void initPullHistory(pull_t             *pull,
     /* If pull->coordForceHistory is already set we are starting from a checkpoint. Do not reset it. */
     if (observablesHistory->pullHistory == nullptr)
     {
-        observablesHistory->pullHistory           = gmx::compat::make_unique<PullHistory>();
+        observablesHistory->pullHistory           = std::make_unique<PullHistory>();
         pull->coordForceHistory                   = observablesHistory->pullHistory.get();
         pull->coordForceHistory->numValuesInXSum  = 0;
         pull->coordForceHistory->numValuesInFSum  = 0;
index 2b6017d56efc99399746ccf8d5847970a76738a5..f0f05a0cf478521f85ca5a0705077264dabb3340 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -46,9 +46,9 @@
 #include <cstdlib>
 
 #include <algorithm>
+#include <memory>
 
 #include "gromacs/commandline/filenm.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/domdec/domdec_struct.h"
 #include "gromacs/domdec/localatomset.h"
 #include "gromacs/domdec/localatomsetmanager.h"
@@ -1896,7 +1896,7 @@ init_pull(FILE *fplog, const pull_params_t *pull_params, const t_inputrec *ir,
             if (group.epgrppbc == epgrppbcREFAT || group.epgrppbc == epgrppbcPREVSTEPCOM)
             {
                 /* pbcAtomSet consists of a single atom */
-                group.pbcAtomSet = gmx::compat::make_unique<gmx::LocalAtomSet>(atomSets->add({&group.params.pbcatom, &group.params.pbcatom + 1}));
+                group.pbcAtomSet = std::make_unique<gmx::LocalAtomSet>(atomSets->add({&group.params.pbcatom, &group.params.pbcatom + 1}));
             }
         }
     }
index 0e460fe58543c76809ff58b51cac42fb3cf00ace..2f129777bc849103e40ec807114f6bd7b6a87027 100644 (file)
@@ -45,9 +45,9 @@
 #include <cstring>
 
 #include <algorithm>
+#include <memory>
 
 #include "gromacs/commandline/filenm.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/domdec/dlbtiming.h"
 #include "gromacs/domdec/domdec_struct.h"
 #include "gromacs/domdec/ga2la.h"
@@ -3604,7 +3604,7 @@ init_rot(FILE *fplog, t_inputrec *ir, int nfile, const t_filenm fnm[],
         fprintf(stdout, "%s Initializing ...\n", RotStr);
     }
 
-    auto        enforcedRotation = gmx::compat::make_unique<gmx::EnforcedRotation>();
+    auto        enforcedRotation = std::make_unique<gmx::EnforcedRotation>();
     gmx_enfrot *er               = enforcedRotation->getLegacyEnfrot();
     // TODO When this module implements IMdpOptions, the ownership will become more clear.
     er->rot         = ir->rot;
@@ -3667,7 +3667,7 @@ init_rot(FILE *fplog, t_inputrec *ir, int nfile, const t_filenm fnm[],
     {
         gmx_enfrotgrp *erg = &ergRef;
         erg->rotg       = &er->rot->grp[groupIndex];
-        erg->atomSet    = gmx::compat::make_unique<gmx::LocalAtomSet>(atomSets->add({erg->rotg->ind, erg->rotg->ind + erg->rotg->nat}));
+        erg->atomSet    = std::make_unique<gmx::LocalAtomSet>(atomSets->add({erg->rotg->ind, erg->rotg->ind + erg->rotg->nat}));
         erg->groupIndex = groupIndex;
 
         if (nullptr != fplog)
index 4778286082bc0d8119e7d4632176dafc2688f824..780326ebc210a37ac9e6857edbbae5d44a92277b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -51,7 +51,6 @@
 #include <mutex>
 #include <vector>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/utility/exceptions.h"
 
 namespace gmx
index c1f9882dc5cefa5f65863d839b30a5e0ffd90ef8..590516dfc011190bc5010ad6fb5ef602489f3d17 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -37,7 +37,8 @@
 
 #include "restraintmdmodule.h"
 
-#include "gromacs/compat/make_unique.h"
+#include <memory>
+
 #include "gromacs/mdtypes/forceoutput.h"
 #include "gromacs/mdtypes/iforceprovider.h"
 
@@ -170,8 +171,8 @@ RestraintMDModuleImpl::~RestraintMDModuleImpl() = default;
 
 RestraintMDModuleImpl::RestraintMDModuleImpl(std::shared_ptr<IRestraintPotential> restraint,
                                              const std::vector<int>              &sites) :
-    forceProvider_(compat::make_unique<RestraintForceProvider>(restraint,
-                                                               sites))
+    forceProvider_(std::make_unique<RestraintForceProvider>(restraint,
+                                                            sites))
 {
     GMX_ASSERT(forceProvider_, "Class invariant implies non-null ForceProvider.");
 }
@@ -218,9 +219,9 @@ std::unique_ptr<RestraintMDModule>
 RestraintMDModule::create(std::shared_ptr<IRestraintPotential>  restraint,
                           const std::vector<int>               &sites)
 {
-    auto implementation = compat::make_unique<RestraintMDModuleImpl>(std::move(restraint),
-                                                                     sites);
-    auto newModule = compat::make_unique<RestraintMDModule>(std::move(implementation));
+    auto implementation = std::make_unique<RestraintMDModuleImpl>(std::move(restraint),
+                                                                  sites);
+    auto newModule = std::make_unique<RestraintMDModule>(std::move(implementation));
     return newModule;
 }
 
index 304da3d07ff244d5044190836392e53aeb2a4d48..6f2596c11312a398023503b88137195598a68700 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
 #include <cstdio>
 
 #include <exception>
+#include <memory>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/selection/selection.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/exceptions.h"
@@ -360,7 +360,7 @@ SelectionParserParameter::SelectionParserParameter(
         const SelectionLocation         &location)
     : name_(name != nullptr ? name : ""),
       location_(location),
-      values_(values ? std::move(values) : compat::make_unique<SelectionParserValueList>())
+      values_(values ? std::move(values) : std::make_unique<SelectionParserValueList>())
 {
 }
 
index eb8eaa538bc16301f533f9c33f93a19d22c092b7..911e0b153a32caaabb587dd76e805be2c69a6637 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2018, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -56,7 +56,6 @@
 #include <memory>
 #include <string>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/math/vectypes.h"
 #include "gromacs/utility/gmxassert.h"
@@ -111,7 +110,7 @@ class SelectionParserValue
         //! Allocates and initializes an empty value list.
         static SelectionParserValueListPointer createList()
         {
-            return compat::make_unique<SelectionParserValueList>();
+            return std::make_unique<SelectionParserValueList>();
         }
         /*! \brief
          * Allocates and initializes a value list with a single value.
@@ -322,7 +321,7 @@ class SelectionParserParameter
         //! Allocates and initializes an empty parameter list.
         static SelectionParserParameterListPointer createList()
         {
-            return compat::make_unique<SelectionParserParameterList>();
+            return std::make_unique<SelectionParserParameterList>();
         }
         /*! \brief
          * Allocates and initializes a parsed method parameter.
index 6b96478b87f895327060d9279e62857bd33d914f..c2a6218fb86c65b22ccac31f40e8922840634087 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -50,7 +50,6 @@
 #include <string>
 #include <vector>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/onlinehelp/helpmanager.h"
 #include "gromacs/onlinehelp/helpwritercontext.h"
 #include "gromacs/options/basicoptions.h"
@@ -92,7 +91,7 @@ SelectionCollection::Impl::Impl()
     sc_.top       = nullptr;
     gmx_ana_index_clear(&sc_.gall);
     sc_.mempool   = nullptr;
-    sc_.symtab    = compat::make_unique<SelectionParserSymbolTable>();
+    sc_.symtab    = std::make_unique<SelectionParserSymbolTable>();
     gmx_ana_index_clear(&requiredAtoms_);
     gmx_ana_selmethod_register_defaults(sc_.symtab.get());
 }
@@ -726,7 +725,7 @@ std::unique_ptr<TextWriter> initStatusWriter(TextOutputStream *statusStream)
     std::unique_ptr<TextWriter> statusWriter;
     if (statusStream != nullptr)
     {
-        statusWriter = compat::make_unique<TextWriter>(statusStream);
+        statusWriter = std::make_unique<TextWriter>(statusStream);
         statusWriter->wrapperSettings().setLineLength(78);
     }
     return statusWriter;
index 5d1ed80ed62f297ca1ad1a77f8ee907fca326983..ef6b40403d0f50b14d910e4bf16061984aabc57c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -46,8 +46,8 @@
 #include <cstring>
 
 #include <algorithm>
+#include <memory>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/fileio/confio.h"
 #include "gromacs/fileio/trxio.h"
 #include "gromacs/math/vec.h"
@@ -129,7 +129,7 @@ void TopologyManager::loadTopology(const char *filename)
     matrix  box;
 
     GMX_RELEASE_ASSERT(mtop_ == nullptr, "Topology initialized more than once");
-    mtop_ = gmx::compat::make_unique<gmx_mtop_t>();
+    mtop_ = std::make_unique<gmx_mtop_t>();
     readConfAndTopology(
             gmx::test::TestFileManager::getInputFilePath(filename).c_str(),
             &fullTopology, mtop_.get(), &ePBC, frame_ != nullptr ? &xtop : nullptr,
@@ -152,7 +152,7 @@ void TopologyManager::loadTopology(const char *filename)
 void TopologyManager::initAtoms(int count)
 {
     GMX_RELEASE_ASSERT(mtop_ == nullptr, "Topology initialized more than once");
-    mtop_ = gmx::compat::make_unique<gmx_mtop_t>();
+    mtop_ = std::make_unique<gmx_mtop_t>();
     mtop_->moltype.resize(1);
     init_t_atoms(&mtop_->moltype[0].atoms, count, FALSE);
     mtop_->molblock.resize(1);
index 7df9da3d40fa9fc8236c36bfca6fb1d7ad621348..0066183c719633ecf320105b5b36233a2bc354a6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
 #include <cstdlib>
 #include <ctime>
 
+#include <memory>
 #include <string>
 #include <vector>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/domdec/domdec_struct.h"
 #include "gromacs/domdec/localatomset.h"
 #include "gromacs/domdec/localatomsetmanager.h"
@@ -1559,7 +1559,7 @@ void init_swapcoords(
     {
         if (oh->swapHistory == nullptr)
         {
-            oh->swapHistory = gmx::compat::make_unique<swaphistory_t>(swaphistory_t {});
+            oh->swapHistory = std::make_unique<swaphistory_t>(swaphistory_t {});
         }
         swapstate = oh->swapHistory.get();
 
index c048ed739c3abd2989f35ebd4fac45ea7681efbe..253895ea737db00657c1c2b4ff0a02cb00822436 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -241,7 +241,7 @@ const char ReportMethodsInfo::shortDescription[] =
     "and/or to the standard output.";
 ICommandLineOptionsModulePointer ReportMethodsInfo::create()
 {
-    return ICommandLineOptionsModulePointer(compat::make_unique<ReportMethods>());
+    return ICommandLineOptionsModulePointer(std::make_unique<ReportMethods>());
 }
 
 } // namespace gmx
index 47dd6acea5719ad519cad56b199c4e00c3c1d7d3..16bec32ef99f22208e00b9b6b9f30c0017812c99 100644 (file)
@@ -44,8 +44,8 @@
 #include <cstring>
 
 #include <algorithm>
+#include <memory>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/math/functions.h"
 #include "gromacs/math/utilities.h"
 #include "gromacs/topology/residuetypes.h"
index 74ecf2df9c134e76a2371d3887fb3cb92295302e..d476fa5c134224993136f134190d42054658b954 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2011,2012,2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -44,6 +44,7 @@
 #include "angle.h"
 
 #include <algorithm>
+#include <memory>
 #include <string>
 #include <vector>
 
@@ -51,7 +52,6 @@
 #include "gromacs/analysisdata/modules/average.h"
 #include "gromacs/analysisdata/modules/histogram.h"
 #include "gromacs/analysisdata/modules/plot.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/options/basicoptions.h"
@@ -319,9 +319,9 @@ Angle::Angle()
       g1type_(Group1Type_Angle), g2type_(Group2Type_None),
       binWidth_(1.0), natoms1_(0), natoms2_(0)
 {
-    averageModule_ = compat::make_unique<AnalysisDataFrameAverageModule>();
+    averageModule_ = std::make_unique<AnalysisDataFrameAverageModule>();
     angles_.addModule(averageModule_);
-    histogramModule_ = compat::make_unique<AnalysisDataSimpleHistogramModule>();
+    histogramModule_ = std::make_unique<AnalysisDataSimpleHistogramModule>();
     angles_.addModule(histogramModule_);
 
     registerAnalysisDataset(&angles_, "angle");
index 6ad5ec183fb30d0e825d2e9381e0b179f21ed593..ff4bffc430fcd9798885b1a988e5511bd4959428 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
 
 #include "distance.h"
 
+#include <memory>
 #include <string>
 
 #include "gromacs/analysisdata/analysisdata.h"
 #include "gromacs/analysisdata/modules/average.h"
 #include "gromacs/analysisdata/modules/histogram.h"
 #include "gromacs/analysisdata/modules/plot.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/options/basicoptions.h"
 #include "gromacs/options/filenameoption.h"
@@ -111,10 +111,10 @@ class Distance : public TrajectoryAnalysisModule
 
 Distance::Distance()
     : meanLength_(0.1), lengthDev_(1.0), binWidth_(0.001),
-      summaryStatsModule_(compat::make_unique<AnalysisDataAverageModule>()),
-      allStatsModule_(compat::make_unique<AnalysisDataAverageModule>()),
-      averageModule_(compat::make_unique<AnalysisDataFrameAverageModule>()),
-      histogramModule_(compat::make_unique<AnalysisDataSimpleHistogramModule>())
+      summaryStatsModule_(std::make_unique<AnalysisDataAverageModule>()),
+      allStatsModule_(std::make_unique<AnalysisDataAverageModule>()),
+      averageModule_(std::make_unique<AnalysisDataFrameAverageModule>()),
+      histogramModule_(std::make_unique<AnalysisDataSimpleHistogramModule>())
 {
     summaryStatsModule_->setAverageDataSets(true);
     distances_.addModule(summaryStatsModule_);
index f7a292e649ae45c2871808fdff958a54eee87f49..c2e8eb2dc39b239267ea78c79ab7dbfb749d2b5a 100644 (file)
@@ -43,7 +43,8 @@
 
 #include "topologyinformation.h"
 
-#include "gromacs/compat/make_unique.h"
+#include <memory>
+
 #include "gromacs/fileio/confio.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/pbcutil/rmpbc.h"
@@ -59,7 +60,7 @@ namespace gmx
 {
 
 TopologyInformation::TopologyInformation()
-    : mtop_(compat::make_unique<gmx_mtop_t>()),
+    : mtop_(std::make_unique<gmx_mtop_t>()),
       hasLoadedMtop_(false),
       expandedTopology_(nullptr),
       atoms_ (nullptr),
@@ -74,7 +75,7 @@ TopologyInformation::~TopologyInformation()
 
 void TopologyInformation::fillFromInputFile(const std::string &filename)
 {
-    mtop_ = gmx::compat::make_unique<gmx_mtop_t>();
+    mtop_ = std::make_unique<gmx_mtop_t>();
     // TODO When filename is not a .tpr, then using readConfAndAtoms
     // would be efficient for not doing multiple conversions for
     // makeAtomsData. However we'd also need to be able to copy the
@@ -107,7 +108,7 @@ const gmx_localtop_t *TopologyInformation::expandedTopology() const
     // Do lazy initialization
     if (expandedTopology_ == nullptr && hasTopology())
     {
-        expandedTopology_ = gmx::compat::make_unique<gmx_localtop_t>();
+        expandedTopology_ = std::make_unique<gmx_localtop_t>();
         gmx_mtop_generate_local_top(*mtop_, expandedTopology_.get(), false);
     }
 
index eda7d1bcaedfe42d7481a5c00d71a722357214b1..b7b7bf764c26d7149be184311a1b12526c9da11d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2015,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2015,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -66,7 +66,6 @@
 #include <windows.h>  // only for the page size query purposes
 #endif
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/utility/gmxassert.h"
 
 namespace gmx
index 05ece95265f890771a6b7f7769f7d48aa9911361..8e9464e4227e1f73f1e0960befcb58fe3a22b5c8 100644 (file)
@@ -50,7 +50,6 @@
 #include <typeinfo>
 #include <utility>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/utility/gmxassert.h"
 
 namespace gmx
@@ -226,7 +225,7 @@ class Any
                 explicit Content(T &&value) : value_(std::move(value)) {}
 
                 const std::type_info &typeInfo() const override { return typeid(T); }
-                std::unique_ptr<IContent> clone() const override { return compat::make_unique<Content>(value_); }
+                std::unique_ptr<IContent> clone() const override { return std::make_unique<Content>(value_); }
 
                 T value_;
         };
index ff884942f6461cd6ccfaa81d9e345d4c85986ecc..db5879ccf51e9e0e91e065c81d76cd1d6f549742 100644 (file)
@@ -42,7 +42,6 @@
 #include <typeindex>
 #include <vector>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/ikeyvaluetreeerror.h"
 #include "gromacs/utility/keyvaluetreebuilder.h"
@@ -325,7 +324,7 @@ class KeyValueTreeTransformerImpl
         {
             GMX_RELEASE_ASSERT(rootRule_ == nullptr,
                                "Cannot specify key match type after child rules");
-            rootRule_ = compat::make_unique<Rule>(keyMatchType);
+            rootRule_ = std::make_unique<Rule>(keyMatchType);
         }
 
         std::unique_ptr<Rule>             rootRule_;
index 19826e1e6936fe3464c3626094176c032c32a3f6..5f06e0ad3cf2e447adb7b3a37d6b6064d26368c1 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2011,2012,2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -52,8 +52,9 @@
  */
 #include "gmxpre.h"
 
+#include <memory>
+
 #include "gromacs/commandline/pargs.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/compat/pointers.h"
 #include "gromacs/domdec/domdec.h"
 #include "gromacs/fileio/gmxfio.h"
index eb4d9d72a88eaa04dad4679f67b672a205c8b849..73c914f8d3654958e2a7977a705338f47da8f229 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -50,7 +50,6 @@
 #include <string>
 #include <vector>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/fileio/enxio.h"
 #include "gromacs/trajectory/energyframe.h"
 #include "gromacs/utility/exceptions.h"
@@ -120,8 +119,8 @@ openEnergyFileToReadFields(const std::string              &filename,
         GMX_THROW(APIError(requiredEnergiesNotFound));
     }
 
-    return EnergyFrameReaderPtr(compat::make_unique<EnergyFrameReader>(indicesOfEnergyFields,
-                                                                       energyFile.release()));
+    return EnergyFrameReaderPtr(std::make_unique<EnergyFrameReader>(indicesOfEnergyFields,
+                                                                    energyFile.release()));
 }
 
 //! Helper function to obtain resources
index c35e54891586412590cf49788dd3325b86bac268..d4346e1e6a091b633aa2e41084b1e0ba7afaa686 100644 (file)
@@ -50,7 +50,6 @@
 
 #include <gtest/gtest.h>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/options/filenameoption.h"
 #include "gromacs/topology/idef.h"
 #include "gromacs/topology/ifunc.h"
index a58da532d69b3b6af429f4298e8b91ac02caf1eb..4e14aba90b2c16387dbca3bb01f134247ac62640 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -50,7 +50,6 @@
 
 #include <gtest/gtest.h>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/options/filenameoption.h"
 #include "gromacs/topology/idef.h"
 #include "gromacs/topology/ifunc.h"
index 29d9a49c013e39a6bfeb0bfcee8abe1dbae09ef8..6f97fbdc3dff14ea91e1a976067ce47b04e08cec 100644 (file)
@@ -52,7 +52,6 @@
 
 #include <gtest/gtest.h>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/options/filenameoption.h"
 #include "gromacs/topology/idef.h"
 #include "gromacs/topology/ifunc.h"
@@ -188,8 +187,8 @@ void executeRerunTest(TestFileManager        *fileManager,
         };
     // Build the manager that will present matching pairs of frames to compare
     FramePairManager<TrajectoryFrameReader, TrajectoryFrame>
-    trajectoryManager(compat::make_unique<TrajectoryFrameReader>(normalRunTrajectoryFileName),
-                      compat::make_unique<TrajectoryFrameReader>(rerunTrajectoryFileName));
+    trajectoryManager(std::make_unique<TrajectoryFrameReader>(normalRunTrajectoryFileName),
+                      std::make_unique<TrajectoryFrameReader>(rerunTrajectoryFileName));
     // Compare the trajectory frames.
     trajectoryManager.compareAllFramePairs(trajectoryComparator);
 }
index b2fb82e12b6101a467bd722524ab0c2a6a524911..10e25a19e96f525e673e91d71ede65ad2259abab 100644 (file)
@@ -51,7 +51,6 @@
 
 #include <gtest/gtest.h>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/options/filenameoption.h"
 #include "gromacs/topology/idef.h"
 #include "gromacs/topology/ifunc.h"
index 440607dc58672aab820943b7dee1f20825ae7931..93f0798bc4dd04ccda127b2016abffd92b35676b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -46,7 +46,6 @@
 #include <memory>
 #include <string>
 
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/utility/gmxassert.h"
 
 namespace gmx
@@ -63,7 +62,7 @@ class ReferenceDataEntry
 
         static EntryPointer createRoot()
         {
-            return gmx::compat::make_unique<ReferenceDataEntry>("", "");
+            return std::make_unique<ReferenceDataEntry>("", "");
         }
 
         ReferenceDataEntry(const char *type, const char *id)
index 3b33c1e883917982f02132ee905932f9b810bd85..e87b9ea88f0859f27ff5d7b4c2353b1448ba3998 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -56,7 +56,6 @@
 #include "gromacs/commandline/cmdlineinit.h"
 #include "gromacs/commandline/cmdlineparser.h"
 #include "gromacs/commandline/cmdlineprogramcontext.h"
-#include "gromacs/compat/make_unique.h"
 #include "gromacs/math/utilities.h"
 #include "gromacs/options/basicoptions.h"
 #include "gromacs/options/options.h"
@@ -188,7 +187,7 @@ void initTestUtils(const char *dataPath, const char *tempPath, bool usesMpi,
         {
             callAddGlobalTestEnvironment();
         }
-        g_testContext = gmx::compat::make_unique<TestProgramContext>(context);
+        g_testContext = std::make_unique<TestProgramContext>(context);
         setProgramContext(g_testContext.get());
         // Use the default finder that does not respect GMXLIB, since the tests
         // generally can only get confused by a different set of data files.
index de7c06a79a027167a650a5723ae53ffb6ea383d4..4f04ce62f35609396309266b99acdcd87c2ca63f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2015,2018, by the GROMACS development team, led by
+ * Copyright (c) 2015,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -43,7 +43,8 @@
 
 #include "textblockmatchers.h"
 
-#include "gromacs/compat/make_unique.h"
+#include <memory>
+
 #include "gromacs/utility/gmxregex.h"
 #include "gromacs/utility/stringstream.h"
 #include "gromacs/utility/textreader.h"
@@ -134,12 +135,12 @@ ITextBlockMatcherSettings::~ITextBlockMatcherSettings()
 
 TextBlockMatcherPointer ExactTextMatch::createMatcher() const
 {
-    return TextBlockMatcherPointer(compat::make_unique<ExactTextMatcher>());
+    return TextBlockMatcherPointer(std::make_unique<ExactTextMatcher>());
 }
 
 TextBlockMatcherPointer NoTextMatch::createMatcher() const
 {
-    return TextBlockMatcherPointer(compat::make_unique<NoTextMatcher>());
+    return TextBlockMatcherPointer(std::make_unique<NoTextMatcher>());
 }
 
 void FilteringExactTextMatch::addRegexToSkip(const std::string &lineToSkip)
@@ -149,7 +150,7 @@ void FilteringExactTextMatch::addRegexToSkip(const std::string &lineToSkip)
 
 TextBlockMatcherPointer FilteringExactTextMatch::createMatcher() const
 {
-    return TextBlockMatcherPointer(compat::make_unique<FilteringExactTextMatcher>(linesToSkip_));
+    return TextBlockMatcherPointer(std::make_unique<FilteringExactTextMatcher>(linesToSkip_));
 }
 
 } // namespace test