D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 18735 - all versions of find and canfind should identify usage of predicate
Summary: all versions of find and canfind should identify usage of predicate
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P1 enhancement
Assignee: No Owner
URL:
Keywords: bootcamp, ddoc, pull
Depends on:
Blocks:
 
Reported: 2018-04-06 01:35 UTC by Steven Schveighoffer
Modified: 2022-07-24 02:55 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Steven Schveighoffer 2018-04-06 01:35:57 UTC
In the first overload of find, it says:

Elements of haystack are compared with needle by using predicate pred with pred(haystack.front, needle)

This same description should be repeated in all flavors. It can be important when giving a custom predicate where the two parameters are not the same type.
Comment 1 Dlang Bot 2022-07-23 13:48:21 UTC
@iuliadmtru created dlang/phobos pull request #8516 "Fix issue 18735 all versions of find and canfind should identify usag…" fixing this issue:

- Fix issue 18735 all versions of find and canfind should identify usage of predicate

https://github.com/dlang/phobos/pull/8516
Comment 2 Dlang Bot 2022-07-24 02:55:51 UTC
dlang/phobos pull request #8516 "Fix issue 18735 all versions of find and canfind should identify usag…" was merged into master:

- a61aee0f89b740538508da225b39fb884c0bca01 by Iulia Dumitru:
  Fix issue 18735 all versions of find and canfind should identify usage of predicate

https://github.com/dlang/phobos/pull/8516