Salome HOME
Attempt of Management of profiles in spliter
[tools/medcoupling.git] / src / MEDCoupling / MCAuto.hxx
index b680659fa521a152a962a8f2546bb16d5533fd2f..ff32e25a130849b8a06fd381ee4c3ad1eaab35d1 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2019  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -24,6 +24,8 @@
 #include "MEDCouplingRefCountObject.hxx"
 #include "InterpKernelException.hxx"
 
+#include <vector>
+
 namespace MEDCoupling
 {
   template<class T>
@@ -80,6 +82,16 @@ namespace MEDCoupling
     return ret;
   }
 
+  template<class T>
+  typename std::vector<const T *> ToConstVect(const typename std::vector< MCAuto<T> >& vec)
+  {
+    std::size_t sz(vec.size());
+    std::vector<const T *> ret(sz);
+    for(std::size_t i=0;i<sz;i++)
+      ret[i]=(const T *)vec[i];
+    return ret;
+  }
+  
   template<class T>
   class MCConstAuto
   {