Thread overview
[Issue 20166] among should have an overload for fixed-length arrays
Dec 17, 2022
Iain Buclaw
Mar 11, 2023
Nick Treleaven
Nov 06, 2023
Nick Treleaven
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=20166

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4

--
March 11, 2023
https://issues.dlang.org/show_bug.cgi?id=20166

Nick Treleaven <nick@geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nick@geany.org

--- Comment #1 from Nick Treleaven <nick@geany.org> ---
Presumably you mean a dynamic array. The docs for among say see also canFind. That does what you want:

import std.algorithm.searching;
enum brackets = ['(', '[', '{', '}', ']', ')'];

static assert(brackets.canFind('('));

--
November 06, 2023
https://issues.dlang.org/show_bug.cgi?id=20166

Nick Treleaven <nick@geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #2 from Nick Treleaven <nick@geany.org> ---
Marking as WONTFIX because `among` says use `canFind` to search a range.

--