两位可能没明白我的意思
我只是想知道针对STL中的algorithm,为这些algorithm写functor可能会存在那些负作用
这是后来我在cuj一篇文章上看到的一段话:
[2] The Standard defines a side effect as follows: Accessing an object designated by a volatile lvalue, modifying an object, calling a library I/O function, or calling a function that does any of those operations are all side effects, which are changes in the state of the execution environment.