Berthold Stoeger
691d9e86de
cleanup: implement index_of() and index_of_if() generics
...
Search the index of an item in a container. Compare by
equality or a lambda. The lack of these have annoyed me for a
long time. Return the index of the first found element or
-1 if no element found.
Currently, only supports random-access operators. Might be
trivially changed for forward iterators.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2022-10-31 19:35:15 +01:00
..
2019-06-19 13:11:10 -07:00
2020-04-07 00:13:35 +02:00
2022-04-18 07:24:38 +02:00
2022-02-15 09:35:43 -08:00
2022-02-15 09:35:43 -08:00
2022-09-03 13:38:34 -07:00
2022-03-12 11:24:50 -08:00
2020-10-25 13:59:52 -07:00
2020-05-07 08:46:15 -07:00
2020-12-03 13:26:55 -08:00
2020-12-03 13:26:55 -08:00
2020-11-07 11:37:51 -08:00
2020-11-07 11:37:51 -08:00
2022-10-31 19:35:15 +01:00
2020-05-06 13:58:09 -07:00
2022-10-30 21:16:00 +01:00
2022-03-12 18:32:22 +01:00
2019-05-06 10:48:44 +02:00
2019-05-06 10:48:44 +02:00
2021-10-11 20:20:20 +03:00
2020-02-08 10:29:36 -08:00
2022-10-31 19:35:15 +01:00
2022-02-15 09:37:16 -08:00
2020-09-29 16:13:03 -07:00
2020-09-29 16:13:03 -07:00
2022-03-13 15:07:33 -07:00
2020-05-07 08:43:27 -07:00
2020-09-29 16:13:03 -07:00
2020-09-29 16:13:03 -07:00
2022-08-21 18:53:35 -07:00
2020-02-04 02:16:46 +01:00
2021-10-27 12:36:49 -07:00
2018-09-29 15:23:25 -07:00
2022-02-15 09:35:43 -08:00
2022-02-15 09:35:43 -08:00
2021-01-10 15:57:39 -08:00
2019-07-18 05:42:55 -07:00
2020-12-13 11:49:59 -08:00
2020-12-13 11:49:59 -08:00
2018-09-01 07:48:43 -07:00
2018-09-29 15:23:25 -07:00
2020-09-12 10:36:36 -07:00
2020-05-15 14:19:21 -07:00
2020-05-07 08:43:27 -07:00
2019-04-29 13:06:39 -07:00
2022-09-03 13:49:02 -07:00
2018-12-17 12:18:26 +01:00