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

basic implementation of context-based path traction #1075

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

grisumbras
Copy link
Member

Very rough draft of the idea.

For a context type Ctx the user is supposed to implement these functions:

void tag_invoke(context_key_push_tag, string_view,  Ctx const&);
void tag_invoke(context_key_pop_tag, Ctx const&);
void tag_invoke(context_index_push_tag, std::size_t, Ctx const&);
void tag_invoke(context_index_pop_tag, Ctx const&);

The library would invoke them when traversing through the converted/parsed/serialized value.

Things to think about:

  • The user may actually want to set error_code in those callbacks.
  • The user may want to clear error_code in those functions. But then where would we get the results the calling function was supposed to create?

@cppalliance-bot
Copy link

An automated preview of the documentation is available at https://1075.json.prtest2.cppalliance.org/libs/json/doc/html/index.html

@cppalliance-bot
Copy link

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

Successfully merging this pull request may close these issues.

2 participants