LoopPerfect / neither

Either and Maybe monads for better error-handling in C++ ↔️
MIT License
249 stars 18 forks source link

Fix copy constructors #6

Closed dvdfreitag closed 7 years ago

dvdfreitag commented 7 years ago

The copy constructors for neither::Either and neither::Maybe have been updated to use proper copy-construction using a placement new.

Note: These values won't need to be deleted manually, but they will probably need to be manually destroyed, which the library already does.

nikhedonia commented 7 years ago

Thx for your PR!

CodesInChaos commented 7 years ago

For reference, the stackoverflow discussion leading to this change: std::future<neither::Either<int, std::string>> segmentation fault