diff --git a/core/base/CMakeLists.txt b/core/base/CMakeLists.txt index 33ad00aae5e05..b5f7ccc89a96c 100644 --- a/core/base/CMakeLists.txt +++ b/core/base/CMakeLists.txt @@ -198,12 +198,6 @@ set(BASE_SOURCES src/TVirtualX.cxx ) -if(root7) - set(BASE_HEADER_DIRS inc/ v7/inc/) - list(APPEND BASE_HEADERS - ROOT/RIndexIter.hxx) -endif() - # only here complete list of headers can be propogated to parent cmake file set_property(TARGET Core APPEND PROPERTY DICT_HEADERS ${BASE_HEADERS}) @@ -211,7 +205,6 @@ target_sources(Core PRIVATE ${BASE_SOURCES}) target_include_directories(Core PUBLIC $ - $ ) if(PCRE2_FOUND) diff --git a/core/base/v7/inc/ROOT/RIndexIter.hxx b/core/base/v7/inc/ROOT/RIndexIter.hxx deleted file mode 100644 index bbc0ada93c369..0000000000000 --- a/core/base/v7/inc/ROOT/RIndexIter.hxx +++ /dev/null @@ -1,161 +0,0 @@ -/// \file ROOT/RIndexIter.hxx -/// \ingroup Base ROOT7 -/// \author Axel Naumann -/// \date 2016-01-19 -/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback -/// is welcome! - -/************************************************************************* - * Copyright (C) 1995-2016, Rene Brun and Fons Rademakers. * - * All rights reserved. * - * * - * For the licensing terms see $ROOTSYS/LICENSE. * - * For the list of contributors see $ROOTSYS/README/CREDITS. * - *************************************************************************/ - -#ifndef ROOT7_RIndexIter -#define ROOT7_RIndexIter - -#include - -namespace ROOT { -namespace Experimental { -namespace Internal { - -/** - \class RIndexIter - Iterates over an index; the REFERENCE is defined by the REFERENCE template parameter. - - Derived classes are expected to implement `const REFERENCE& operator*()` and - `const POINTER operator->()`. - */ - -template ::type>::type> -class RIndexIter { - size_t fIndex; - -protected: - static constexpr size_t fgEndIndex = (size_t)-1; - -public: - using iterator_category = std::random_access_iterator_tag; - using value_type = typename std::remove_reference::type; - using difference_type = std::ptrdiff_t; - using pointer = POINTER; - using reference = REFERENCE; - - RIndexIter(size_t idx): fIndex(idx) {} - - /// Get the current index value. - size_t GetIndex() const noexcept { return fIndex; } - - ///\{ - ///\name Index modifiers - /// ++i - RIndexIter &operator++() noexcept - { - ++fIndex; - return *this; - } - - /// --i - RIndexIter &operator--() noexcept - { - if (fIndex != fgEndIndex) - --fIndex; - return *this; - } - - /// i++ - RIndexIter operator++(int)noexcept - { - RIndexIter old(*this); - ++(*this); - return old; - } - - // i-- - RIndexIter operator--(int)noexcept - { - RIndexIter old(*this); - --(*this); - return old; - } - - RIndexIter &operator+=(int d) noexcept - { - fIndex += d; - return *this; - } - - RIndexIter &operator-=(int d) noexcept - { - if (d > fIndex) { - fIndex = fgEndIndex; - } else { - fIndex -= d; - } - return *this; - } - - RIndexIter operator+(int d) noexcept - { - RIndexIter ret(*this); - ret += d; - return ret; - } - - RIndexIter operator-(int d) noexcept - { - RIndexIter ret(*this); - ret -= d; - return ret; - } - ///\} -}; - -///\{ -///\name Relational operators. -template -bool operator<(RIndexIter lhs, RIndexIter rhs) noexcept -{ - return lhs.GetIndex() < rhs.GetIndex(); -} - -template -bool operator>(RIndexIter lhs, RIndexIter rhs) noexcept -{ - return lhs.GetIndex() > rhs.GetIndex(); -} - -template -bool operator<=(RIndexIter lhs, RIndexIter rhs) noexcept -{ - return lhs.GetIndex() <= rhs.GetIndex(); -} - -template -inline bool operator>=(RIndexIter lhs, RIndexIter rhs) noexcept -{ - return lhs.GetIndex() >= rhs.GetIndex(); -} - -template -inline bool operator==(RIndexIter lhs, RIndexIter rhs) noexcept -{ - return lhs.GetIndex() == rhs.GetIndex(); -} - -template -inline bool operator!=(RIndexIter lhs, RIndexIter rhs) noexcept -{ - return lhs.GetIndex() != rhs.GetIndex(); -} -///\} - -} // namespace Internal -} // namespace Experimental -} // namespace ROOT - -#endif // ROOT7_RIndexIter