2
0
mirror of https://github.com/boostorg/mpi.git synced 2026-02-24 16:12:16 +00:00

specialization of is_mpi_datatype for std::array

This commit is contained in:
Florian Weik
2016-09-20 16:37:46 -06:00
parent e33c16da78
commit 1c082e1ff8

View File

@@ -30,6 +30,10 @@
#include <boost/serialization/item_version_type.hpp>
#include <utility> // for std::pair
#if defined(__cplusplus) && (201103L <= __cplusplus)
#include <array>
#endif
namespace boost { namespace mpi {
/**
@@ -265,6 +269,15 @@ struct is_mpi_datatype<std::pair<T,U> >
{
};
/// specialization of is_mpi_datatype for arrays
#if defined(__cplusplus) && (201103L <= __cplusplus)
template<class T, std::size_t N>
struct is_mpi_datatype<std::array<T, N> >
: public is_mpi_datatype<T>
{
};
#endif
// Define wchar_t specialization of is_mpi_datatype, if possible.
#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) && \
(defined(MPI_WCHAR) || (defined(MPI_VERSION) && MPI_VERSION >= 2))