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
2 changes: 1 addition & 1 deletion src/TiledArray/tensor/tensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ class Tensor {

/// \return \c true if this tensor was default constructed (contains no
/// data), otherwise \c false.
bool empty() const { return !this->data_; }
bool empty() const { return this->data_.use_count() == 0; }

/// MADNESS serialization function

Expand Down
4 changes: 2 additions & 2 deletions src/TiledArray/tensor/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@ inline typename T::size_type inner_size(const T& tensor) {
/// This function is used as the termination step for the recursive empty()
/// function. It also handles the case where there are no tensors in the
/// list.
/// \return \c true
inline constexpr bool empty() { return true; }
/// \return \c false
inline constexpr bool empty() { return false; }

/// Test for empty tensors

Expand Down