Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-18 09:27:40

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include <ostream>
0012 
0013 namespace ActsPlugins::detail {
0014 
0015 template <typename It>
0016 struct RangePrinter {
0017   It begin;
0018   It end;
0019 
0020   RangePrinter(It a, It b) : begin(a), end(b) {}
0021 };
0022 
0023 template <class It>
0024 RangePrinter(It b, It e) -> RangePrinter<It>;
0025 
0026 template <typename It>
0027 inline std::ostream &operator<<(std::ostream &os, const RangePrinter<It> &r) {
0028   for (auto it = r.begin; it != r.end; ++it) {
0029     os << *it << " ";
0030   }
0031   return os;
0032 }
0033 
0034 }  // namespace ActsPlugins::detail