diff options
author | Chad Austin <chad@imvu.com> | 2013-04-04 02:03:48 -0700 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2013-04-12 14:27:32 +0300 |
commit | 545dc8ef97e90ffc1a5a62c59edffdc6e3b8e0b3 (patch) | |
tree | ff45c9a7011266df6afeab5a52d9d59d8028c545 /tests/embind/embind_test.cpp | |
parent | 9baac4cd7c98e5e8e3b96926ac300701dbdf0950 (diff) |
support overloaded index access
Diffstat (limited to 'tests/embind/embind_test.cpp')
-rw-r--r-- | tests/embind/embind_test.cpp | 4 |
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;
}
|