From d521d6d790a67f9b0a90a0f53f4f0bb5eea90a88 Mon Sep 17 00:00:00 2001 From: qicosmos Date: Fri, 24 May 2024 17:57:15 +0800 Subject: [PATCH] update doc --- include/ylt/standalone/iguana/pb_util.hpp | 4 ++-- src/struct_pb/tests/main.cpp | 6 +++--- website/docs/en/struct_pb/struct_pb_intro.md | 4 ++-- website/docs/zh/struct_pb/struct_pb_intro.md | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/ylt/standalone/iguana/pb_util.hpp b/include/ylt/standalone/iguana/pb_util.hpp index 8a9bb5ba0..a8014110a 100644 --- a/include/ylt/standalone/iguana/pb_util.hpp +++ b/include/ylt/standalone/iguana/pb_util.hpp @@ -475,7 +475,7 @@ IGUANA_INLINE size_t pb_key_value_size(Type&& t) { }, std::make_index_sequence{}); static_assert(inherits_from_pb_base_v, - "must be inherited from iguana::pb_base"); + "must be inherited from iguana::pb_base_impl"); t.cache_size = len; if constexpr (key_size == 0) { @@ -556,7 +556,7 @@ IGUANA_INLINE size_t pb_value_size(T&& t) { using value_type = std::remove_const_t>; if constexpr (is_reflection_v) { static_assert(inherits_from_pb_base_v>, - "must be inherited from iguana::pb_base"); + "must be inherited from iguana::pb_base_impl"); return t.cache_size; } else if constexpr (is_sequence_container::value) { diff --git a/src/struct_pb/tests/main.cpp b/src/struct_pb/tests/main.cpp index c7c6bd43b..0860f449d 100644 --- a/src/struct_pb/tests/main.cpp +++ b/src/struct_pb/tests/main.cpp @@ -900,13 +900,13 @@ TEST_CASE("test struct_pb") { std::string s; m->to_pb(s); - std::shared_ptr PUBLIC = m; + std::shared_ptr t = m; std::string str; - PUBLIC->to_pb(str); + t->to_pb(str); CHECK(s == str); - PUBLIC->from_pb(str); + t->from_pb(str); } { message_t st1{}; diff --git a/website/docs/en/struct_pb/struct_pb_intro.md b/website/docs/en/struct_pb/struct_pb_intro.md index 4edd32c68..0929f4892 100644 --- a/website/docs/en/struct_pb/struct_pb_intro.md +++ b/website/docs/en/struct_pb/struct_pb_intro.md @@ -106,10 +106,10 @@ oneof -> `std::variant <...>` - only support proto3, not support proto2 now; - don't support reflection now; - don't support unkonwn fields; -- struct must inherited from pb_base; +- struct must inherited from pb_base_impl; ## roadmap - support proto2; - support reflection; - support unkonwn fields; -- no need inheriting from pb_base; +- no need inheriting from pb_base_impl; diff --git a/website/docs/zh/struct_pb/struct_pb_intro.md b/website/docs/zh/struct_pb/struct_pb_intro.md index fd7bf11da..2e61bdc85 100644 --- a/website/docs/zh/struct_pb/struct_pb_intro.md +++ b/website/docs/zh/struct_pb/struct_pb_intro.md @@ -96,10 +96,10 @@ oneof -> `std::variant <...>` - 目前还只支持proto3,不支持proto2; - 目前还没支持反射; - 还没支持unkonwn字段; -- struct_pb 结构体必须派生于pb_base +- struct_pb 结构体必须派生于pb_base_impl ## roadmap - 支持proto2; - 支持反射; - 支持unkonwn字段; -- 去除struct_pb 结构体必须派生于pb_base的约束; +- 去除struct_pb 结构体必须派生于pb_base_impl的约束;