martinmoene / expected-dark

Expected objects for C++11 and later (and later perhaps C++98 )
MIT License
52 stars 4 forks source link

Why are destructor calls is swap() commented out? #17

Closed sorin-manole closed 6 years ago

sorin-manole commented 6 years ago

https://github.com/martinmoene/expected-lite/blob/master/include/nonstd/expected.hpp#L637

martinmoene commented 6 years ago

Good question; I can't remember why I put it that way.
It looks like they just must be activated. Will look at it later.

sorin-manole commented 6 years ago

If it helps, it looks like Alexandrescu makes the same “mistake” in his slides.

On Fri, 24 Nov 2017 at 15:58, Martin Moene notifications@github.com wrote:

Good question; I can't remember why I put it that way. It looks like they just must be activated. Will look at it later.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/martinmoene/expected-lite/issues/17#issuecomment-346834386, or mute the thread https://github.com/notifications/unsubscribe-auth/ABjGsY5Y0cJuF2t5_MBn3W7oZ76zF3hMks5s5stugaJpZM4Qpzpr .

martinmoene commented 6 years ago

Fixed in 1e37bb075e57c6d3b0cfcccfd400b8999476b175