A. Jiang
A. Jiang
Is it sufficient to deprecate the `stdext::cvt` namespace (in ~every header~ `` and ``, perhaps) only?
I guess No RTTI matrix is completed. But "macOS Clang Release" combinations repeatedly failed in CI. - https://github.com/frederick-vs-ja/range-v3/actions/runs/4055855402 - https://github.com/frederick-vs-ja/range-v3/actions/runs/4060224651 The failed test case is - range.v3.test.generator (SEGFAULT) on which...
I think when (static) RTTI is disabled, `any_view` shouldn't be provided.
`std::source_location::function_name` is _not_ a standard way to get `__PRETTY_FUNCTION__`. It is allowed, but not required, to give more information than `__func__`. Currently, only implementations guarantee ways to obtain detailed function...
另外,这个方法根本限制不了在创建静态或线程局部存储期的该类对象。实现中这些存储期的对象都不在栈上。 务必要注意:如果允许通过一个接口构造或按值返回该类的对象,那么用户就可以在堆上动态分配一块存储(使用 `malloc` 或 `::operator new`),并用原位布置 `new` 把对象构造到堆上(如 `::new ((void*)p) T{args}`)。 ---- 一些近似的办法,但相当可能不符合题意: 1. 完全限制该类的构造函数的访问,使得外部不得构造该类对象,而内部操作只在栈上构造该类对象。 2. 生成不可移动或复制的 lambda 表达式闭包类型(需要至少 C++17)。 ```C++ struct Pinned { Pinned() = default; Pinned(const Pinned&) =...
> > 1. 完全限制该类的构造函数的访问,使得外部不得构造该类对象,而内部操作只在栈上构造该类对象。 > > 这种方法可能不太行 > > ```c++ > struct X { > static X construct() { return {}; } > private: > X() = default; > };...
虽然但是, `#pragma pack(n)` 和 `alignas` 的功能不同。 对于需要更改对齐的情况,相对于原生对齐 `#pragma pack` 只会**改小**对齐,而 `alignas` 只会**改大**对齐。
考虑到“运行时检查”出现在标准文本中,我们是不是该考虑下提个[编辑 issue](https://github.com/cplusplus/draft/issues)?@GeeLaw
> 而且这只是不幸的选词,而不是技术问题。 ……正因此我建议通过 editorial issue 处理,如果是技术问题反而不该这么做。
C++14 中 `auto` 已经可以用于函数函数模板形参推导,只是局限于泛型 lambda 中。