File tree Expand file tree Collapse file tree
ydb/include/userver/ydb/io Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,6 +41,14 @@ constexpr NotStruct DetectStructMemberNames(Args&&...) noexcept {
4141 return NotStruct{};
4242}
4343
44+ // To avoid including heavy <array> header for std::array<T, 0>.
45+ template <typename T>
46+ class EmptyRange final {
47+ public:
48+ constexpr T* begin () const noexcept { return nullptr ; }
49+ constexpr T* end () const noexcept { return nullptr ; }
50+ };
51+
4452} // namespace impl
4553
4654// / @see ydb::CustomMemberNames
@@ -57,6 +65,13 @@ struct StructMemberNames final {
5765 CustomMemberName custom_names[N];
5866};
5967
68+ // / @cond
69+ template <>
70+ struct StructMemberNames <0 > final {
71+ impl::EmptyRange<CustomMemberName> custom_names;
72+ };
73+ // / @endcond
74+
6075// clang-format off
6176StructMemberNames () -> StructMemberNames<0 >;
6277// clang-format on
You can’t perform that action at this time.
0 commit comments