首页 > 其他 > 详细

关于muduo库的笔记

时间:2015-04-09 15:24:58      阅读:92      评论:0      收藏:0      [点我收藏+]

base 库

1. base/StringPiece.h

A string like object that points into another piece of memory.
Useful for providing an interface that allows clients to easily
pass in either a "const char*" or a "string".

Arghh!  I wish C++ literals were automatically of type "string".

使用了:__type_traits

This makes vector<StringPiece> really fast for some STL implementations

Functions used to create STL containers that use StringPiece
 Remember that a StringPiece‘s lifetime had better be less than
 that of the underlying string or char*.  If it is not, then you
 cannot safely store a StringPiece into an STL container

 

关于muduo库的笔记

原文:http://www.cnblogs.com/qiangxia/p/4409626.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!