Skip to content

Commit 43c5dcf

Browse files
committed
DenseShape now returns constexpr in some functions.
1 parent e3d73d7 commit 43c5dcf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/TiledArray/dense_shape.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,25 +62,25 @@ namespace TiledArray {
6262
/// Validate shape range
6363

6464
/// \return \c true when range matches the range of this shape
65-
static bool validate(const Range&) { return true; }
65+
static constexpr bool validate(const Range&) { return true; }
6666

6767
/// Check that a tile is zero
6868

6969
/// \tparam Index The type of the index
7070
/// \return false
7171
template <typename Index>
72-
static bool is_zero(const Index&) { return false; }
72+
static constexpr bool is_zero(const Index&) { return false; }
7373

7474
/// Check density
7575

7676
/// \return true
77-
static bool is_dense() { return true; }
77+
static constexpr bool is_dense() { return true; }
7878

7979

8080
/// Check if the shape is empty (uninitialized)
8181

8282
/// \return Always \c false
83-
static bool empty() { return false; }
83+
static constexpr bool empty() { return false; }
8484

8585
static DenseShape perm(const Permutation&) { return DenseShape(); }
8686

0 commit comments

Comments
 (0)