Skip to content

Commit

Permalink
Use a nicer spelling for enable_if
Browse files Browse the repository at this point in the history
  • Loading branch information
jimporter committed Jul 24, 2024
1 parent 9a671e4 commit c8a294c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/bencode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -618,10 +618,10 @@ namespace bencode {
return detail::do_decode<Data>(b, end, true);
}

template<typename Data, typename String,
std::enable_if_t<detail::is_iterable_v<String> &&
!std::is_array_v<String>, bool> = true>
inline Data basic_decode(const String &s) {
template<typename Data, typename String>
inline auto basic_decode(const String &s) -> std::enable_if_t<
detail::is_iterable_v<String> && !std::is_array_v<String>,
Data> {
return basic_decode<Data>(std::begin(s), std::end(s));
}

Expand Down

0 comments on commit c8a294c

Please sign in to comment.