Hopefully fixes issues with incomplete types in BorrowedPtrs.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
d3c9998afa
commit
7da8a46c45
|
@ -30,7 +30,16 @@ namespace ArbUt {
|
||||||
return _raw;
|
return _raw;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline typename std::enable_if<!std::is_abstract<T>::value, bool>::type operator*() const {
|
template <typename TValue> struct is_complete_helper {
|
||||||
|
template <typename U> static auto test(U*) -> std::integral_constant<bool, sizeof(U) == sizeof(U)>;
|
||||||
|
static auto test(...) -> std::false_type;
|
||||||
|
using type = decltype(test((TValue*)0));
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename TValue> struct is_complete : is_complete_helper<TValue>::type {};
|
||||||
|
|
||||||
|
inline typename std::enable_if<is_complete<T>::value && !std::is_abstract<T>::value, bool>::type
|
||||||
|
operator*() const {
|
||||||
AssertNotNull(_raw);
|
AssertNotNull(_raw);
|
||||||
return *_raw;
|
return *_raw;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue