SpECTRE Documentation Coverage Report
Current view: top level - Utilities/StdHelpers - RetrieveUniquePtr.hpp Hit Total Coverage
Commit: 965048f86d23c819715b3af1ca3f880c8145d4bb Lines: 2 4 50.0 %
Date: 2024-05-16 17:00:40
Legend: Lines: hit not hit

          Line data    Source code
       1           0 : // Distributed under the MIT License.
       2             : // See LICENSE.txt for details.
       3             : 
       4             : #pragma once
       5             : 
       6             : #include <memory>
       7             : 
       8           0 : namespace StdHelpers {
       9             : /// @{
      10             : /// \brief Dereference a `std::unique_ptr` or just get the value back.
      11             : template <typename T, typename Deleter>
      12           1 : const T& retrieve(const std::unique_ptr<T, Deleter>& t) {
      13             :   return *t;
      14             : }
      15             : 
      16             : template <typename T>
      17           1 : const T& retrieve(const T& t) {
      18             :   return t;
      19             : }
      20             : /// @}
      21             : }  // namespace StdHelpers

Generated by: LCOV version 1.14