Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
Things to check
Flags
safe-html, strict-same
Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
This design removes several redundant overloads from the interface. For example, the 11 overloads of `std::string::insert` are reduced to just 3 in <<ref_string>>, while still providing identical functionality. In addition to these changes, overloads taking a `std::initializer_list<char>` parameter have been removed. Such overloads have little use, as they serve as little more than wrappers for arrays with an inefficient syntax:这一设计从接口中移除了多个冗余的重载。例如,`std::string::insert` 原本有 11 个重载,而在 <<ref_string>> 中被减少到仅 3 个,同时仍提供完全相同的功能。除此之外,接受 `std::initializer_list<char>` 参数的重载也被移除。这类重载用途有限,因为它们本质上只是对字符数组的封装,且语法效率低下:</char></ref_string>