mirror of
https://github.com/dlang/phobos.git
synced 2025-04-28 06:00:35 +03:00
The standard library of the D programming language
algorithmsallocatorconcurrencycontainersddlangfunctionalhacktoberfestmathmetaparallelismphobosrangesregexstandard-librarystdiotraitstype-conversionunicode
![]() 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. |
||
---|---|---|
.circleci | ||
.github/workflows | ||
changelog | ||
etc/c | ||
phobos/sys | ||
std | ||
test | ||
tools | ||
.codecov.yml | ||
.dscanner.ini | ||
.editorconfig | ||
.gitignore | ||
CODEOWNERS | ||
CONTRIBUTING.md | ||
dub.sdl | ||
index.dd | ||
LICENSE_1_0.txt | ||
Makefile | ||
posix.mak | ||
project.ddoc | ||
README.md | ||
unittest.d |
Phobos Standard Library
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.