Skip to content

Commit

Permalink
support sv
Browse files Browse the repository at this point in the history
  • Loading branch information
qicosmos committed Aug 25, 2023
1 parent f26ccbb commit 9e7894e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion include/ylt/thirdparty/iguana/xml_reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,8 @@ IGUANA_INLINE void from_xml(U &value, It &&it, It &&end) {
detail::parse_item(value, it, end, key);
}

template <typename U, typename View, std::enable_if_t<string_v<View>, int> = 0>
template <typename U, typename View,
std::enable_if_t<string_container_v<View>, int> = 0>
IGUANA_INLINE void from_xml(U &value, const View &view) {
from_xml(value, std::begin(view), std::end(view));
}
Expand Down
2 changes: 1 addition & 1 deletion src/struct_xml/examples/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ struct person {
REFLECTION(person, name, age);

void basic_usage() {
std::string xml = R"(
std::string_view xml = R"(
<person>
<name>tom</name>
<age>20</age>
Expand Down

0 comments on commit 9e7894e

Please sign in to comment.