]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/mpi/detail/antiques.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / mpi / detail / antiques.hpp
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)
5
6 // Authors: Alain Miniussi
7
8 #ifndef BOOST_MPI_ANTIQUES_HPP
9 #define BOOST_MPI_ANTIQUES_HPP
10
11 #include <vector>
12
13 // Support for some obsolette compilers
14
15 namespace boost { namespace mpi {
16 namespace detail {
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
20 // are dropped.
21 template <typename T, typename A>
22 T* c_data(std::vector<T,A>& v) { return &(v[0]); }
23
24 template <typename T, typename A>
25 T const* c_data(std::vector<T,A> const& v) { return &(v[0]); }
26
27 } } }
28
29 #endif