1 // bindgen-flags: --generate-inline-functions -- -std=c++11
2
3 class A {
4 public:
5 // Deleted function should not get a binding.
6 void deleted() = delete;
7
8 // Inline functions should get bindings, whether they are defined inline
9 // (in the class) or out of line.
inline_definition()10 inline void inline_definition() {}
11 inline void out_of_line_definition();
12
13 // TODO: This is an edge case that we get wrong: An inline function
14 // without a definition in the same translation unit should still get a
15 // binding. We currently can't distinguish this case from a deleted member
16 // function because libclang doesn't provide a direct way to query for
17 // deleted member functions. This seems acceptable, however, as an inline
18 // function without a definition in the same translation unit is unlikely
19 // to be useful in practice.
20 inline void inline_without_definition();
21 };
22
out_of_line_definition()23 void A::out_of_line_definition() {}
24
25 class B {
26 public:
27 // Deleted copy constructor should not get a binding.
28 B(B&) = delete;
29 };
30
31 class C {
32 public:
33 // Defaulted copy constructor should get a binding.
34 C(C&) = default;
35 };