От: | Kernan | https://rsdn.ru/forum/flame.politics/ | |
Дата: | 05.07.18 10:40 | ||
Оценка: | +1 |
Скрытый текст | |
K>Вот этого я что-т оне понял. K>
| |
Т.е. всё константое можно, а не константное нельзя вызывать без многопоточной защиты.All const member functions can be called concurrently by different threads on the same container. In addition, the member functions begin(), end(), rbegin(), rend(), front(), back(), data(), find(), lower_bound(), upper_bound(), equal_range(), at(), and, except in associative containers, operator[], behave as const for the purposes of thread safety (that is, they can also be called concurrently by different threads on the same container). More generally, the C++ standard library functions do not modify objects unless those objects are accessible, directly or indirectly, via the function's non-const arguments, including the this pointer.