feat(containers): add ENABLE_RANGE_BASED_FOR_LOOP_SUPPORT macro definition
This commit is contained in:
parent
273be032ec
commit
4bbb8e395a
@ -1210,12 +1210,7 @@ public:
|
||||
B = MoveTemp(Temp);
|
||||
}
|
||||
|
||||
public: // STL-like iterators to enable range-based for loop support, should not be directly used.
|
||||
|
||||
NODISCARD FORCEINLINE constexpr Iterator begin() { return Begin(); }
|
||||
NODISCARD FORCEINLINE constexpr ConstIterator begin() const { return Begin(); }
|
||||
NODISCARD FORCEINLINE constexpr Iterator end() { return End(); }
|
||||
NODISCARD FORCEINLINE constexpr ConstIterator end() const { return End(); }
|
||||
ENABLE_RANGE_BASED_FOR_LOOP_SUPPORT
|
||||
|
||||
private:
|
||||
|
||||
|
@ -449,6 +449,12 @@ FORCEINLINE constexpr decltype(auto) REnd(initializer_list<T> Container)
|
||||
|
||||
NAMESPACE_END(Iteration)
|
||||
|
||||
#define ENABLE_RANGE_BASED_FOR_LOOP_SUPPORT public: \
|
||||
NODISCARD FORCEINLINE constexpr decltype(auto) begin() { return Begin(); } \
|
||||
NODISCARD FORCEINLINE constexpr decltype(auto) begin() const { return Begin(); } \
|
||||
NODISCARD FORCEINLINE constexpr decltype(auto) end() { return End(); } \
|
||||
NODISCARD FORCEINLINE constexpr decltype(auto) end() const { return End(); }
|
||||
|
||||
NAMESPACE_MODULE_END(Utility)
|
||||
NAMESPACE_MODULE_END(Redcraft)
|
||||
NAMESPACE_REDCRAFT_END
|
||||
|
Loading…
x
Reference in New Issue
Block a user