Skip to content

Assignment-operator from temporaries overwrites ID #168

@anyzelman

Description

@anyzelman

Consider the following, in which the final assertion is assumed to hold:

grb::Vector< T > a( n ), b( n );
size_t a_id = grb::getID( a );
assert( grb::getID( b ) != a_id );
// ...
a = b;
assert( grb::getID( a ) == a_id );

Two items:

  1. this is currently guaranteed in all backends for copy-assignment, but is never tested;
  2. this seems currently not guaranteed for move-assignment.

This issue is to introduce such a test, and confirm whether the latter issue indeed exists

Metadata

Metadata

Labels

bugSomething isn't workingenhancementNew feature or requestgood first issueGood for newcomers

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions