You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #17413 from dlongnecke-cray/public-17401
Fix bugs in set composition operators when `parSafe=true` (#17413)
The composition operators for `set` declare a result that has a
`parSafe` value of `(lhs.parSafe || rhs.parSafe)`.
Prior to this PR, the declared return type of these operators omitted
the value of `parSafe`, which caused it to default to false. This
led to compiler errors when a composition operator was used on a set
with `parSafe=true`.
Omit a declared return type for the set composition operators. The
return type is now correctly inferred.
Add a test covering all composition operators (|, +, -, &, ^) as well
as their compound assignment variants (|=, +=, -=, &=, ^=). The test
is repeated to cover all combinations of `parSafe` values for the LHS
and RHS sets.
Define a cast operator for the `set` type. Currently it requires both
sets to have the same element type. Loosening this restriction (e.g.
for a cast from set of subclass to set of superclass) is possible.
The cast operator was added to keep the compiler from complaining
about assignment between sets with different `parSafe` values. It is
not documented.
Resolves#17401.
Reviewed by @vasslitvinov and @mppf. Thanks!
TESTING:
- [x] `ALL` on `linux64` when `COMM=none`
- [x] `ALL` on `linux64` when `COMM=gasnet`
- [x] Checked updated docs locally
Signed-off-by: David Longnecker <[email protected]>
0 commit comments