gpt4 book ai didi

c++ - 以下是什么类型?

转载 作者:行者123 更新时间:2023-12-03 07:15:29 24 4
gpt4 key购买 nike

typedef std::basic_string<wchar_t,          std::char_traits<wchar_t>, TestStringAllocator<wchar_t> >       TestString;
是“basic_string”还是“wchar_t”
请让我理解,我需要进行转换,并且不知道TestString的类型是什么。
谢谢。

最佳答案

在这种情况下,TestString只是具有自定义分配器定义的std::wstringTestStringAllocator
这很有可能用于检查分配器的工作方式以及std::basic_string的使用方式。
前一段时间,我使用了类似于investigate if std::string_stream is optimized的东西(不是)。
由于您未提供TestStringAllocator的定义,因此无法确定其用途。

关于c++ - 以下是什么类型?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64596004/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com