summaryrefslogtreecommitdiff
path: root/tests/headers/derive-hash-template-inst-float.hpp
blob: d189ba713f910885cddd06cf1cbc9cd2adc731f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// bindgen-flags: --with-derive-hash --with-derive-partialord --with-derive-partialeq --with-derive-eq
//
/// Template definition that doesn't contain float can derive hash/partialord/partialeq/eq
template <typename T>
struct foo {
    T data;
};

/// Can derive hash/partialeq/eq when instantiated with int
struct IntStr {
    foo<int> a;
};

/// Cannot derive hash/eq when instantiated with float but can derive partialeq
struct FloatStr {
    foo<float> a;
};