Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to support new type, like Ice::optional #183

Open
stan1334 opened this issue Sep 6, 2024 · 1 comment
Open

how to support new type, like Ice::optional #183

stan1334 opened this issue Sep 6, 2024 · 1 comment

Comments

@stan1334
Copy link

stan1334 commented Sep 6, 2024

/**

https://doc.zeroc.com/ice/3.7/best-practices/optional-values

reflect-cpp supports the following containers from the C++ standard library:
std::array
std::deque
std::filesystem::path
std::forward_list
std::map
std::multimap
std::multiset
std::list
std::optional
std::pair
std::set
std::shared_ptr
std::string
std::tuple
std::unique_ptr
std::unordered_map
std::unordered_multimap
std::unordered_multiset
std::unordered_set
std::variant
std::vector
std::wstring

if i want add new type Ice::optional,how to do,Please give me some guidance, thanks.

@liuzicheng1987
@zerolfx

@liuzicheng1987
Copy link
Contributor

The most common way would be to implement a reflector:

https://github.com/getml/reflect-cpp/blob/main/docs/custom_parser.md

In other words, your ReflType would be std::optional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants