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

feature request: std::string_view as first argument to TAO_JSON_BIND_REQUIRED #139

Open
michael-brade opened this issue Jul 1, 2023 · 3 comments
Assignees

Comments

@michael-brade
Copy link

So now I am back working on json - and here is the first feature request: please implement a way for TAO_JSON_BIND_REQUIRED to accept an std::string_view as its first argument so that something like this is possible:

enum class Keys {
      date
};

template<typename T, typename = void>
struct my_traits
    : public tao::json::traits<T>
{};

template<>
struct my_traits<test>
    : public tao::json::binding::object<TAO_JSON_BIND_REQUIRED(magic_enum::enum_name(Keys::date), &test::date)>
{};
@ColinH ColinH self-assigned this Jul 1, 2023
@ColinH
Copy link
Member

ColinH commented Jul 18, 2023

At the moment I'm not sure we can do this before switching to C++20.

@michael-brade
Copy link
Author

Ok, but this then means it's going to take a long time, since the yet to be released 1.0 will be C++17, correct?

@ColinH
Copy link
Member

ColinH commented Sep 16, 2023

That depends on how long it will take ;-)

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

No branches or pull requests

2 participants