cosmopolitan/test
Steven Dee (Jōshin) d7b1919b29
ctl::unique_ptr improvements and cleanup (#1221)
Explicitly value-initializes the deleter, even though I have not found a
way to get the deleter to act like it’s been default-initialized in unit
tests so far.

Uses auto in reset. The static cast is apparently not needed (unless I’m
missing some case I didn’t think of.)

Implements the general move constructor - turns out that the reason this
didn’t work before was that default_delete<U> was not move constructible
from default_delete<T>.

Drop inline specifiers from functions defined entirely inside the struct
definition since they are implicitly inline.

* Cleans up reset to match spec

Remove the variants from the T[] specialization. Also follow the spec on
the order of operations in reset, which may matter if we are deleting an
object that has a reference to the unique_ptr that is being reset. (?)

* Tests Base/Derived reset.

* Adds some constexpr declarations.

* Adds default_delete specialization for T[].

* Makes parameters const.
2024-06-20 18:44:31 -04:00
..
ctl ctl::unique_ptr improvements and cleanup (#1221) 2024-06-20 18:44:31 -04:00
dsp Run clang-format (#1197) 2024-06-01 16:30:43 -04:00
libc Rerun clang-format on the repo (#1217) 2024-06-15 16:34:48 -04:00
libcxx vim C++ filetype is still spelled "cpp" 2024-06-05 16:34:47 -07:00
math Make malloc() go 200x faster 2024-06-05 02:02:14 -07:00
net Refactor and improve CTL and other code 2024-06-04 05:45:48 -07:00
posix Add some noexcept annotations 2024-06-01 03:19:53 -07:00
tool Run clang-format (#1197) 2024-06-01 16:30:43 -04:00
BUILD.mk Introduce Cosmopolitan Templates Library (CTL) 2024-06-03 09:21:59 -07:00