Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion include/ginkgo/core/base/std_extensions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,24 @@ namespace gko {
* @ingroup xstd
*/
namespace xstd {
namespace detail {


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add some documentation on what the intended use is.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no use for users for this. On the developer side it's used directly below, so I don't think it requires documentation.

template <typename... Ts>
struct make_void {
using type = void;
};


} // namespace detail


/**
* Use the custom implementation, since the std::void_t used in
* is_matrix_type_builder seems to trigger a compiler bug in GCC 7.5.
*/
template <typename... Ts>
using void_t = std::void_t<Ts...>;
using void_t = typename detail::make_void<Ts...>::type;


GKO_DEPRECATED("use std::uncaught_exceptions")
Expand Down
3 changes: 2 additions & 1 deletion include/ginkgo/core/distributed/matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include <ginkgo/core/base/dense_cache.hpp>
#include <ginkgo/core/base/mpi.hpp>
#include <ginkgo/core/base/std_extensions.hpp>
#include <ginkgo/core/distributed/base.hpp>
#include <ginkgo/core/distributed/index_map.hpp>
#include <ginkgo/core/distributed/lin_op.hpp>
Expand Down Expand Up @@ -55,7 +56,7 @@ struct is_matrix_type_builder : std::false_type {};
template <typename Builder, typename ValueType, typename IndexType>
struct is_matrix_type_builder<
Builder, ValueType, IndexType,
std::void_t<
xstd::void_t<
decltype(std::declval<Builder>().template create<ValueType, IndexType>(
std::declval<std::shared_ptr<const Executor>>()))>>
: std::true_type {};
Expand Down
Loading