Skip to content

Commit

Permalink
Remove const for copy construct
Browse files Browse the repository at this point in the history
  • Loading branch information
etcimon committed Feb 26, 2023
1 parent 0e6294b commit 9096bd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/memutils/vector.d
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ struct Vector(T, ALLOC = ThreadMem)
@property Vector!(T, ALLOC) clone() const
{
static if (__traits(compiles, { T a; T b; a = b; } ())) {
auto ret = Vector!(T, ALLOC)(cast(T[])_data._payload);
auto ret = Vector!(T, ALLOC)(cast(T[])(cast()this)._data._payload);
return ret.move;
}
else static if (__traits(hasMember, T, "move")) // Element is @disable this(this) but has move()
Expand Down

0 comments on commit 9096bd7

Please sign in to comment.