aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChad Austin <chad@imvu.com>2013-04-04 02:03:48 -0700
committerJukka Jylänki <jujjyl@gmail.com>2013-04-12 14:27:32 +0300
commit545dc8ef97e90ffc1a5a62c59edffdc6e3b8e0b3 (patch)
treeff45c9a7011266df6afeab5a52d9d59d8028c545 /tests
parent9baac4cd7c98e5e8e3b96926ac300701dbdf0950 (diff)
support overloaded index access
Diffstat (limited to 'tests')
-rw-r--r--tests/embind/embind_test.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/embind/embind_test.cpp b/tests/embind/embind_test.cpp
index ea332f2d..1384406a 100644
--- a/tests/embind/embind_test.cpp
+++ b/tests/embind/embind_test.cpp
@@ -736,6 +736,10 @@ struct Vector {
return (&x)[i];
}
+ const float& operator[](int i) const {
+ return (&x)[i];
+ }
+
float getY() const {
return y;
}