diff --git a/src/TiledArray/dense_shape.h b/src/TiledArray/dense_shape.h index 7747fc9716..730f649663 100644 --- a/src/TiledArray/dense_shape.h +++ b/src/TiledArray/dense_shape.h @@ -89,6 +89,17 @@ class DenseShape { return false; } + /// Check that a tile is zero + + /// \tparam Integer an integer type + /// \param i the index + /// \return false + template + std::enable_if_t, bool> is_zero( + const std::initializer_list& i) const { + return false; + } + /// Check density /// \return true diff --git a/src/TiledArray/sparse_shape.h b/src/TiledArray/sparse_shape.h index a7df1c520c..100483eeed 100644 --- a/src/TiledArray/sparse_shape.h +++ b/src/TiledArray/sparse_shape.h @@ -509,6 +509,17 @@ class SparseShape { return tile_norms_[i] < my_threshold_; } + /// Check that a tile is zero + + /// \tparam Integer an integer type + /// \param i the index + /// \return true if tile at position \p i is zero + template + std::enable_if_t, bool> is_zero( + const std::initializer_list& i) const { + return this->is_zero>(i); + } + /// Check density /// \return true