From 29b5dba22c87dd12d4265506e52593b9b026c997 Mon Sep 17 00:00:00 2001 From: Bimal Gaudel Date: Wed, 22 Nov 2023 22:04:59 -0500 Subject: [PATCH] Add equality comparison for SparseShape. --- src/TiledArray/sparse_shape.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/TiledArray/sparse_shape.h b/src/TiledArray/sparse_shape.h index bf51487922..271857a72c 100644 --- a/src/TiledArray/sparse_shape.h +++ b/src/TiledArray/sparse_shape.h @@ -1742,6 +1742,17 @@ bool is_replicated(World& world, const SparseShape& shape) { return result; } +template +constexpr inline bool operator==(const SparseShape& a, + const SparseShape& b) { + return true; +} +template +constexpr inline bool operator!=(const SparseShape& a, + const SparseShape& b) { + return !(a == b); +} + #ifndef TILEDARRAY_HEADER_ONLY extern template class SparseShape;