mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-04 04:36:21 +00:00
srb2::MobjListView: relax constraint so basic mobj_t is allowed
This commit is contained in:
parent
4588943352
commit
df5d1e5fb5
1 changed files with 4 additions and 2 deletions
|
|
@ -14,15 +14,17 @@
|
|||
#include <iterator>
|
||||
#include <type_traits>
|
||||
|
||||
#include "mobj.hpp"
|
||||
#include "p_mobj.h"
|
||||
|
||||
namespace srb2
|
||||
{
|
||||
|
||||
// for (T* ptr : MobjList(hnext(), [](T* ptr) { return ptr->hnext(); }))
|
||||
template <typename T, typename F, std::enable_if_t<std::is_convertible_v<T, Mobj>, bool> = true>
|
||||
template <typename T, typename F>
|
||||
struct MobjListView
|
||||
{
|
||||
static_assert(std::is_convertible_v<T, mobj_t>);
|
||||
|
||||
struct Iterator
|
||||
{
|
||||
using iterator_category = std::forward_iterator_tag;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue