duck-typed object input adapters
This commit is contained in:
parent
a0c4fc945a
commit
2e2cf02cfd
8 changed files with 202 additions and 207 deletions
|
|
@ -39,9 +39,8 @@ namespace
|
|||
// shortcut to scan a string literal
|
||||
json::lexer::token_type scan_string(const char* s)
|
||||
{
|
||||
auto input_adapter = nlohmann::detail::input_adapter(s);
|
||||
using input_adapter_type = typename decltype(input_adapter)::element_type;
|
||||
return nlohmann::detail::lexer<json, input_adapter_type>(std::move(input_adapter)).scan();
|
||||
auto ia = nlohmann::detail::input_adapter(s);
|
||||
return nlohmann::detail::lexer<json, decltype(ia)>(std::move(ia)).scan();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue