Merge branch 'develop' of github.com:gracicot/json into develop

This commit is contained in:
Guillaume Racicot 2018-06-04 11:18:25 -04:00
commit 14e6278c2f
2 changed files with 20 additions and 0 deletions

View file

@ -51,6 +51,16 @@ struct external_constructor<value_t::string>
j.m_value = std::move(s);
j.assert_invariant();
}
template<typename BasicJsonType, typename CompatibleStringType,
enable_if_t<not std::is_same<CompatibleStringType, typename BasicJsonType::string_t>::value,
int> = 0>
static void construct(BasicJsonType& j, const CompatibleStringType& str)
{
j.m_type = value_t::string;
j.m_value.string = j.template create<typename BasicJsonType::string_t>(str);
j.assert_invariant();
}
};
template<>

View file

@ -1320,6 +1320,16 @@ struct external_constructor<value_t::string>
j.m_value = std::move(s);
j.assert_invariant();
}
template<typename BasicJsonType, typename CompatibleStringType,
enable_if_t<not std::is_same<CompatibleStringType, typename BasicJsonType::string_t>::value,
int> = 0>
static void construct(BasicJsonType& j, const CompatibleStringType& str)
{
j.m_type = value_t::string;
j.m_value.string = j.template create<typename BasicJsonType::string_t>(str);
j.assert_invariant();
}
};
template<>