diff --git a/include/athena/DNAOp.hpp b/include/athena/DNAOp.hpp index ba502d3..be7f68d 100644 --- a/include/athena/DNAOp.hpp +++ b/include/athena/DNAOp.hpp @@ -147,18 +147,20 @@ struct BinarySize { } template static std::enable_if_t> Do(const PropId& id, T& var, StreamT& s) { - for (auto& v : var) - BinarySize::Do, DNAE>(id, v, s); + for (auto& v : var) { + BinarySize::template Do, DNAE>(id, v, s); + } } template static void DoSize(const PropId& id, T& var, StreamT& s) { - BinarySize::Do(id, var, s); + BinarySize::template Do(id, var, s); } template static std::enable_if_t> Do(const PropId& id, std::vector& vector, const S& count, StreamT& s) { - for (T& v : vector) - BinarySize::Do(id, v, s); + for (T& v : vector) { + BinarySize::template Do(id, v, s); + } } template static std::enable_if_t> Do(const PropId& id, std::vector& vector, const S& count, @@ -255,7 +257,7 @@ struct PropCount { } template static void DoSize(const PropId& id, T& var, StreamT& s) { - PropCount::Do(id, var, s); + PropCount::template Do(id, var, s); } template static void Do(const PropId& id, std::vector& vector, const S& count, StreamT& s) { @@ -327,12 +329,13 @@ struct Read { } template static std::enable_if_t> Do(const PropId& id, T& var, StreamT& s) { - for (auto& v : var) - Read::Do, DNAE>(id, v, s); + for (auto& v : var) { + Read::template Do, DNAE>(id, v, s); + } } template static void DoSize(const PropId& id, T& var, StreamT& s) { - Read::Do(id, var, s); + Read::template Do(id, var, s); } template static std::enable_if_t> Do(const PropId& id, std::vector& vector, const S& count, @@ -341,7 +344,7 @@ struct Read { vector.reserve(count); for (size_t i = 0; i < static_cast(count); ++i) { vector.emplace_back(); - Read::Do(id, vector.back(), r); + Read::template Do(id, vector.back(), r); } } template @@ -483,18 +486,20 @@ struct Write { } template static std::enable_if_t> Do(const PropId& id, T& var, StreamT& s) { - for (auto& v : var) - Write::Do, DNAE>(id, v, s); + for (auto& v : var) { + Write::template Do, DNAE>(id, v, s); + } } template static void DoSize(const PropId& id, T& var, StreamT& s) { - Write::Do(id, var, s); + Write::template Do(id, var, s); } template static std::enable_if_t> Do(const PropId& id, std::vector& vector, const S& count, StreamT& w) { - for (T& v : vector) - Write::Do(id, v, w); + for (T& v : vector) { + Write::template Do(id, v, w); + } } template static std::enable_if_t> Do(const PropId& id, std::vector& vector, const S& count, @@ -596,9 +601,11 @@ struct ReadYaml { template static std::enable_if_t> Do(const PropId& id, T& var, StreamT& r) { size_t _count; - if (auto __v = r.enterSubVector(id.name, _count)) - for (size_t i = 0; i < _count && i < std::extent_v; ++i) - ReadYaml::Do, DNAE>({}, var[i], r); + if (auto __v = r.enterSubVector(id.name, _count)) { + for (size_t i = 0; i < _count && i < std::extent_v; ++i) { + ReadYaml::template Do, DNAE>({}, var[i], r); + } + } } template static void DoSize(const PropId& id, T& var, StreamT& s) { @@ -613,7 +620,7 @@ struct ReadYaml { vector.reserve(_count); for (size_t i = 0; i < _count; ++i) { vector.emplace_back(); - ReadYaml::Do({}, vector.back(), r); + ReadYaml::template Do({}, vector.back(), r); } } /* Horrible reference abuse (but it works) */ @@ -712,9 +719,11 @@ struct WriteYaml { } template static std::enable_if_t> Do(const PropId& id, T& var, StreamT& w) { - if (auto __v = w.enterSubVector(id.name)) - for (auto& v : var) - WriteYaml::Do, DNAE>({}, v, w); + if (auto __v = w.enterSubVector(id.name)) { + for (auto& v : var) { + WriteYaml::template Do, DNAE>({}, v, w); + } + } } template static void DoSize(const PropId& id, T& var, StreamT& s) { @@ -723,9 +732,11 @@ struct WriteYaml { template static std::enable_if_t> Do(const PropId& id, std::vector& vector, const S& count, StreamT& w) { - if (auto __v = w.enterSubVector(id.name)) - for (T& v : vector) - WriteYaml::Do(id, v, w); + if (auto __v = w.enterSubVector(id.name)) { + for (T& v : vector) { + WriteYaml::template Do(id, v, w); + } + } } template static std::enable_if_t> Do(const PropId& id, std::vector& vector, const S& count,