1 // Copyright Alain Miniussi 2014.
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
6 // Authors: Alain Miniussi
8 #ifndef BOOST_MPI_ANTIQUES_HPP
9 #define BOOST_MPI_ANTIQUES_HPP
13 // Support for some obsolette compilers
15 namespace boost { namespace mpi {
17 // Some old gnu compiler have no support for vector<>::data
18 // Use this in the mean time, the cumbersome syntax should
19 // serve as an incentive to get rid of this when those compilers
21 template <typename T, typename A>
22 T* c_data(std::vector<T,A>& v) { return &(v[0]); }
24 template <typename T, typename A>
25 T const* c_data(std::vector<T,A> const& v) { return &(v[0]); }