fork download
  1. template <typename Container>
  2. class reverse_adaptor
  3. {
  4. public: // Construction
  5. reverse_adaptor(Container &container) :
  6. m_container(container)
  7. {}
  8.  
  9. private: // Members
  10. Container &m_container;
  11.  
  12. public: // STL container static polymorphism
  13. auto begin() const -> decltype(m_container.rbegin())
  14. {
  15. return m_container.rbegin();
  16. }
  17.  
  18. auto end() const -> decltype(m_container.rend())
  19. {
  20. return m_container.rend();
  21. }
  22. };
  23.  
  24. int main() {
  25. // your code goes here
  26. return 0;
  27. }
Success #stdin #stdout 0s 3336KB
stdin
Standard input is empty
stdout
Standard output is empty