squall/storm/list/TSExplicitList.hpp

24 lines
576 B
C++
Raw Permalink Normal View History

2020-09-16 01:28:32 -05:00
#ifndef STORM_LIST_TS_EXPLICIT_LIST_HPP
#define STORM_LIST_TS_EXPLICIT_LIST_HPP
2020-11-01 17:45:45 -06:00
#include "storm/list/TSGetExplicitLink.hpp"
#include "storm/list/TSList.hpp"
2020-09-16 01:28:32 -05:00
#include <cstdlib>
#define STORM_EXPLICIT_LIST(T, link) TSExplicitList<T, offsetof(T, link)>
template <class T, size_t offset>
class TSExplicitList : public TSList<T, TSGetExplicitLink<T>> {
public:
// Member functions
TSExplicitList();
};
template <class T, size_t offset>
TSExplicitList<T, offset>::TSExplicitList()
: TSList<T, TSGetExplicitLink<T>>() {
this->SetLinkOffset(offset);
}
#endif