Lines Matching refs:T
36 template <typename T, typename... Tys> void push(Tys &&...Args) { in push()
37 new (grow(aligned_size<T>())) T(std::forward<Tys>(Args)...); in push()
39 ItemTypes.push_back(toPrimType<T>()); in push()
44 template <typename T> T pop() { in pop()
47 assert(ItemTypes.back() == toPrimType<T>()); in pop()
50 T *Ptr = &peekInternal<T>(); in pop()
51 T Value = std::move(*Ptr); in pop()
52 shrink(aligned_size<T>()); in pop()
57 template <typename T> void discard() { in discard()
60 assert(ItemTypes.back() == toPrimType<T>()); in discard()
63 T *Ptr = &peekInternal<T>(); in discard()
64 Ptr->~T(); in discard()
65 shrink(aligned_size<T>()); in discard()
69 template <typename T> T &peek() const { in peek()
72 assert(ItemTypes.back() == toPrimType<T>()); in peek()
74 return peekInternal<T>(); in peek()
77 template <typename T> T &peek(size_t Offset) const { in peek()
79 return *reinterpret_cast<T *>(peekData(Offset)); in peek()
101 template <typename T> constexpr size_t aligned_size() const { in aligned_size()
103 return ((sizeof(T) + PtrAlign - 1) / PtrAlign) * PtrAlign; in aligned_size()
107 template <typename T> T &peekInternal() const { in peekInternal()
108 return *reinterpret_cast<T *>(peekData(aligned_size<T>())); in peekInternal()
155 template <typename T> static constexpr PrimType toPrimType() { in toPrimType()
156 if constexpr (std::is_same_v<T, Pointer>) in toPrimType()
158 else if constexpr (std::is_same_v<T, bool> || std::is_same_v<T, Boolean>) in toPrimType()
160 else if constexpr (std::is_same_v<T, int8_t> || in toPrimType()
161 std::is_same_v<T, Integral<8, true>>) in toPrimType()
163 else if constexpr (std::is_same_v<T, uint8_t> || in toPrimType()
164 std::is_same_v<T, Integral<8, false>>) in toPrimType()
166 else if constexpr (std::is_same_v<T, int16_t> || in toPrimType()
167 std::is_same_v<T, Integral<16, true>>) in toPrimType()
169 else if constexpr (std::is_same_v<T, uint16_t> || in toPrimType()
170 std::is_same_v<T, Integral<16, false>>) in toPrimType()
172 else if constexpr (std::is_same_v<T, int32_t> || in toPrimType()
173 std::is_same_v<T, Integral<32, true>>) in toPrimType()
175 else if constexpr (std::is_same_v<T, uint32_t> || in toPrimType()
176 std::is_same_v<T, Integral<32, false>>) in toPrimType()
178 else if constexpr (std::is_same_v<T, int64_t> || in toPrimType()
179 std::is_same_v<T, Integral<64, true>>) in toPrimType()
181 else if constexpr (std::is_same_v<T, uint64_t> || in toPrimType()
182 std::is_same_v<T, Integral<64, false>>) in toPrimType()
184 else if constexpr (std::is_same_v<T, Floating>) in toPrimType()
186 else if constexpr (std::is_same_v<T, IntegralAP<true>>) in toPrimType()
188 else if constexpr (std::is_same_v<T, IntegralAP<false>>) in toPrimType()
190 else if constexpr (std::is_same_v<T, MemberPointer>) in toPrimType()
192 else if constexpr (std::is_same_v<T, FixedPoint>) in toPrimType()