摘要: 一、概述 第二章中提到了__typr_traits(),在STL中它的作用是提取对象(可能是类,可能是指针或引用)的型别。第三章中对它用到的traits编程技巧进行了详细的介绍。首先从针对迭代器的特例iterator_traits入手,然后再延伸至可以提取任意对象型别的__type_traits。 阅读全文
posted @ 2018-09-26 16:57 ChyauAng 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 一、概述 SGI STL有两级空间配置器:标准空间配置器std::allocator和特殊空间配置器std::alloc。 二、标准空间配置器std::allocator 之所以称之为"标准"是因为它直接使用了::operator new和::operator delete来进行内存分配,在效率上表 阅读全文
posted @ 2018-09-26 16:25 ChyauAng 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 一、分析所使用的服务器端与客户端demo 1.1 服务器端 void str_echo(int); int main(int argc, char argv){ int listenfd, connfd; pid_t childpid; socklen_t clilen; struct sockad 阅读全文
posted @ 2018-09-26 15:48 ChyauAng 阅读(370) 评论(0) 推荐(0) 编辑