SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/AnalyticData - AnalyticData.hpp Hit Total Coverage
Commit: 3528f39684ab2ee5d689cee48331779e729b0a07 Lines: 3 4 75.0 %
Date: 2024-02-27 07:22:14
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 <type_traits>
       7             : 
       8             : // note that std::is_convertible is used in the following type aliases as it
       9             : // will not match private base classes (unlike std::is_base_of) and some
      10             : // analytic data privately inherits from an analytic solution
      11             : 
      12             : /// \ingroup AnalyticDataGroup
      13             : /// \brief Empty base class for marking analytic data.
      14           1 : struct MarkAsAnalyticData {};
      15             : 
      16             : /// \ingroup AnalyticDataGroup
      17             : /// \brief Check if `T` is an analytic data
      18             : template <typename T>
      19           1 : using is_analytic_data = typename std::is_convertible<T*, MarkAsAnalyticData*>;
      20             : 
      21             : /// \ingroup AnalyticDataGroup
      22             : /// \brief `true` if `T` is an analytic data
      23             : template <typename T>
      24           1 : constexpr bool is_analytic_data_v =
      25             :     std::is_convertible_v<T*, MarkAsAnalyticData*>;

Generated by: LCOV version 1.14