microsoft / STL

MSVC's implementation of the C++ Standard Library.
Other
10.18k stars 1.5k forks source link

LWG-2839 Self-move-assignment of library types, again #1485

Open CaseyCarter opened 3 years ago

CaseyCarter commented 3 years ago

LWG-2839 "Self-move-assignment of library types, again" clarifies that move-assigning most Standard Library types to themselves leaves the object in a valid-but-unspecified state. While we are fairly fastidious about handling self-move and self-swap correctly when authoring new types, I'm not sure that our predecessors paid as much attention. We need to audit all of the move assignment operators in the STL to ensure that self-move leaves the class in a valid state except when the standard explicitly specifies otherwise.

Headers to Audit

StephanTLavavej commented 1 year ago

To make this more actionable, I've added a list of all of the C++23 headers, so we can audit them one-by-one. It may be convenient to use _EXPORT_STD to find the public classes defined by each header.

Because I'm a lazy kitty, I haven't yet bothered checking off the headers that obviously define no types (like <version>).