英文: Is there a better way to convert between two Byte Buffers of two different classes? 问题 下面是代码部分的中...
std::string {} = “hi”;引发临时材料化吗?
英文: Does std::string {} = "hi"; induce temporary materialization? 问题 受 C++表达式std::string {...
NRVO. 关闭省略。C++11与C++17
英文: NRVO. Turning off elision. C++11 vs C++17 问题 我正在研究复制省略(copy elision)以及返回值优化(RVO/NRVO)。当我使用 g++ 编...
如何设计一个独立的C++17 std::views::join替代品?
英文: How can I design a standalone C++17 std::views::join alternative? 问题 为了一个限制为C++17的项目,我想要一个独立实现C+...
Invalid conversion from ‘const char*’ to ‘char*’ with `rindex` function.
英文: Invalid conversion from ‘const char*’ to ‘char*’ with ```rindex``` function 问题 我想在C++17下使用```ind...
在MSVC中,据说存在模糊的显式转换操作符,而在gcc或clang中则不存在。
英文: Supposedly ambiguous explicit conversion operator in MSVC, not in gcc or clang 问题 以下是代码部分的中文翻译: ...
Why is empty weak_ptr required to store null pointer, while empty shared_ptr is allowed to store non-null pointer?
英文: Why is empty weak_ptr required to store null pointer, while empty shared_ptr is allowed to store...
std::enable_if_t不匹配部分特化
英文: std::enable_if_t doesn't match partial specialization 问题 如果我理解正确,别名模板实际上是模板,因此可以作为参数传递到期望类模板...
C++全局数组声明的初始值与局部函数数组声明的初始值
英文: c++ initial value of global array declarer vs initial value of local function array declarer 问题 ...
auto open_flags = std::ios::binary; seems to produce the wrong type in MSVC. Is it a bug?
英文: auto open_flags = std::ios::binary; seems to produce the wrong type in MSVC. Is it a bug? 问题 这段C...
10