9 #ifndef EASTL_ADAPTORS_H
10 #define EASTL_ADAPTORS_H
13 #include <EASTL/internal/config.h>
14 #include <EASTL/internal/move_help.h>
15 #include <EASTL/type_traits.h>
16 #include <EASTL/iterator.h>
18 #if defined(EA_PRAGMA_ONCE_SUPPORTED)
22 EA_DISABLE_VC_WARNING(4512 4626)
23 #if defined(_MSC_VER) && (_MSC_VER >= 1900)
24 EA_DISABLE_VC_WARNING(5027)
36 template <
typename Container>
41 : mContainer(
eastl::forward<
C>(c))
57 static_assert(eastl::is_same_v<C, Container>,
"Reference collapsed deduced type must be the same as the deduced Container type!");
63 template <
typename Container>
64 auto begin(
const reverse_wrapper<Container>& w) -> decltype(eastl::rbegin(w.mContainer))
66 return eastl::rbegin(w.mContainer);
69 template <
typename Container>
70 auto end(
const reverse_wrapper<Container>& w) -> decltype(eastl::rend(w.mContainer))
72 return eastl::rend(w.mContainer);
75 template <
typename Container>
76 reverse_wrapper<Container>
reverse(Container&& c)
78 return reverse_wrapper<Container>(eastl::forward<Container>(c));
83 #if defined(_MSC_VER) && (_MSC_VER >= 1900)
84 EA_RESTORE_VC_WARNING()
86 EA_RESTORE_VC_WARNING()
EA Standard Template Library.
Definition: algorithm.h:288
void reverse(BidirectionalIterator first, BidirectionalIterator last)
Definition: algorithm.h:2714
Definition: TestEABase.cpp:2829
Definition: adaptors.h:38
reverse_wrapper(C &&c)
Definition: adaptors.h:40