Skip to content

In operator from righthand side for SortedRange.#5697

Merged
dlang-bot merged 1 commit intodlang:masterfrom
dukc:setIn
Aug 19, 2017
Merged

In operator from righthand side for SortedRange.#5697
dlang-bot merged 1 commit intodlang:masterfrom
dukc:setIn

Conversation

@dukc
Copy link
Contributor

@dukc dukc commented Aug 17, 2017

For consistency with #5629

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @dukc! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.

Some tips to help speed things up:

  • smaller, focused PRs are easier to review than big ones

  • try not to mix up refactoring or style changes with bug fixes or feature enhancements

  • provide helpful commit messages explaining the rationale behind each change

Bear in mind that large or tricky changes may require multiple rounds of review and revision.

Please see CONTRIBUTING.md for more information.

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

sgi.com/tech/stl/binary_search.html, binary_search).
*/


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extraneous whitespace

}

/**
Performs $(D contains) with reverse order of arguments.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just stating implementation details. Also needs a Params: and Returns: section.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I object to that latter part, because other member functions lack them too.

@dlang-bot dlang-bot merged commit 3d009bf into dlang:master Aug 19, 2017
@nordlow
Copy link
Contributor

nordlow commented Aug 20, 2017

I recall somebody saying that D's in operator is reserved for O(1)-algorithms. SortedRange.contains is O(log(n)).

@PetarKirov
Copy link
Member

@nordlow according to http://dlang.org/phobos/std_container (see at the end) in taking O(log(n)) is absolutely acceptable and expected.

@dukc dukc deleted the setIn branch August 21, 2017 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants