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