Function operator|
Summary
#include <src/entt/entity/view_pack.hpp>
(1) template <typename... Args, typename... Other>
auto operator|(const basic_view< Args... > &lhs, const basic_view< Other... > &rhs)
(2) template <typename... Args, typename... Pack>
auto operator|(const basic_view< Args... > &view, const view_pack< Pack... > &pack)
Function overload
Synopsis
#include <src/entt/entity/view_pack.hpp>
template <typename... Args, typename... Other>
auto operator|(const basic_view< Args... > &lhs, const basic_view< Other... > &rhs)
Description
Combines two views in a pack.
- Template Parameters
Args
- Template arguments of the first view.Other
- Template arguments of the second view.- Parameters
lhs
- A reference to the first view with which to create the pack.rhs
- A reference to the second view with which to create the pack.- Returns
- A pack that combines the two views in a single iterable object.
Source
Lines 412-415 in src/entt/entity/view_pack.hpp.
template<typename... Args, typename... Other>
[[nodiscard]] auto operator|(const basic_view<Args...> &lhs, const basic_view<Other...> &rhs) {
return view_pack{lhs, rhs};
}
Synopsis
#include <src/entt/entity/view_pack.hpp>
template <typename... Args, typename... Pack>
auto operator|(const basic_view< Args... > &view, const view_pack< Pack... > &pack)
Description
Combines a view with a pack.
- Template Parameters
Args
- View template arguments.Pack
- Types of views of the pack.- Parameters
view
- A reference to the view to combine with the pack.pack
- A reference to the pack to combine with the view.- Returns
- The extended pack.
Source
Lines 426-429 in src/entt/entity/view_pack.hpp.
template<typename... Args, typename... Pack>
[[nodiscard]] auto operator|(const basic_view<Args...> &view, const view_pack<Pack...> &pack) {
return view_pack{view} | pack;
}