根据这个question的讨论,我想知道使用nativeC++的人如何以编程方式确定他们正在使用的std::string实现是否利用Copy-On-Write(COW)我有以下功能:#include#includeboolstdstring_supports_cow(){//makesurethestringislongerthanthesizeofpotential//implementationofsmall-string.std::strings1="012345678901234567890123456789""012345678901234567890123456789""0