Simplified the implementation of implicit casts

This commit is contained in:
Benoit Blanchon
2020-04-08 18:18:18 +02:00
parent 2097ffaabf
commit ec43bf4fe9
8 changed files with 56 additions and 80 deletions

View File

@@ -73,6 +73,11 @@ class MemberProxy : public VariantOperators<MemberProxy<TObject, TStringRef> >,
return getUpstreamMember().template as<TValue>();
}
template <typename T>
FORCE_INLINE operator T() const {
return getUpstreamMember();
}
template <typename TValue>
FORCE_INLINE bool is() const {
return getUpstreamMember().template is<TValue>();