c++ symbol _ZNSsC2ERKSsjj

c++ symbol _ZNSsC2ERKSsjj

本文关键字:ZNSsC2ERKSsjj symbol c++      更新时间:2023-10-16

我的应用程序在 c++ 符号 _ZNSsC2ERKSsjj 处崩溃。我使用 c++filt 查找符号,如下所示。

# c++filt _ZNSsC2ERKSsjj

std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)

这个符号是什么意思?

它是

std::string 的构造函数,它接受一个const std::string&和两个unsigned int s(ref):

basic_string( const basic_string& other, 
              size_type pos, 
              size_type count = std::basic_string::npos,
              const Allocator& alloc = Allocator() );

(您的实现是合规地将可选参数设计替换为一对重载,没有分配器参数的重载就是您在此处看到的重载。

你几乎肯定会超出输入字符串的范围,如果它首先是一个有效的字符串。

它是

std::string构造函数,它占据两个位置(无符号整数)。这将构造参数的子字符串。

相关文章: