aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Austin <chad@imvu.com>2013-04-17 17:28:27 -0700
committerJukka Jylänki <jujjyl@gmail.com>2013-04-18 20:08:40 +0300
commitb4cc2e135b1d611fa54c28bf05aada1657c97b30 (patch)
tree036eda4a210e5af907240a988ca16e7cf7b3ee65
parentf25a4c9d196b5436bf526308cb9d771f3610dd81 (diff)
calloperator wasn't pulling its own weight. We probably should have a higher-level register_function though...
-rwxr-xr-xsystem/include/emscripten/bind.h5
-rw-r--r--tests/embind/embind_test.cpp2
2 files changed, 1 insertions, 6 deletions
diff --git a/system/include/emscripten/bind.h b/system/include/emscripten/bind.h
index 0bb21290..cd35a238 100755
--- a/system/include/emscripten/bind.h
+++ b/system/include/emscripten/bind.h
@@ -1070,11 +1070,6 @@ namespace emscripten {
reinterpret_cast<GenericFunction>(classMethod));
return *this;
}
-
- template<typename ReturnType, typename... Args, typename... Policies>
- class_& calloperator(const char* methodName, Policies... policies) {
- return function(methodName, &ClassType::operator(), policies...);
- }
};
////////////////////////////////////////////////////////////////////////////////
diff --git a/tests/embind/embind_test.cpp b/tests/embind/embind_test.cpp
index 7cde8e7f..e969f9d8 100644
--- a/tests/embind/embind_test.cpp
+++ b/tests/embind/embind_test.cpp
@@ -1573,7 +1573,7 @@ EMSCRIPTEN_BINDINGS(tests) {
class_<std::function<std::string(std::string)>>("StringFunctorString")
.constructor<>()
- .calloperator<std::string, std::string>("opcall")
+ .function("opcall", &std::function<std::string(std::string)>::operator())
;
function("emval_test_get_function_ptr", &emval_test_get_function_ptr);