1 #ifndef TERMOX_WIDGET_DETAIL_PIPE_UTILITY_HPP
2 #define TERMOX_WIDGET_DETAIL_PIPE_UTILITY_HPP
6 #include <termox/widget/widget.hpp>
8 namespace ox::pipe::detail {
11 template <
typename Predicate>
31 struct is_widget_ptr<std::unique_ptr<X>> : std::is_base_of<ox::Widget, X> {};
39 constexpr
bool is_widget_v = std::is_base_of_v<Widget, std::decay_t<T>>;
43 constexpr
bool is_widget_or_wptr =
44 is_widget_v<T> || is_widget_ptr_v<std::decay_t<T>>;
52 [[nodiscard]] constexpr
auto get(T& x) ->
auto&
54 if constexpr (::ox::pipe::detail::is_widget_ptr_v<T>)
Used to call operator| overload to create a new Range from filter predicate.
Definition: pipe_utility.hpp:22
Used to call operator| overload to create a new Range from filter predicate.
Definition: pipe_utility.hpp:12