Skip to content

Commit 213056c

Browse files
authored
Fix move constructors in Tensor class (#261)
Add nissing `noexcept`
1 parent 2f9b4a2 commit 213056c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

include/layers/Tensor.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ class Tensor {
8686
values_ = a;
8787
}
8888

89-
Tensor(const Tensor& t) = default;
90-
Tensor(Tensor&& t) = default;
91-
Tensor& operator=(Tensor&& t) = default;
92-
Tensor& operator=(const Tensor& t) = default;
89+
Tensor(const Tensor& t) noexcept = default;
90+
Tensor(Tensor&& t) noexcept = default;
91+
Tensor& operator=(const Tensor& t) noexcept = default;
92+
Tensor& operator=(Tensor&& t) noexcept = default;
9393

9494
[[nodiscard]] Shape get_shape() const { return shape_; }
9595
[[nodiscard]] Type get_type() const noexcept { return type_; }

0 commit comments

Comments
 (0)