Fixed issue where the dereferencing function broke compilation on some compilers.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-06-26 17:17:06 +02:00
parent 72aad2a5e3
commit 7fe8c80141
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 7 additions and 2 deletions

View File

@ -30,9 +30,14 @@ namespace ArbUt {
return _raw; return _raw;
} }
inline T operator*() const { inline T operator*() const {
if constexpr (std::is_abstract<T>()){
static_assert(!std::is_abstract<T>(), "You're not allowed to dereference an abstract class.");
}
else{
AssertNotNull(_raw); AssertNotNull(_raw);
return *_raw; return *_raw;
} }
}
inline T* GetRaw() const noexcept { return _raw; } inline T* GetRaw() const noexcept { return _raw; }