SpECTRE Documentation Coverage Report
Current view: top level - Options - StdComplex.hpp Hit Total Coverage
Commit: aabde07399ba7837e5db64eedfd0a21f31f96922 Lines: 0 1 0.0 %
Date: 2024-04-26 02:38:13
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 <complex>
       7             : #include <utility>
       8             : 
       9             : #include "Options/Options.hpp"
      10             : 
      11             : /// Parse complex numbers as pairs of doubles.
      12             : template <>
      13             : struct Options::create_from_yaml<std::complex<double>> {
      14             :   template <typename Metavariables>
      15             :   static std::complex<double> create(const Options::Option& options) {
      16             :     const auto pair_of_doubles = options.parse_as<std::pair<double, double>>();
      17             :     return std::complex<double>(pair_of_doubles.first, pair_of_doubles.second);
      18             :   }
      19             : };

Generated by: LCOV version 1.14