Files
cbindgen/tests/expectations/opaque.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

34 lines
652 B
C++

#ifdef __cplusplus
// These could be added as opaque types I guess.
template <typename T>
struct BuildHasherDefault;
struct DefaultHasher;
#endif
#include <cstdarg>
#include <cstdint>
#include <cstdlib>
#include <new>
template<typename K = void, typename V = void, typename Hasher = void>
struct HashMap;
template<typename T = void, typename E = void>
struct Result;
/// Fast hash map used internally.
template<typename K, typename V>
using FastHashMap = HashMap<K, V, BuildHasherDefault<DefaultHasher>>;
using Foo = FastHashMap<int32_t, int32_t>;
using Bar = Result<Foo>;
extern "C" {
void root(const Foo *a, const Bar *b);
} // extern "C"