☰
  • 首页
  • 规则分类
  • 项目介绍
search
•••

对标准库,特化模板类成员函数,特化模板类成员模板函数,特化、偏特化成员类模版

C++-Undefined-Behavior-81
目录 › next › previous

示例:

template <>
void std::vector<int>::push_back(const int&) {  // Undefined behavior
    ....
}

示例代码特化了 vector 类的 push_back 函数,其产生的影响是未定义的。

依据

ISO/IEC 14882:2011 17.6.4.2.1(2)-undefined
Copyright©2024 360 Security Technology Inc., Licensed under the Apache-2.0 license.