Skip to content

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

Description

@michael-brade

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)>
{};

Activity

  1. self-assigned this
    on Jul 1, 2023
  2. ColinH commented on Jul 18, 2023

    @ColinH
    Member

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

  3. michael-brade commented on Sep 11, 2023

    @michael-brade
    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?

  4. ColinH commented on Sep 16, 2023

    @ColinH
    Member

    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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions