typedef std :: basic_string <uint_32>和std :: basic_string <wchar_t> WString; </wchar_t> </uint_32>之间的区别是什么?

时间:2011-12-17 05:12:56

标签: c++ android-ndk java-native-interface

我需要决定如何处理Android Cross compilar NDK中不支持的wchar。目前我在做typedef std::basic_string<wchar_t> WString;,但我看到其他人使用typedef std::basic_string<uint_32>来输入typedef。我需要知道我应该做什么,因为我遇到了这里描述的问题http://www.crystax.net/trac/ndk/ticket/10 我使用的是android-ndk-r7而不是crystax。我需要有关如何处理wchar_t和const wchar_t *的具体建议。我该怎么把这些转换成?

更新:我尝试使用uint32_t作为basic_string的模板进行转换,但它为比较运算符提供了错误,无法匹配operator ==和operator = ambiguous overload。但是使用wchar_t没有意义,因为android已经将其作为4个字节存根。

0 个答案:

没有答案