码迷,mamicode.com
首页 > 其他好文 > 详细

关于muduo库的笔记

时间:2015-04-09 15:25:33      阅读:144      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!