summaryrefslogtreecommitdiff
path: root/boost/mpi/detail/mpi_datatype_primitive.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/mpi/detail/mpi_datatype_primitive.hpp')
-rw-r--r--boost/mpi/detail/mpi_datatype_primitive.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/boost/mpi/detail/mpi_datatype_primitive.hpp b/boost/mpi/detail/mpi_datatype_primitive.hpp
index b2263fac4c..6a82624e43 100644
--- a/boost/mpi/detail/mpi_datatype_primitive.hpp
+++ b/boost/mpi/detail/mpi_datatype_primitive.hpp
@@ -21,6 +21,7 @@ namespace std{
#include <boost/mpi/datatype_fwd.hpp>
#include <boost/mpi/exception.hpp>
+#include <boost/mpi/detail/antiques.hpp>
#include <boost/throw_exception.hpp>
#include <boost/assert.hpp>
#include <boost/mpl/placeholders.hpp>
@@ -129,6 +130,12 @@ private:
lengths.push_back(l);
}
+ template <class T>
+ static T* get_data(std::vector<T>& v)
+ {
+ return v.empty() ? 0 : &(v[0]);
+ }
+
std::vector<MPI_Aint> addresses;
std::vector<MPI_Datatype> types;
std::vector<int> lengths;