aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorakhropov <akhropov@yandex-team.com>2024-11-28 21:43:16 +0300
committerakhropov <akhropov@yandex-team.com>2024-11-28 21:53:01 +0300
commitfc646bb39725ebf129c72986908350b76f502e98 (patch)
tree5b97a30f495cbf4e2e01c0084271131a9f591153 /util
parent8b2cd268e9cc93e17143f759bd7c7b4300b2f7c0 (diff)
downloadydb-fc646bb39725ebf129c72986908350b76f502e98.tar.gz
Add assert to front()
commit_hash:b46dfbc7a684061be1b6e3eca5d7e312ff3e71f4
Diffstat (limited to 'util')
-rw-r--r--util/generic/array_ref.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/util/generic/array_ref.h b/util/generic/array_ref.h
index 2f8005449a..e602eddec3 100644
--- a/util/generic/array_ref.h
+++ b/util/generic/array_ref.h
@@ -130,6 +130,8 @@ public:
}
constexpr inline reference front() const noexcept {
+ Y_ASSERT(S_ > 0);
+
return *T_;
}