-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* c++标准里并没有规定std::string::npos的值一定是-1,所以考虑到移植性,这里substr第二个参数使用 -1 作为长度是不合法的,可以直接省略这个参数或者使用 std::string::npos,来表示从指定位置截取直到字符串的末尾 * 建议不用return std::move(local),RVO会更好 https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-return-move-local
- Loading branch information
Showing
2 changed files
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters