ATLAS Offline Software
Loading...
Searching...
No Matches
reverse_wrapper.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2/*
3 * Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration.
4 */
18
19
20#ifndef CXXUTILS_REVERSE_WRAPPER_H
21#define CXXUTILS_REVERSE_WRAPPER_H
22
23
24namespace CxxUtils {
25
26
31template <class C>
33{
34public:
36 auto begin() { return m_r.rbegin(); }
37 auto end() { return m_r.rend(); }
39};
40
41
45template <class T>
47
48
49} // namespace CxxUtils
50
51
52#endif // not CXXUTILS_REVERSE_WRAPPER_H
Adapter for a container-like class to be used in a range-for so as to iterate in the reverse directio...
int r
Definition globals.cxx:22
struct color C
auto make_reverse_wrapper(T &r)
Make a reverse_wrapper for a given container-like object.