Skip to content

Commit

Permalink
Delete copy constructor and assignment operator for ParticleTile (AMR…
Browse files Browse the repository at this point in the history
…eX-Codes#3943)

This prevents common programming errors involving accidently copying
particle tiles.

The proposed changes:
- [ ] fix a bug or incorrect behavior in AMReX
- [ ] add new capabilities to AMReX
- [ ] changes answers in the test suite to more than roundoff level
- [x] are likely to significantly affect the results of downstream AMReX
users
- [ ] include documentation in the code and/or rst files, if appropriate
  • Loading branch information
atmyers authored May 17, 2024
1 parent 8eff86d commit 2113e4a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Src/Particle/AMReX_ParticleTile.H
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,16 @@ struct ParticleTile

ParticleTile () = default;

#ifndef _WIN32 // workaround windows compiler bug
~ParticleTile () = default;

ParticleTile (ParticleTile const&) = delete;
ParticleTile (ParticleTile &&) noexcept = default;

ParticleTile& operator= (ParticleTile const&) = delete;
ParticleTile& operator= (ParticleTile &&) noexcept = default;
#endif

void define (int a_num_runtime_real, int a_num_runtime_int)
{
m_defined = true;
Expand Down

0 comments on commit 2113e4a

Please sign in to comment.