ATLAS Offline Software
Loading...
Searching...
No Matches
ProxyContainerOperators.icc
Go to the documentation of this file.
1template <class Container,
2 class T_Derived,
3 class ElementProxy>
4typename Utils::ProxyIterator<Container,T_Derived,ElementProxy>::difference_type
5operator-(const Utils::ProxyIterator<Container,T_Derived,ElementProxy> &a,
6 const Utils::ProxyIterator<Container,T_Derived,ElementProxy> &b)
7requires (Utils::hasAddition< typename Utils::ProxyIterator<Container,T_Derived,ElementProxy>::element_index_t > )
8{
9 return a.index() - b.index();
10}
11
12// template <Utils::AccessPolicy iteratorAccessPolicy, typename ...T_Args>
13// auto operator+(const typename Utils::ContainerProxy<T_Args...>::template iterator_for_ranges<iteratorAccessPolicy> &a,
14// unsigned int offset)
15// requires (Utils::hasAddition< typename Utils::ContainerProxy<T_Args...>::ElementIndexType > )
16// {
17// using container_proxy_iterator = typename Utils::ContainerProxy<T_Args...>::template iterator_for_ranges<iteratorAccessPolicy>;
18// return container_proxy_iterator(&a.container(), a.index() + offset);
19// }
20
21template <class Container,
22 class T_Derived,
23 class ElementProxy>
24Utils::ProxyIterator<Container,T_Derived,ElementProxy>
25operator+(const Utils::ProxyIterator<Container,T_Derived,ElementProxy> &a,
26 unsigned int offset)
27requires (Utils::hasAddition< typename Utils::ProxyIterator<Container,T_Derived,ElementProxy>::element_index_t > )
28{
29 return Utils::ProxyIterator<Container,T_Derived,ElementProxy>(&a.container(), a.index() + offset);
30}