初始化地狱是什么意思?

时间:2021-05-05 19:55:27

标签: c++ stdvector

我最近完成了一个自定义矢量容器实现。我试图尽可能多地模仿原始向量实现。这是source code

在社区平台上发布后,有人评论了填充构造函数的重载之一。这些重载的签名如下

explicit Vector(const size_type numOfElements, const allocator_type& alloc = allocator_type());
Vector(const size_type numOfElements, const value_type& fillValue, const allocator_type& alloc = allocator_type());

那家伙说第二个可能是通往初始化地狱的大门。然后,我搜索了这个词,但找不到合适的结果。

初始化地狱是什么意思,它是如何发生的?

0 个答案:

没有答案