Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
qicosmos committed May 24, 2024
1 parent 9681565 commit d521d6d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions include/ylt/standalone/iguana/pb_util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ IGUANA_INLINE size_t pb_key_value_size(Type&& t) {
},
std::make_index_sequence<SIZE>{});
static_assert(inherits_from_pb_base_v<T>,
"must be inherited from iguana::pb_base");
"must be inherited from iguana::pb_base_impl");
t.cache_size = len;

if constexpr (key_size == 0) {
Expand Down Expand Up @@ -556,7 +556,7 @@ IGUANA_INLINE size_t pb_value_size(T&& t) {
using value_type = std::remove_const_t<std::remove_reference_t<T>>;
if constexpr (is_reflection_v<value_type>) {
static_assert(inherits_from_pb_base_v<std::decay_t<T>>,
"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_type>::value) {
Expand Down
6 changes: 3 additions & 3 deletions src/struct_pb/tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -900,13 +900,13 @@ TEST_CASE("test struct_pb") {
std::string s;
m->to_pb(s);

std::shared_ptr<iguana::pb_base> PUBLIC = m;
std::shared_ptr<iguana::pb_base> 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{};
Expand Down
4 changes: 2 additions & 2 deletions website/docs/en/struct_pb/struct_pb_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
4 changes: 2 additions & 2 deletions website/docs/zh/struct_pb/struct_pb_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -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的约束

0 comments on commit d521d6d

Please sign in to comment.