Skip to content

Commit 47c0fbb

Browse files
committed
Prettier error message on attempt to store unsupported type in ItemView
1 parent aa15fc0 commit 47c0fbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clickhouse/columns/itemview.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ struct ItemView {
2929
} else if constexpr (std::is_fundamental_v<T> || std::is_same_v<Int128, std::decay_t<T>>) {
3030
return std::string_view{reinterpret_cast<const char*>(&t), sizeof(T)};
3131
} else {
32-
// will cause a compile-time error
32+
static_assert(!std::is_same_v<T, T>, "Unknown type, which can't be stored in ItemView");
3333
return;
3434
}
3535
}

0 commit comments

Comments
 (0)