c++11
ywy2090
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
c++11 单例模式
#ifndef __SINGLETON_H__ #define __SINGLETON_H__ #include #include #include #include template class Singleton { public: Singleton() = default; ~Singleton() = default; Singleton(const Singleton原创 2015-12-01 00:37:55 · 636 阅读 · 0 评论 -
c++11 chrono应用 - 一个超时timer的实现
c++11中的一个超时的timer的实现,在一些程序测试中比较有用。 #ifndef __TIMEWATCHER_H__ #define __TIMEWATCHER_H__ #include template class TimeWatcher { public: TimeWatcher(unsigned int timeout = 3) :_time_out(timeout) {} ~原创 2016-02-16 12:08:05 · 4122 阅读 · 0 评论 -
c++11 decltype
c++11 decltype 在c++11中decltype跟auto都可以作为类型指示符用来进行类型推导(编译期)。 语法: decltype ( e ) 推导规则: 1. 如果参数是一个没有带括号的标记符表达式(id-expression)或者没有带括号的类数据成员访问的表达式。 则decltype(e)的结果为e参数的实际类型。 2. 如果e是其他T类型的表达式。 a. 若e原创 2016-11-14 19:08:51 · 450 阅读 · 0 评论 -
c++primer笔记之数组与指针的一些总结
关于数组与指针的一些总结。 数组的定义方式: 类型 数组名[维度]; eg: int a[10] , int b[10][10][10]; //注意: 1.数组的维度也是数组类型的一部分。 eg: int a[10]; 数组a的类型为int[10]; int b[10][10][10] 数组b的类型为int[10][10][10];原创 2017-01-19 15:47:14 · 523 阅读 · 0 评论
分享