你大概把 axu 看成一个参数了.
我现场编译一个 procps-ng-3.3.10 也是能看见 a x u 参数的
$ cd procps-ng-3.3.10
$ ./configure
$ make
$ ./ps/pscommand -V
procps-ng version 3.3.10
$ ./ps/pscommand --help all
Usage:
pscommand [options]
Basic options:
...
a all with tty, including other users
...
x processes without controlling ttys
Output formats:
...
u user-oriented format
...
你的版本是什么?真的没有吗?
$ ps --version
ps from procps-ng 4.0.4
$ ps --help all
Usage:
ps [options]
Basic options:
...
a all with tty, including other users
...
x processes without controlling ttys
...
Output formats:
...
u user-oriented format
...
省略 impl 后的<T> 就很可能出现这种情况
```rust
struct Point<T> {
x: T,
y: T,
}
// 实现是通用的还是只针对一个类型,这里看不出来了
impl Point<T> {
fn x(&self) -> &T {
&self.x
}
}
struct T;
```
对 rust 这种语法要求严格的语言来说,什么都是要先定义后使用的,泛型类型别名也是
`impl<T(定义)> Point<T(使用)> { 此范围内所有的 T 都不会是别的意思 }`
无序的意思是不保证每次读取顺序相同。
请在编程时当作: 每次遍历它返回的元素顺序不一样.
实际代码中基本不会遍历 unorderd_map, 如果需要遍历(比如保存到文件), 最好是插入 vec 然后排序 最后再遍历.
实际上,对于同一个程序同一次运行, 插入 a, b, c 首次遍历得到 c,a,b , 那么再重复多次也是 c,a,b.
只要编译器从 vc 换到 gcc , 或者 debug 改 release , 或者优化 O2 改 O3 等等, 很可能 插入 a, b, c 遍历得就变成 b,a,c 之类.