summaryrefslogtreecommitdiffstats
path: root/util/generic
Commit message (Collapse)AuthorAgeFilesLines
...
* Added SafeCastToEnumkshalnev2025-03-275-0/+138
| | | | commit_hash:44102d9b2c000eefdfd91997a40a055b29d647c7
* [util] SafeIntegerCast: make fast path slightly faster & reduce code sizeswarmer2025-03-261-10/+13
| | | | commit_hash:8adef8417b7bb90754f71cf0a5be075dee84a718
* Fix Y_LIFETIMEBOUND placement in TArrayRef ctorvadim-xd2025-03-201-1/+1
| | | | | | | | | | | | | | | Detected by clang 20 ```cpp struct TFoo { const int X[10]; }; void Foo() { TArrayRef<const int> a{TFoo{}.X}; // error } ``` commit_hash:299f849c2d3cc640866eee3ff82be37f624ac70d
* remove Y_STRING_LIFETIME_BOUNDtazjin2025-03-121-18/+0
| | | | | | | This macro was previously used to conditionally toggle `lifetimebound` for `TString`-related functions which took its copy-on-write behaviour into account. As of rXXXXXX this is no longer used. commit_hash:93ac110d46ffbe59751c2cecc685b9838bba42b4
* check lifetimes of TStringBuf constructed from TString without taking into ↵swarmer2025-03-111-1/+1
| | | | | | | | | | | | | account copy-on-write semantics `TString` is a copy-on-write type, which means that in some cases the valid lifetime of its data might extend beyond the lifetime of an individual `TString` (if it was copied). However, there are practically no cases where this behaviour is appropriate, and leaving around an "owning" `TString` is undesirable. Due to this behaviour we have previously refrained from enabling `[[clang::lifetimebound]]` for `TStringBuf` constructors, because some cases of view construction from a temporary `TString` were in fact valid. This commit enables the check, as all existing related bugs in Arcadia have been fixed. Please see the related ticket and the announcement on Этушка (link will be in the post-commit comments) for more information. commit_hash:b2b6831ac3106a4e76064b85ec2d748b415ed67c
* clang-format 18 in STYLE_CPPalevitskii2025-01-204-6/+6
| | | | | clang-format 18 in STYLE\_CPP commit_hash:e2018ac17a95817f09e131ee6d5316b2bdc2d39e
* Intermediate changesrobot-piglet2025-01-031-2/+2
| | | | commit_hash:150f0a7b765d0ba270d9e42834bcf4c074ca0524
* Do not yield GLOBAL define regarding current C++ runtimethegeorg2025-01-031-1/+2
| | | | | | This codesearch query yields all the results (i. e. only `yexception_ut.cpp` depends on this define): HIDDEN_URL commit_hash:9cac855ba71451e3691fc514a5a423173c3a8aae
* Remove non-existing functions.akhropov2024-12-244-21/+2
| | | | commit_hash:ff6e98554280ce1c021da5272fde9421374a643d
* Add using for TCowStringmikhnenko2024-12-221-0/+3
| | | | commit_hash:4173484eaeb8e4dd6ea84e26ae7f496e35785564
* Add assertions for range bounds validityakhropov2024-12-185-6/+22
| | | | commit_hash:4417c6200b3fc4e3e6e61648412d263366935fdf
* Remove std::nullptr_t ctor for TStringdgolear2024-12-093-7/+4
| | | | commit_hash:6b02e6cb83bde366477f7d53b6cd6c00bffdb4d6
* More functions marked as noexcept.akhropov2024-11-301-7/+7
| | | | commit_hash:61b2ca8fab66696aade476173e07001d1b886b5e
* removed redundant code after CTAD c++-17 featurevtrunov2024-11-281-8/+1
| | | | commit_hash:6f4c98369177b376ac1c9dfba18ee5464c558c95
* Remove noexcept from operator== because it is not guaranteed that operator== ↵akhropov2024-11-281-1/+1
| | | | | | for elements is noexcept. commit_hash:2457980ced7a2f91cefec1ea20ff13bfb5c7c2cf
* Add assert to front()akhropov2024-11-281-0/+2
| | | | commit_hash:b46dfbc7a684061be1b6e3eca5d7e312ff3e71f4
* Remove TRbTree and TAvlTree from forward declarations as they are not in utilakhropov2024-11-211-6/+0
| | | | commit_hash:7f3c30234700758cc6218bdef0fa2e6862f2c32e
* Part of PR. Stylenae2022024-11-207-97/+181
| | | | | Часть большого ПР REVIEW:7264088 commit_hash:0f5b03fbbed0ac30f734943309e3ef5cd4d7a30e
* Remove methods Data, Size, Empty from TStringmikhnenko2024-11-061-0/+4
| | | | | | | If this pr has broken something, try using the methods named with a small letter \[nodiff:caesar\] commit_hash:c08a737938cff39577c6e47d4434531f6355e4c2
* add ::element_type, .get() to smart pointers for better compatibility with stdpavook2024-11-042-0/+75
| | | | | For example, this makes it possible to use gtest pointer matchers on smart pointers commit_hash:2650074ae18ee35696b297d3d1f0393e7350789f
* [util] migrate to STYLE_CPPalevitskii2024-10-281-0/+2
| | | | | | | | | | | (HIDDEN_URL \[util\] migrate to STYLE_CPP В рамках работы над линтерной моделью мигрируем на новый макрос [`STYLE_CPP`](HIDDEN_URL в связке с механизмом автоинклудов. Цели для линтинга теперь берутся из макроса `SRCS`. Пути к заголовочным файлам, расположенным не в одном каталоге с `ya.make`, рекомендуется явно перечислять в `SRCS` или воспользоваться макросом [`HEADERS`](HIDDEN_URL Механизм работы автоинклудов описан в документации, см. примечание <HIDDEN_URL> commit_hash:eb991ca8cfe26bf83871579225303c1b93c2e85c
* Remove static method max_size from TStringmikhnenko2024-10-251-1/+1
| | | | commit_hash:c6fad0009855affb407cba47af8ea60ca834a890
* remove unused includes in util/generic/string.htobo2024-10-171-2/+1
| | | | commit_hash:edd5ed00db3a4c6090c535fa406f184268188733
* nodiscard attribute for the TReserveTagswarmer2024-10-161-1/+1
| | | | commit_hash:cb3317dd036b226397730ad8c04a5f1a22f0b164
* include singleton.h only if neededtobo2024-10-081-1/+3
| | | | | использование Singleton спрятано за #ifndef _LIBCPP_VERSION - прячем инклуд аналогично commit_hash:0f8b0d3bee5ac020dd26dcadddb41b28164f4022
* check lifetime bound of TString const iteratorsswarmer2024-10-041-8/+30
| | | | | | | | | ex: ``` auto it = TString{"temporary"}.cbegin(); use(*it); ``` commit_hash:68f621e7b2d608340d7b9f5a9a246c138a2eafff
* check lifetime bound of TString cast and Detach operatorsswarmer2024-09-281-3/+3
| | | | commit_hash:43fb3eff8779379efe5955f3f48cef3bf8e3a894
* check lifetime bound of TString modifier member functionsswarmer2024-09-261-69/+69
| | | | commit_hash:5e1acbf4a0eaeb2ff1b7648f90af6bc4f41312e2
* check lifetime bound of output streamsswarmer2024-09-262-2/+2
| | | | commit_hash:17de7afe0f415c511e587b2f2607cbbc2348742e
* Support move-only key types in the Max/MinElementBy routinesswarmer2024-09-262-4/+14
| | | | | It is also slightly faster for non-trivial key types. commit_hash:4104cabfe8dc9a51174034c62aae25be16b57bf9
* Make TNothing nodiscardvadim-xd2024-09-251-1/+1
| | | | commit_hash:6ff089c6f629be6a68a94d1e1ee648630f8568d2
* faster implicit `TString` → `const std::string&` conversion: using ↵swarmer2024-09-242-1/+14
| | | | | | | template operator TStringType& to deprioritize non-const method Converting a `TString` to a `const std::string&` should not cause data cloning. commit_hash:df425bd56f8517d882444e15f3cc586af92d90b3
* Disable cast to string& from TSring&&mikhnenko2024-09-231-1/+1
| | | | commit_hash:9d13cf8c2f490f6590afada455248339a63b6bf8
* FixNamespaceComments in /utildmasloff2024-09-0572-100/+100
| | | | | FixNamespaceComments in /util bb9152570d7c258798644ead5a59f604de05ef3b
* Intermediate changesrobot-piglet2024-09-032-15/+20
|
* Remove Y_UNIT_TEST from config.clang-formatdmasloff2024-08-301-3/+3
| | | | | Remove Y_UNIT_TEST from config.clang-format 853b6da2c4464342d4cfe7756c18ed599004fdd8
* Remove remaining calls of Container() (fixup rXXXXXX)vadim-xd2024-08-231-3/+4
| | | | b2b7d42af6f055ef24e22f69cac6c0f5560f6120
* Add TPriorityQueue::PopValuevadim-xd2024-08-212-1/+45
| | | | ce37597283b1508bdba021056c149fe16feb1c69
* Set SpacesInLineCommentPrefix to 1 in /utildmasloff2024-08-1725-76/+76
| | | | | Set SpacesInLineCommentPrefix to 1 in /util 3853f9ec5143722c1bebd8dc0ffc9b61a6c17657
* Remove unused include and type aliasvadim-xd2024-08-121-2/+0
| | | | e4f1f262610072e05f42e372851b8d192a060351
* Revert "rXXXXXX: Enum range to util"swarmer2024-08-094-311/+0
| | | | | | | | Remove unused header /util/generic/enum_range.h. This reverts commit 74cd8c66052608f1b6fec69c39cb0f868376fe0a, reversing changes made to b504f5d1165d419a2d9b9fb2769286c3f27ae7a8. 5891c2c720b47fe8cb6bd1e41cc161d68b2f5ce9
* Replace Apply to std::applybulatman2024-08-091-7/+0
| | | | 33b149179bec674a6b0dc48dde27b7ff0b66efe7
* check the lifetime bounds of the explicit_type, the lazy_value, and the ↵swarmer2024-08-083-8/+8
| | | | | | queue containers 5f83506ef4fb80da806490df993e39a22d6c010a
* util: simpler implementation of the `EqualToOneOf` and `CountOf` algorithms ↵swarmer2024-08-081-16/+6
| | | | | | using the fold expression 62d55507536a408dd9c37a5497efaa0a1333cc6c
* check the lifetime bound of the MinMax algoswarmer2024-08-081-1/+1
| | | | fdef98a22a11016e54d3e0eadbebddce5f68e83d
* check the lifetime bound of the TArrayRefswarmer2024-08-081-8/+8
| | | | 9124a77116ef1ec2f8c14a3684fea08b4253601c
* Make Apply just alias to std::applybulatman2024-08-071-14/+2
| | | | d8970078eca52675e02aa3cb811e07f99ef5115a
* check the lifetime bound of the TStringBuf, constructed from a substring of ↵swarmer2024-08-071-2/+2
| | | | | | an another TStringBuf view 834bc8b5ef002eb217450def12b8887b071f3d5f
* check the lifetime bound of the TStringBuf, constructed from a TStringBuf ↵swarmer2024-08-071-2/+2
| | | | | | with different char-traits 8b52c36ebe25af42f8b0dae4d83fc067760600ba
* check the lifetime bound of the ptr-store-policyswarmer2024-08-071-2/+2
| | | | 143a81f1f8275b59d4a53b5978ec7777fc2e7b05