Files
cbindgen/tests/expectations/monomorph-3.cpp
T
Emilio Cobos Álvarez d652d29ae2 ir: Be less strict when instantiating opaque types.
There are two situations where we can legitimately end up with a
different number of template params.

Fixes #532.
Fixes #527.
2020-08-15 13:40:54 +02:00

35 lines
569 B
C++

#include <cstdarg>
#include <cstdint>
#include <cstdlib>
#include <new>
template<typename T = void>
struct Bar;
template<typename T>
union Foo {
const T *data;
};
template<typename T, typename E>
union Tuple {
const T *a;
const E *b;
};
template<typename T>
using Indirection = Tuple<T, float>;
extern "C" {
void root(Foo<int32_t> a,
Foo<float> b,
Bar<float> c,
Foo<Bar<float>> d,
Bar<Foo<float>> e,
Bar<Bar<float>> f,
Tuple<Foo<float>, float> g,
Indirection<float> h);
} // extern "C"