minijson_reader icon indicating copy to clipboard operation
minijson_reader copied to clipboard

Dispatcher example in README does not compile

Open OLEGSHA opened this issue 1 year ago • 0 comments

From README.md:

struct Order
{
    // (comment)
    std::string ticker;
    handler("ticker", [](Order& o, value v) {v.to(o.ticker);}),

Attempting to compile this code causes value::as<std::string> to fail because std::string_view must be used instead. Indeed, Order::ticker is an std::string_view in test/dispatcher.cpp.

OLEGSHA avatar Feb 22 '24 11:02 OLEGSHA