mirror of
https://github.com/dlang/phobos.git
synced 2025-05-06 02:45:12 +03:00
TypeTuple -> MetaList inside Phobos
This commit is contained in:
parent
73f773838d
commit
82f54a38d3
42 changed files with 615 additions and 613 deletions
|
@ -132,7 +132,7 @@ efficient search, but one that only supports matching on equality:
|
|||
|
||||
@safe unittest
|
||||
{
|
||||
import std.meta : TypeTuple;
|
||||
import std.meta : MetaList;
|
||||
|
||||
if (auto pos = 3.among(1, 2, 3))
|
||||
assert(pos == 3);
|
||||
|
@ -144,7 +144,7 @@ efficient search, but one that only supports matching on equality:
|
|||
assert(position);
|
||||
assert(position == 1);
|
||||
|
||||
alias values = TypeTuple!("foo", "bar", "baz");
|
||||
alias values = MetaList!("foo", "bar", "baz");
|
||||
auto arr = [values];
|
||||
assert(arr[0 .. "foo".among(values)] == ["foo"]);
|
||||
assert(arr[0 .. "bar".among(values)] == ["foo", "bar"]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue