diff options
author | arkady-e1ppa <arkady-e1ppa@yandex-team.com> | 2024-08-13 22:30:08 +0300 |
---|---|---|
committer | arkady-e1ppa <arkady-e1ppa@yandex-team.com> | 2024-08-13 22:42:11 +0300 |
commit | a22375f74c2d4696846adf89626ca853b08cc782 (patch) | |
tree | 21af9ae9f1e0c825821cd0c46b024f8cf5a0c230 /library/cpp/linear_regression/unimodal.cpp | |
parent | 70ed6114541643f807012c222d8b8cc4c03a0ae3 (diff) | |
download | ydb-a22375f74c2d4696846adf89626ca853b08cc782.tar.gz |
YT-22512: Static analysis for TError method, ctors and related macros
Static analysis enabled for TError creation and related macros
TRuntimeFormat can be used to disable this feature, but requires copying the viewed object.
See NYT::TError::DisableFormat overloads to optimize constructions which want to move the given string
Note to future readers: TError is not "perfect-forwarding" unfriendly class. This means that the code
```
template <class... TArgs>
TError MakeError(TArgs&&... args) {
return TError(std::forward<TArgs>(args)...);
}
```
will not compile and needs to be properly adjusted (see. TError::Wrap for implementation example)
This implies that emplace construction in containers will not work either. Use move construction instead, as it is simply a pointer swap and therefore free
Annotations: [nodiff:caesar]
cff12f05849402d09a4487bad26ffcd968215dc7
Diffstat (limited to 'library/cpp/linear_regression/unimodal.cpp')
0 files changed, 0 insertions, 0 deletions