Open
Conversation
RIP CodeSponsor 💀
Avoiding the implicit conversion from uint to bool and more clearly expressing the code intentions. Also remove the unnecessary initialization to false, because all constructor overloads already do it.
Added neither::maybe::size that is compatible with std::vector::size constexpr maybe::size_type maybe::size() const noexcept See: http://www.cplusplus.com/reference/vector/vector/size
Added neither::maybe::empty that is compatible with std::vector::empty constexpr bool maybe::empty() const noexcept See: http://www.cplusplus.com/reference/vector/vector/empty
Feature: Add Maybe#size() and Maybe#empty() compatible with STL containers
Feature: Add Maybe#size() and Maybe#empty() compatible with STL containers
That is an instance of type Maybe<void>, used to represent the absence of a value. Additionally, added support for operator== and operator!= for Maybe<void>, hence none, with the semantics: Maybe<void> x; Maybe<void> y; x == y => true x != y => false Given that it doesn't hold a value. Therefore, none will be always equal to itself.
* Moves gtest to submodule
Maybe: Add static const object none
chore: make equals simpler
Replace uniform initialization with copy construction
Compilation of maybe.hpp with g++ 7.3 results in the following warning being
emmitted (here with -Werror enabled):
neither/maybe.hpp:112:8: error: ‘bool neither::{anonymous}::equal(const neither::Maybe<void>&, const neither::Maybe<void>&)’ defined but not used [-Werror=unused-function]
bool equal(Maybe<void> const&, Maybe<void> const&) {
Silence 'defined but not used' warning
When `rightMap` is applied to `Either` containing non-copyable type instance, such as `std::unique_ptr<T>`, then the compiler will hard fail trying to deduce types (`rightMap &&` should be picked) because there is `(R2)` cast applied to `std::move` argument, thus forcing copy construction. `leftMap` works because it does not have such cast.
Remove copy construction from argument to std::move in rightMap &&
* Adds Travis build matrix
buckaroo-redux
Fix typo in README
Support for non-copyable objects in lvalues
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.