forked from enlightenment/efl
eolian-cxx: Added eo_base extension_inheritance
Added eo::base as a partial specialization for extension inheritance, since eo::base is not generated.
This commit is contained in:
parent
637a97a0f5
commit
bde4b6e9df
|
@ -230,6 +230,27 @@ inline bool operator!=(base const& lhs, base const& rhs)
|
|||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
|
||||
template <typename T>
|
||||
struct extension_inheritance;
|
||||
|
||||
template<>
|
||||
struct extension_inheritance<base>
|
||||
{
|
||||
template <typename T>
|
||||
struct type
|
||||
{
|
||||
operator base() const
|
||||
{
|
||||
return base(eo_ref(static_cast<T const*>(this)->_eo_ptr()));
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
/// @brief Downcast @p U to @p T.
|
||||
///
|
||||
/// @param T An <em>EO C++ Class</em>.
|
||||
|
|
Loading…
Reference in New Issue