Index: compiled/bindings/generator.h |
=================================================================== |
--- a/compiled/bindings/generator.h |
+++ b/compiled/bindings/generator.h |
@@ -39,17 +39,18 @@ namespace bindings_internal |
VOID, |
INT, |
INT64, |
FLOAT, |
DOUBLE, |
DEPENDENT_STRING, |
OWNED_STRING, |
STRING_REF, |
- CLASS_PTR |
+ CLASS_PTR, |
+ CLASS_REF |
}; |
template<typename T> |
struct TypeInfo |
{ |
/* |
* Since TypeInfo is a templated type, in practice the compiler will define |
* a new type for each possible template parameter value. We use that fact |
@@ -91,16 +92,19 @@ namespace bindings_internal |
std::is_same<DependentString&, T>()) |
{ |
return TypeCategory::STRING_REF; |
} |
if (std::is_pointer<T>() && std::is_class<typename std::remove_pointer<T>::type>()) |
return TypeCategory::CLASS_PTR; |
+ if (std::is_reference<T>() && std::is_class<typename std::remove_reference<T>::type>()) |
+ return TypeCategory::CLASS_REF; |
+ |
return TypeCategory::UNKNOWN; |
} |
constexpr TYPEID pointer_type() const |
{ |
if (std::is_pointer<T>()) |
return TypeInfo<typename std::remove_pointer<T>::type>(); |
else |