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

@@ -72,6 +72,11 @@ class ElementProxy : public VariantOperators<ElementProxy<TArray> >,
return getUpstreamElement().template as<T>();
}
template <typename T>
FORCE_INLINE operator T() const {
return getUpstreamElement();
}
template <typename T>
FORCE_INLINE bool is() const {
return getUpstreamElement().template is<T>();