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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user