The standard library of the D programming language
Find a file
Jonathan M Davis 23e5d21d38
Add isEqual and EnumMembers to phobos.sys.traits. (#8970)
EnumMembers is obviously needed and does the same thing as its
std.traits counterpart.

isEqual is new, and it really shouldn't be used in many circumstances,
but it's needed in conjunction with Unique to be able to do what
NoDuplicates from std.meta does when given an AliasSeq of enum members.
So, if you need the list of enum members to have no duplicate values
(e.g. when creating a final switch), then you would now do
Unique!(isEqual, EnumMembers!E) instead of NoDuplicates!(EnumMembers!E).

As part of isEqual's documentation, I added a list of examples which
highlight the difference between operating on the list of enum members
as an AliasSeq and operating on them as a dynamic array, since that's
not something that's at all obvious - and it shows why you might need to
use isEqual with Unique to weed out duplicate values instead of doing
something like [EnumMembers!E].sort().unique() to weed them out. For
documentation purposes, I just assumed that uniq would be renamed to
unique, but the documentation can be fixed later if need be once we have
the actual functions in Phobos v3.
2024-04-05 13:28:03 -07:00
.circleci Merge Makefiles 2023-12-16 22:22:20 +01:00
.github/workflows GHA: Sync main.yml with DMD repo's 2024-03-02 16:18:50 +01:00
changelog purge changelog 2024-04-01 20:12:41 +00:00
etc/c Sync etc.c.zlib D bindings with updated zlib.h 2024-02-26 13:47:01 +08:00
phobos/sys Add isEqual and EnumMembers to phobos.sys.traits. (#8970) 2024-04-05 13:28:03 -07:00
std Fix bugzilla 24478 - std.csv array out of bounds when row size exceeds header 2024-04-02 21:28:26 +02:00
test Add sumtype to Phobos (#7702) 2021-03-05 12:41:34 +01:00
tools Remove explicit hex string casts 2024-03-19 23:48:15 +01:00
.codecov.yml yaml: make files comply with YAML specification 2021-08-30 14:54:57 +00:00
.dscanner.ini Use static array for table 2024-01-08 00:02:21 +01:00
.editorconfig Fix line endings in .editorconfig 2018-09-16 12:19:04 -07:00
.gitignore Phobos 3 Setup (#8925) 2024-02-28 02:14:35 -08:00
CODEOWNERS Upstream Unicode table generator and update tables to v15 2022-12-12 02:10:14 +13:00
CONTRIBUTING.md Fix IRC link. (Freenode is dead, #d has been on libera for years.) 2024-01-17 15:41:09 +01:00
dub.sdl Rename lib to phobos. (#8953) 2024-03-20 15:12:06 -07:00
index.dd Remove deprecated std.xml module 2022-08-28 11:30:15 +02:00
LICENSE_1_0.txt Changed Phobos to use the Boost license. Currently, all public domain modules and all licensed modules by Walter, Andrei, Bartosz, and Don have been changed to use this license (excepting std.c, for the moment). Ideally, all Phobos modules will eventually be distributed under this license, which means obtaining permission from a few more authors, deleting, or rewriting some modules. 2009-09-16 18:19:51 +00:00
Makefile Fix bugzilla issue 24389 - Make Phobos compile on FreeBSD 14 again. 2024-02-24 06:48:09 +08:00
posix.mak Restore posix.mak, forwarding to generic Makefile 2023-12-16 22:22:20 +01:00
project.ddoc add PROJECT=phobos ddoc macro 2014-01-10 19:16:53 +01:00
README.md Remove no longer available issue stats and add a Buildkite badge 2019-01-04 18:02:28 +01:00
unittest.d Remove deprecated symbols from std.digest.digest 2020-04-09 11:35:23 +02:00

D Logo Phobos Standard Library

GitHub tag Bugzilla Issues CircleCi Buildkite Code coverage license

Phobos is the standard library that comes with the D Programming Language Compiler.

Download

Phobos is packaged together with the compiler. You should download the whole precompiled package.

To build everything yourself, there is a description in the wiki.

Phobos is distributed under Boost Software Licence. See the licence file.

I Want to Contribute

Great! See the CONTRIBUTING.md file.