A. Jiang

Results 175 comments of A. Jiang

> What I'm talking aobut is the reverse case: I'm getting a pointer to a char/std::byte buffer that has been filled with bytes that contain a valid representation of a...

> On another, but related topic: Is my understanding correct that recent changes to the standard (don't remember the name unfortunately and whether it was c++20, c++23 or a DR)...

@N-Dekker I think `*reinterpret_cast< int32_t * >(&u)` is well-defined according to [[basic.lval]/(11.2)](https://eel.is/c++draft/basic.lval#11.2): > a type that is the signed or unsigned type corresponding to the dynamic type of the object,...

There's no rangified parallel algorithms in Ranges TS or even C++20/23... Should we refer to [P0836](https://wg21.link/p0836) for these proposed algorithms?

Is this patching anything?

> 通过 initializer_list 初始化的时候,为什么不把参数分为 `const std::initializer_list &ilist` 和 `std::initializer_list &&ilist` 两种拷贝构造参数呢? 这没有意义。 `initializer_list` 是一个引用性质的东西,它只是引用而非复制底层数组。对这种东西最好是传值。 C++ 标准库中还有类似的 `basic_string_view` 及 `span` 。

MSVC STL's hash containers are currently implemented in a bad manner - e.g. the are base on doubly linked lists while singly linked lists are preferred. Unfortunately, we can't achieve...

C++ 的初始化和赋值是不同的。 `copy_backward` 只会对已存在的对象赋值,但我们需要在未构造对象的位置进行初始化。

我不熟悉探测法。在使用探测法实现时是否还能正确支持 `begin`/`end` ,从而能将哈希表作为一个范围来遍历(`for (const auto& kv : table) { /* ... */}`)?

没有问题。通常来说很难只释放一段动态分配的内存的其中一部分, C/C++ 标准没有提供任何能保证这么做的工具。