Skip to content

Commit

Permalink
chore: Remove operator<< support for String as well
Browse files Browse the repository at this point in the history
  • Loading branch information
cwahn committed Feb 19, 2024
1 parent dca62f4 commit a0afb20
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions include/efp/string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,18 +353,18 @@ using U8StringView = BasicStringView<char8_t>;

#if defined(__STDC_HOSTED__) && __STDC_HOSTED__ == 1

template<typename A>
auto operator<<(std::ostream& os, const A& seq) -> EnableIf<
IsSequence<A>::value && detail::IsCharType<Element<A>>::value && !IsSame<A, std::string>::value,
std::ostream&> {
static_assert(IsSequence<A>(), "Argument should be an instance of Sequence trait.");

for (const auto& elem : seq) {
os << elem;
}

return os;
}
// template<typename A>
// auto operator<<(std::ostream& os, const A& seq) -> EnableIf<
// IsSequence<A>::value && detail::IsCharType<Element<A>>::value && !IsSame<A, std::string>::value,
// std::ostream&> {
// static_assert(IsSequence<A>(), "Argument should be an instance of Sequence trait.");

// for (const auto& elem : seq) {
// os << elem;
// }

// return os;
// }

#endif

Expand Down

0 comments on commit a0afb20

Please sign in to comment.