We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 116b5ec commit b596dcdCopy full SHA for b596dcd
c++/mpi/datatypes.hpp
@@ -96,15 +96,10 @@ namespace mpi {
96
/**
97
* @brief Type trait to check if a type `T` has a corresponding MPI datatype, i.e. if mpi::mpi_type has been
98
* specialized.
99
- * @tparam `T` Type to be checked.
100
- */
101
- template <typename T, typename = void> constexpr bool has_mpi_type = false;
102
-
103
- /**
104
- * @brief Specialization of mpi::has_mpi_type for types which have a corresponding MPI datatype.
+ *
105
* @tparam T Type to be checked.
106
*/
107
- template <typename T> constexpr bool has_mpi_type<T, std::void_t<decltype(mpi_type<T>::get())>> = true;
+ template <typename T> constexpr bool has_mpi_type = requires { mpi_type<T>::get(); };
108
109
namespace detail {
110
0 commit comments