0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 00:32:35 +01:00

ircd::json: Add boolean constructor for literal rep.

This commit is contained in:
Jason Volk 2017-08-28 17:11:48 -07:00
parent 7c9c0ffa38
commit 81bd73f6f0

View file

@ -82,6 +82,7 @@ namespace ircd::json
template<> value::value(const float &floating);
template<> value::value(const int32_t &integer);
template<> value::value(const int16_t &integer);
template<> value::value(const bool &boolean);
template<> value::value(const std::string &str);
}
@ -165,6 +166,14 @@ ircd::json::value::value(const int16_t &integer)
:value{int64_t(integer)}
{}
template<> inline
ircd::json::value::value(const bool &boolean)
:value
{
boolean? "true" : "false",
type::LITERAL
}{}
template<> inline
ircd::json::value::value(const std::string &str)
:value{string_view{str}}