Skip to content

Commit a48614c

Browse files
authored
Merge pull request #419 from pdziekan/arrinfo_move_ctor
move ctor for arrinfo
2 parents e01f9c9 + f9e5b60 commit a48614c

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)