既然打算把unique_ptr写一个系列,就要详尽一点,有些内容也许在vector的时候有个涉及,但是现在还是再谈论一番。我们要把unique_ptr看做一个类,废话了,它当然是一个类。所以这个类肯定也重载了赋值运算符,即operator=。现在就开始看看operator=在unique_ptr中的使用:
官方描述如下:move assignment (1)
unique_ptr& operat...
分类:
编程语言 时间:
2015-12-26 01:15:51
阅读次数:
254
#if you want to initialize a 9*9 two-dimensional array [([""]*9) for i in range(9)]#caution: the follow code can't work [[""]*9]*9shallow copies of l....
分类:
编程语言 时间:
2015-12-20 12:57:18
阅读次数:
205
Critical Warning: The following clock transfers have no clock uncertainty assignment. For more accurate results, apply clock uncertainty assignments o...
分类:
其他好文 时间:
2015-12-09 16:45:44
阅读次数:
216
变量赋值本文转载自http://hellobug.github.io/blog/javascript-variable-assignment/开始之前先来几个例子,确保起始点是晕的状态~ :P例1.11234var a = "apple";var b = a;a = "banana";b按理说,b ...
分类:
编程语言 时间:
2015-11-27 12:59:11
阅读次数:
287
Some platforms provide a pair of instructions that work in concert to help build critical sections.On the MIPS architecture, for example, the load-lin...
分类:
其他好文 时间:
2015-11-27 06:42:50
阅读次数:
239
Because disabling interrupts does not work on multiple processors, system designers started toinvent hardware support for locking. The earliest multip...
分类:
其他好文 时间:
2015-11-24 14:46:59
阅读次数:
143
The name that the POSIX library uses for a lock is mutex, as it is used to provide mutual exclusionbetween threads, i.e., if one thread is in the crit...
分类:
其他好文 时间:
2015-11-22 13:44:42
阅读次数:
173
split - split a file into pieces 切割一个文件至多片参数: -a, --suffix-length=N 使用的后缀的长度,默认长度为2,例如'aa','ab'等后缀,其长度就是2。 -b, --bytes=SIZE 指定每个输出文件片段的大小。 -C,...
分类:
系统相关 时间:
2015-11-16 13:55:46
阅读次数:
196
This chapter briefly covers the main properties of the thread API. Each part will be explainedfurther in the subsequent chapters, as we know how to us...
The simple thread example we showed above was useful in showing how threads arecreated and how they can run in different orders depending on how the s...
分类:
其他好文 时间:
2015-11-06 14:37:32
阅读次数:
222