diff --git a/include/athena/DNAYaml.hpp b/include/athena/DNAYaml.hpp index 5d11f29..e7ba501 100644 --- a/include/athena/DNAYaml.hpp +++ b/include/athena/DNAYaml.hpp @@ -1,7 +1,6 @@ #pragma once #include -#include #include "athena/DNA.hpp" #include "athena/FileReader.hpp" @@ -12,13 +11,12 @@ namespace athena::io { template -inline std::string_view __GetDNAName(const T& dna, std::enable_if_t>* = nullptr) { - return dna.DNATypeV(); -} - -template -inline std::string_view __GetDNAName(const T& dna, std::enable_if_t>* = nullptr) { - return dna.DNAType(); +std::string_view __GetDNAName(const T& dna) { + if constexpr (__IsDNAVRecord_v) { + return dna.DNATypeV(); + } else { + return dna.DNAType(); + } } template diff --git a/src/athena/DNAYaml.cpp b/src/athena/DNAYaml.cpp index c8d7d59..2f2f077 100644 --- a/src/athena/DNAYaml.cpp +++ b/src/athena/DNAYaml.cpp @@ -2,6 +2,7 @@ #include #include +#include #include "athena/YAMLCommon.hpp"