MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/1vnp8dk/c26_stdindirect/p3rw2a8/?context=3
r/cpp • u/User_Deprecated • Aug 13 '26
157 comments sorted by
View all comments
Show parent comment
6
The conservative set for a moved from object is assign to and destroy. The standard library tries to do better than that. Postel's Law.
If you don't know what a T is, your code should expect no more. But if you know you have a std::whatsit, you can rely on more, with some care.
View all comments
Show parent comment
6
u/smdowney WG21, Text/Unicode SG, optional<T&> Aug 15 '26
The conservative set for a moved from object is assign to and destroy. The standard library tries to do better than that. Postel's Law.
If you don't know what a T is, your code should expect no more. But if you know you have a std::whatsit, you can rely on more, with some care.