Get libc++ on ubuntu 14.04 working
The std::is_member_function_pointer<> template is broken on this version of the libc++ standard library for const member functions. To get ChaiScript to work with this, we had to work around the use of automatically generated std::function wrappers in many cases. This actually cleaned up the code in a few places and muddied it up in one.
This commit is contained in:
@@ -367,7 +367,13 @@ namespace chaiscript
|
||||
[this](const std::vector<Boxed_Value> &t_params) {
|
||||
return m_engine.call_exists(t_params);
|
||||
})), "call_exists");
|
||||
m_engine.add(fun<Boxed_Value (const dispatch::Proxy_Function_Base *, const std::vector<Boxed_Value> &)>(std::bind(&chaiscript::dispatch::Proxy_Function_Base::operator(), std::placeholders::_1, std::placeholders::_2, std::ref(m_engine.conversions()))), "call");
|
||||
|
||||
// m_engine.add(fun<Boxed_Value (const dispatch::Proxy_Function_Base *, const std::vector<Boxed_Value> &)>(std::bind(&chaiscript::dispatch::Proxy_Function_Base::operator(), std::placeholders::_1, std::placeholders::_2, std::ref(m_engine.conversions()))), "call");
|
||||
//
|
||||
m_engine.add(fun<Boxed_Value (const dispatch::Proxy_Function_Base &, const std::vector<Boxed_Value> &)>(
|
||||
[=](const dispatch::Proxy_Function_Base &t_fun, const std::vector<Boxed_Value> &t_params) {
|
||||
return t_fun(t_params, this->m_engine.conversions());
|
||||
}), "call");
|
||||
|
||||
m_engine.add(fun(&chaiscript::detail::Dispatch_Engine::get_type_name, std::ref(m_engine)), "name");
|
||||
|
||||
|
@@ -712,7 +712,7 @@ namespace chaiscript
|
||||
|
||||
fpp.save_params(params);
|
||||
|
||||
std::string fun_name = [&](){
|
||||
std::string fun_name = [&]()->std::string{
|
||||
if ((this->children[i]->identifier == AST_Node_Type::Fun_Call) || (this->children[i]->identifier == AST_Node_Type::Array_Call)) {
|
||||
return this->children[i]->children[0]->text;
|
||||
}
|
||||
|
@@ -617,7 +617,7 @@ namespace chaiscript
|
||||
}
|
||||
|
||||
|
||||
const size_t size = [&](){
|
||||
const size_t size = [&]()->size_t{
|
||||
if (longlong_)
|
||||
{
|
||||
return sizeof(int64_t) * 8;
|
||||
@@ -800,7 +800,7 @@ namespace chaiscript
|
||||
const auto prev_line = m_line;
|
||||
if (Id_()) {
|
||||
m_match_stack.push_back(std::make_shared<eval::Id_AST_Node>(
|
||||
[&](){
|
||||
[&]()->std::string{
|
||||
if (*start == '`') {
|
||||
//Id Literal
|
||||
return std::string(start+1, m_input_pos-1);
|
||||
|
Reference in New Issue
Block a user