AoC code coverage
Current view: top level - aoclib - Views.h (source / functions) Coverage Total Hit
Test: master Lines: 83.3 % 6 5
Test Date: 2025-07-28 10:53:57 Functions: 75.0 % 4 3

            Line data    Source code
       1              : #pragma once
       2              : 
       3              : #include <ranges>
       4              : 
       5              : namespace views {
       6              : using namespace std::views;
       7              : 
       8            9 : auto constexpr toString = transform([](auto const &x) { return std::to_string(x); });
       9              : 
      10         6760 : auto constexpr splitLines = std::views::split('\n') | transform([](auto &&r) {
      11         6760 :                               return std::string_view(r.begin(), r.end());
      12         6760 :                             });
      13              : 
      14            1 : constexpr auto toStringAndJoinWith(std::string_view const j) { return toString | join_with(j); }
      15            0 : constexpr auto toStringAndJoinWith(char const j) { return toString | join_with(j); }
      16              : 
      17              : } // namespace views
        

Generated by: LCOV version 2.0-1