acts-project / vecmem

Vectorised data model base and helper classes.
https://acts-project.github.io/vecmem/
Mozilla Public License 2.0
19 stars 13 forks source link

Make atomic reference constructor explicit #285

Closed stephenswat closed 2 months ago

stephenswat commented 2 months ago

Right now, the constructor device_atomic_ref(T&) is implicit, which does not match the definition provided in C++20. While this seems harmless, it can break code that relies on this implicit conversion if it switches to using std::atomic_ref, which vecmem may decide to do if C++20 is enabled. This commit makes the constructor explicit so it matches the definitions in the STL.