summaryrefslogtreecommitdiff
path: root/tests/headers/derive-hash-template-inst-float.hpp
diff options
context:
space:
mode:
authorZhiting Zhu <zzhu@mozilla.com>2017-08-08 16:06:26 -0700
committerZhiting Zhu <zzhu@mozilla.com>2017-08-09 15:34:21 -0700
commitb4895d96698504dc28dfa64c4c4e4c3f3714a3c8 (patch)
tree2dc33b49a35db14adcec8ba88bae9db391753920 /tests/headers/derive-hash-template-inst-float.hpp
parent3edb811aef594b8731ca2a4878a3fb2a6f3ae61b (diff)
Small dedicated tests for derive Hash
Diffstat (limited to 'tests/headers/derive-hash-template-inst-float.hpp')
-rw-r--r--tests/headers/derive-hash-template-inst-float.hpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/headers/derive-hash-template-inst-float.hpp b/tests/headers/derive-hash-template-inst-float.hpp
new file mode 100644
index 00000000..59af69bd
--- /dev/null
+++ b/tests/headers/derive-hash-template-inst-float.hpp
@@ -0,0 +1,17 @@
+// bindgen-flags: --with-derive-hash
+//
+/// Template definition that doesn't contain float can derive hash
+template<typename T>
+struct foo {
+ T data;
+};
+
+/// Can derive hash when instantiated with int
+struct IntStr {
+ foo<int> a;
+};
+
+/// Cannot derive hash when instantiated with float
+struct FloatStr {
+ foo<float> a;
+};