SpECTRE Documentation Coverage Report
Current view: top level - Utilities - StlStreamDeclarations.hpp Hit Total Coverage
Commit: 817e13c5144619b701c7cd870655d8dbf94ab8ce Lines: 15 15 100.0 %
Date: 2024-07-19 22:17:05
Legend: Lines: hit not hit

          Line data    Source code
       1           1 : // Distributed under the MIT License.
       2             : // See LICENSE.txt for details.
       3             : 
       4             : /// \file
       5             : /// Declares stream operators for STL containers
       6             : 
       7             : #pragma once
       8             : 
       9             : // Suppress warnings from this header since they can occur from not including
      10             : // StdHelpers later. This header is used only in TypeTraits.hpp so that
      11             : // is_streamable works correctly for STL types that have stream operators
      12             : // defined.
      13             : #ifdef __GNUC__
      14             : #pragma GCC system_header
      15             : #endif
      16             : 
      17             : #include <array>
      18             : #include <deque>
      19             : #include <list>
      20             : #include <map>
      21             : #include <memory>
      22             : #include <optional>
      23             : #include <set>
      24             : #include <tuple>
      25             : #include <unordered_map>
      26             : #include <unordered_set>
      27             : #include <vector>
      28             : 
      29             : #include "Utilities/Requires.hpp"
      30             : 
      31             : namespace tt {
      32             : template <typename S, typename T, typename>
      33             : struct is_streamable;
      34             : }  // namespace tt
      35             : 
      36             : template <typename T>
      37           1 : std::ostream& operator<<(std::ostream& os, const std::list<T>& v);
      38             : 
      39             : template <typename T>
      40           1 : std::ostream& operator<<(std::ostream& os, const std::vector<T>& v);
      41             : 
      42             : template <typename T>
      43           1 : std::ostream& operator<<(std::ostream& os, const std::deque<T>& v);
      44             : 
      45             : template <typename T, size_t N>
      46           1 : std::ostream& operator<<(std::ostream& os, const std::array<T, N>& a);
      47             : 
      48             : template <typename... Args>
      49           1 : std::ostream& operator<<(std::ostream& os, const std::tuple<Args...>& t);
      50             : 
      51             : template <typename K, typename V, typename H>
      52           1 : inline std::ostream& operator<<(std::ostream& os,
      53             :                                 const std::unordered_map<K, V, H>& m);
      54             : 
      55             : template <typename K, typename V, typename C>
      56           1 : inline std::ostream& operator<<(std::ostream& os, const std::map<K, V, C>& m);
      57             : 
      58             : template <typename T, typename H>
      59           1 : std::ostream& operator<<(std::ostream& os, const std::unordered_set<T, H>& v);
      60             : 
      61             : template <typename T, typename H>
      62           1 : std::ostream& operator<<(std::ostream& os,
      63             :                          const std::unordered_multiset<T, H>& v);
      64             : 
      65             : template <typename T, typename C>
      66           1 : inline std::ostream& operator<<(std::ostream& os, const std::set<T, C>& v);
      67             : 
      68             : template <typename T,
      69             :           Requires<tt::is_streamable<std::ostream, T, void>::value> = nullptr>
      70           1 : std::ostream& operator<<(std::ostream& os, const std::unique_ptr<T>& t);
      71             : 
      72             : template <typename T,
      73             :           Requires<tt::is_streamable<std::ostream, T, void>::value> = nullptr>
      74           1 : std::ostream& operator<<(std::ostream& os, const std::shared_ptr<T>& t);
      75             : 
      76             : template <typename T, typename U>
      77           1 : std::ostream& operator<<(std::ostream& os, const std::pair<T, U>& t);
      78             : 
      79             : template <typename T>
      80           1 : std::ostream& operator<<(std::ostream& os, const std::optional<T>& t);

Generated by: LCOV version 1.14