AMReX-Codes / amrex

AMReX: Software Framework for Block Structured AMR
https://amrex-codes.github.io/amrex
Other
503 stars 336 forks source link

Delete copy constructor and assignment operator for ParticleTile #3943

Closed atmyers closed 1 month ago

atmyers commented 1 month ago

This prevents common programming errors involving accidently copying particle tiles.

The proposed changes:

WeiqunZhang commented 1 month ago

The Windows CI failure looks like a compiler bug.

WeiqunZhang commented 1 month ago

More specifically it complains about std::pair<const Key, Value>(std::pair<const Key, Value&> cannot be done because Value is not copyable, where range based for loop is used to access std::map<Key, Value>. But the value_type of std::map should be std::pair<const Key, Value>. Why does that & in Value& come from?

We could put the new changes inside #ifndef _WIN32.

atmyers commented 1 month ago

Note - the WarpX test failure was a problem in WarpX that was uncovered by this change. It's already been fixed in development but is not part of the release yet.