Skip to content

Commit f9e5b60

Browse files
committed
move ctor for arrinfo
1 parent e01f9c9 commit f9e5b60

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

include/libcloudph++/lgrngn/arrinfo.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ namespace libcloudphxx
3939
data(ai.data),
4040
strides(!strvec.empty() ? &strvec[0] : ai.strides)
4141
{}
42+
43+
// non-default move ctor handling both the original and alternative usage
44+
arrinfo_t(arrinfo_t &&ai) :
45+
strvec(std::move(ai.strvec)),
46+
data(ai.data),
47+
strides(!strvec.empty() ? &strvec[0] : ai.strides)
48+
{}
4249
};
4350
};
4451
};

0 commit comments

Comments
 (0)