alibaba / alibaba/yalantinglibs

[feat][struct_pack] not support shared_ptr

Open
#437 7 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
2.2k
Forks
327
Avg merge
1d 20h
Merged PRs (30d)
2

Description

I saw the struct_pack library supports many STL containers
but after testing, I regretted that this library does not support the smart point of C++ 11.
like shared_ptr etc.

for example, I have a tree node struct like:

enum class type_e {
root = 0,
users = 1,
projs = 2,
};

struct Node {
type_e type;
std::string name;
std::string value;
std::list>> children;
};

for now, this library cannot serialize/deserialize the above Node structure.
you can reference another nonintrusive library named alpaca, which supports smart point.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading struct_pack's existing STL-container serialization support and compare its behavior with the shared_ptr example in the issue. Define how shared_ptr ownership, recursive Node values, deserialization, and possible cycles should work; the issue does not name a file or test, so completion criteria need to be established before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.