digitalmars.D.bugs - [Issue 19475] New: add a staticIndexOf overload taking a pred
- d-bugmail puremagic.com (19/19) Dec 11 2018 https://issues.dlang.org/show_bug.cgi?id=19475
https://issues.dlang.org/show_bug.cgi?id=19475 Issue ID: 19475 Summary: add a staticIndexOf overload taking a pred Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: phobos Assignee: nobody puremagic.com Reporter: b2.temp gmx.com Overloads of std.meta.staticIndexOf allow only to find an exact needle but in some case it more useful to get the index of something based on a predicate, for example to get the index of a compile time value that partially matches (e.g member value of a struct used as UDA). It even may be better to name them firstStaticIndexOf lastStaticIndexOf --
Dec 11 2018