diff --git a/clingwrapper/src/clingwrapper.cxx b/clingwrapper/src/clingwrapper.cxx index 6df99240..8b7c23c3 100644 --- a/clingwrapper/src/clingwrapper.cxx +++ b/clingwrapper/src/clingwrapper.cxx @@ -462,7 +462,7 @@ std::string Cppyy::ResolveName(const std::string& name) { // } Cppyy::TCppType_t Cppyy::ResolveEnumReferenceType(TCppType_t type) { - if (!Cpp::IsLValueReferenceType(type)) + if (Cpp::GetValueKind(type) != Cpp::ValueKind::LValue) return type; TCppType_t nonReferenceType = Cpp::GetNonReferenceType(type); @@ -532,6 +532,14 @@ Cppyy::TCppType_t Cppyy::GetReferencedType(TCppType_t type, bool rvalue) { return Cpp::GetReferencedType(type, rvalue); } +bool Cppyy::IsRValueReferenceType(TCppType_t type) { + return Cpp::GetValueKind(type) == Cpp::ValueKind::RValue; +} + +bool Cppyy::IsLValueReferenceType(TCppType_t type) { + return Cpp::GetValueKind(type) == Cpp::ValueKind::LValue; +} + bool Cppyy::IsClassType(TCppType_t type) { return Cpp::IsRecordType(type); } @@ -1357,7 +1365,7 @@ bool Cppyy::GetSmartPtrInfo( return false; std::vector ops; - Cpp::GetOperator(scope, Cpp::OP_Arrow, ops); + Cpp::GetOperator(scope, Cpp::Operator::OP_Arrow, ops); if (ops.size() != 1) return false; diff --git a/clingwrapper/src/cpp_cppyy.h b/clingwrapper/src/cpp_cppyy.h index 80acf04f..aab3b9fb 100644 --- a/clingwrapper/src/cpp_cppyy.h +++ b/clingwrapper/src/cpp_cppyy.h @@ -90,6 +90,10 @@ namespace Cppyy { RPY_EXPORTED std::string ResolveEnum(TCppScope_t enum_scope); RPY_EXPORTED + bool IsLValueReferenceType(TCppType_t type); + RPY_EXPORTED + bool IsRValueReferenceType(TCppType_t type); + RPY_EXPORTED bool IsClassType(TCppType_t type); RPY_EXPORTED bool IsPointerType(TCppType_t type);