ATLAS Offline Software
Loading...
Searching...
No Matches
PyROOTIteratorFuncs.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/*
4 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5*/
6
7// $Id$
29
30
31#ifndef ROOTUTILS_PYROOTITERATORFUNCS_H
32#define ROOTUTILS_PYROOTITERATORFUNCS_H
33
34#include <type_traits>
35#include <iterator>
36
37
38namespace RootUtils {
39
40
44template <class T>
46{
47public:
49 static bool eq (T a, T b) { return a == b; }
50 static bool ne (T a, T b) { return a != b; }
51
52
54 static typename std::enable_if<
55 std::is_base_of_v<std::random_access_iterator_tag,
56 typename std::iterator_traits<T>::iterator_category>,
57
58 bool>::type
59 lt (T a, T b) { return a < b; }
60};
61
62
63} // namespace RootUtils
64
65
66#endif // not ROOTUTILS_PYROOTITERATORFUNCS_H
static Double_t a
Provide functions for iterator comparisons.
static std::enable_if< std::is_base_of_v< std::random_access_iterator_tag, typenamestd::iterator_traits< T >::iterator_category >, bool >::type lt(T a, T b)
Ordering comparison. Only supported by random access iterators.
static bool eq(T a, T b)
Equality comparisons. All iterators have this.