0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-01 13:18:58 +02:00

ircd::json: Add value constructor template to attempt cast to string_view.

This commit is contained in:
Jason Volk 2017-09-01 18:16:57 -07:00
parent d3171c9ab6
commit fd3bb037c7

View file

@ -179,6 +179,12 @@ ircd::json::value::value(const std::string &str)
:value{string_view{str}}
{}
template<class T>
ircd::json::value::value(const T &t)
:value{static_cast<string_view>(t)}
{
}
template<size_t N>
ircd::json::value::value(const char (&str)[N])
:value{string_view{str}}