backport JSON for G++4.6
This commit is contained in:
parent
e62a38b39f
commit
681f18ee62
@ -40,7 +40,7 @@ namespace chaiscript
|
||||
{
|
||||
const bool has_arity_match = std::any_of(funcs.begin(), funcs.end(),
|
||||
[](const Const_Proxy_Function &f) {
|
||||
return f->get_arity() == -1 || f->get_arity() == chaiscript::dispatch::detail::Arity<FunctionType>::arity;
|
||||
return f->get_arity() == -1 || size_t(f->get_arity()) == chaiscript::dispatch::detail::Arity<FunctionType>::arity;
|
||||
});
|
||||
|
||||
if (!has_arity_match) {
|
||||
|
@ -107,13 +107,13 @@ class JSON
|
||||
JSON() : Internal(), Type( Class::Null ){}
|
||||
|
||||
explicit JSON(Class type)
|
||||
: JSON()
|
||||
: Internal(), Type(Class::Null)
|
||||
{
|
||||
SetType( type );
|
||||
}
|
||||
|
||||
JSON( initializer_list<JSON> list )
|
||||
: JSON()
|
||||
: Internal(), Type(Class::Null)
|
||||
{
|
||||
SetType( Class::Object );
|
||||
for( auto i = list.begin(), e = list.end(); i != e; ++i, ++i )
|
||||
@ -418,7 +418,7 @@ class JSON
|
||||
|
||||
private:
|
||||
|
||||
Class Type = Class::Null;
|
||||
Class Type;
|
||||
};
|
||||
|
||||
JSON Array() {
|
||||
|
@ -32,7 +32,7 @@ namespace chaiscript
|
||||
|
||||
for (const auto &p : t_json.ObjectRange())
|
||||
{
|
||||
m.emplace(p.first, from_json(p.second));
|
||||
m.insert(std::make_pair(p.first, from_json(p.second)));
|
||||
}
|
||||
|
||||
return Boxed_Value(m);
|
||||
|
Loading…
x
Reference in New Issue
Block a user