Skip to content

Commit

Permalink
Fix build failure caused by specialized std::vector<bool>.
Browse files Browse the repository at this point in the history
Use constant reference only for non-arithmetic vector item types.
  • Loading branch information
thezbyg committed Jun 3, 2023
1 parent 048eb8f commit f4c8adc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/dynv/Xml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ struct SerializeVisitor {
if (!writeListStart(stream, name, dynv::types::typeHandler<T>().name))
return false;
++indentation;
for (const auto &i: values) {
for (std::conditional_t<std::is_arithmetic_v<T>, T, const T &> i: values) {
if (!writeIndentation(stream, indentation))
return false;
if constexpr (std::is_same_v<std::decay_t<decltype(i)>, common::Ref<Map>>) {
if constexpr (std::is_same_v<T, common::Ref<Map>>) {
if (!writeStart(stream, "li"s, true))
return false;
++indentation;
Expand Down

0 comments on commit f4c8adc

Please sign in to comment.