aboutsummaryrefslogtreecommitdiff
path: root/tests/embind/embind_test.cpp
diff options
context:
space:
mode:
authorChad Austin <chad@imvu.com>2013-04-15 22:26:21 -0700
committerJukka Jylänki <jujjyl@gmail.com>2013-04-18 20:08:15 +0300
commit426cbf616c7a4465e707d6f5cd0d11ab9ce27905 (patch)
tree60bf78741f58c566a8cd0076438f05134ce780a9 /tests/embind/embind_test.cpp
parentd2e6efdf4821ff1e9f16fc4884d398619c0d7a06 (diff)
Support returning movable types
Diffstat (limited to 'tests/embind/embind_test.cpp')
-rw-r--r--tests/embind/embind_test.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/embind/embind_test.cpp b/tests/embind/embind_test.cpp
index 86d850e0..ce133112 100644
--- a/tests/embind/embind_test.cpp
+++ b/tests/embind/embind_test.cpp
@@ -2088,15 +2088,26 @@ class Noncopyable {
public:
Noncopyable() {}
+ Noncopyable(Noncopyable&& other) {
+ other.valid = false;
+ }
std::string method() const {
return "foo";
}
+
+ bool valid = true;
};
+Noncopyable getNoncopyable() {
+ return Noncopyable();
+}
+
EMSCRIPTEN_BINDINGS(noncopyable) {
class_<Noncopyable>("Noncopyable")
.constructor<>()
.function("method", &Noncopyable::method)
;
+
+ function("getNoncopyable", &getNoncopyable);
}