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
![]() Rebindable2 did not handle types with opAssign correctly, which affected both minElement and maxElement. Namely, Rebindable2 assigned to memory which was not properly initialized when the correct solution in such a situation is to use copyEmplace. Assignment works when assignment is just a memcpy, but in the general case, opAssign needs to have a properly initialized object in order to work correctly. copyEmplace instead copies the object and then places the copy into the unitialized memory, so it avoids assigning to uninitialized memory. This commit also adds additional tests for types with destructors (which do get opAssign automatically) and types with postblit constructors or copy constructors to try to ensure that the code is doing the correct thing in those cases with regards to copying, assignment, and destruction. https://issues.dlang.org/show_bug.cgi?id=24829 was found in the process, and this does not fix that. Namely, types which cannot be assigned to and which also have a postblit constructor or copy constructor do not get copied correctly. So, among the tests added here are commented out tests for that case, since they're an altered version of some of the enabled tests. However, fixing that issue would be involved enough that I'm not attempting to fix it at this time. |
||
---|---|---|
.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.