move ctor for strict_not_null should be removed
Author: beinhaerterCreated May 26, 2026Updated Jun 2, 2026
LabelsType: BugStatus: Review NeededStatus: Blocked
In commit 9ff6e19ea9e2ecf48488c0865be85bb1ca183279 (issue #743) in 2018 strict_not_null was introduced. The interface was almost identical to the one of not_null, but the constructor is explicit.
Later in commit 6b23937bafca79ddd9b544e337aaba36a06ce339 in 2020 the move ctor for not_null was removed, but the move constructor for strict_not_null was not removed.
In my opinion the move constructor for strict_not_null should be removed as it was done with the move constructor for not_null. This aligns the interfaces of both classes to be the same. And it removes code that looks like it moves but instead copies, which is at least surprising.
Source: microsoft/GSL