Fix MSVC error in toppush.cpp
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / toppush.cpp
index 087695001b58e036ee755d07fde2825b2f7e4116..ebce88d3839e029fbb1ec5d80de1c1465a17ed95 100644 (file)
@@ -1970,7 +1970,7 @@ void push_bond(Directive                         d,
     }
 
     // These are the atom indices for this interaction
-    gmx::ArrayRef<int> atomIndices(aa.begin(), aa.begin() + nral);
+    auto atomIndices = gmx::ArrayRef<const int>(aa).subArray(0, nral);
 
     // Look up the A-state atom types for this interaction
     std::vector<int> atomTypes(atomIndices.size());