summaryrefslogtreecommitdiff
path: root/bindgen-tests/tests/headers/opaque-template-instantiation-namespaced.hpp
blob: e1cadcc2a9f8c5db20007a7a9f132008bc5530fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// bindgen-flags: --enable-cxx-namespaces --opaque-type 'zoidberg::Template<zoidberg::Bar>'  --with-derive-hash --with-derive-partialeq --with-derive-eq -- -std=c++14

namespace zoidberg {

template <typename T>
class Template {
    T member;
};

struct Foo {
    char c;
};

struct Bar {
    int i;
};

class ContainsInstantiation {
    Template<Foo> not_opaque;
};

class ContainsOpaqueInstantiation {
    // We should not generate a layout test for this instantiation, and it
    // should appear as an opaque blob of bytes in
    // `ContainsOpaqueInstantiation`'s type definition.
    Template<Bar> opaque;
};

}