mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-11-14 10:39:05 +00:00
fix string_ref io
This commit is contained in:
parent
f0dfb208e0
commit
ef5aa728b0
1 changed files with 4 additions and 1 deletions
|
@ -1,6 +1,8 @@
|
|||
#ifndef SPROUT_UTILITY_STRING_IO_HPP
|
||||
#define SPROUT_UTILITY_STRING_IO_HPP
|
||||
|
||||
#include <iterator>
|
||||
#include <algorithm>
|
||||
#include <ios>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/utility/string_ref/string_ref.hpp>
|
||||
|
@ -12,7 +14,8 @@ namespace sprout {
|
|||
template<typename T, typename Traits, typename StreamTraits>
|
||||
inline std::basic_ostream<T, StreamTraits>&
|
||||
operator<<(std::basic_ostream<T, StreamTraits>& lhs, sprout::basic_string_ref<T, Traits> const& rhs) {
|
||||
return lhs << rhs.c_str();
|
||||
std::copy(rhs.begin(), rhs.end(), std::ostreambuf_iterator<T, StreamTraits>(lhs));
|
||||
return lhs;
|
||||
}
|
||||
} // namespace sprout
|
||||
|
||||
|
|
Loading…
Reference in a new issue