ruoshan's recent timeline updates
ruoshan

ruoshan

V2EX member #45954, joined on 2013-09-25 17:06:11 +08:00
ruoshan's recent replies
string 的构造函数有一个是这个:
`basic_string( const CharT* s, const Allocator& alloc = Allocator() );`

static_cast<std::string>(cp) 和 std::string(cp) 是一样的效果.

你可以编译一下 `g++ -std=c++11 -g -S x.cc` 看一下 `x.s`. 他们两个编译出来的代码是一样的.
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3281 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 184ms · UTC 12:48 · PVG 20:48 · LAX 05:48 · JFK 08:48
♥ Do have faith in what you're doing.