If you would be willing to adopt these changes I will also adjust neither::Maybe (and neither::lift if needed). Please give feedback if this matches your design concept. Unfortunately I did not find a contribution policy in the repository. :(
Contents
This relaxes the restrictions on using the library with types that are not copy-constructible. It leverages the SFINAE idiom to provide proper implementation for types like std::unique_ptrs. This should not change behavior of existing code, as the template candidates only apply to cases, where previously compilation would not be possible.
Changes
Extend neither::Either with template candidates for non-copyable types.
Provide additional tests for the Either class regarding use of non-copyable types.
!READ DESCRIPTION FIRST! Not up to merge yet.
If you would be willing to adopt these changes I will also adjust
neither::Maybe
(andneither::lift
if needed). Please give feedback if this matches your design concept. Unfortunately I did not find a contribution policy in the repository. :(Contents This relaxes the restrictions on using the library with types that are not copy-constructible. It leverages the SFINAE idiom to provide proper implementation for types like
std::unique_ptr
s. This should not change behavior of existing code, as the template candidates only apply to cases, where previously compilation would not be possible.Changes