Skip to content

Commit 535b12d

Browse files
committed
#276: reduce: require empty data or sentinel for NoneOp
1 parent d18eae3 commit 535b12d

File tree

1 file changed

+5
-0
lines changed
  • src/vt/collective/reduce/operators/functors

1 file changed

+5
-0
lines changed

src/vt/collective/reduce/operators/functors/none_op.h

+5
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ using NoneType = char;
5252

5353
template <typename T>
5454
struct None {
55+
static_assert(
56+
std::is_same_v<T, char> or std::is_same_v<T, std::tuple<>>,
57+
"Must be empty data"
58+
);
59+
5560
void operator()(T& v1, T const& v2) {}
5661
};
5762

0 commit comments

Comments
 (0)