Add ostream integration to strings
This commit is contained in:
parent
53378eb6c3
commit
30bad78580
@ -25,6 +25,7 @@
|
||||
#include <cstring> //strlen
|
||||
#include <climits> //CHAR_BIT
|
||||
#include <iterator> //reverse_iterator
|
||||
#include <iostream> //ostream
|
||||
|
||||
#include "steal.hpp"
|
||||
#include "utility.hpp"
|
||||
@ -496,6 +497,15 @@ namespace{
|
||||
return rexy::string_view(str, len);
|
||||
}
|
||||
|
||||
template<class Char, class Alloc>
|
||||
std::ostream& operator<<(std::ostream& os, const rexy::basic_string<Char,Alloc>& str){
|
||||
return os << str.c_str();
|
||||
}
|
||||
template<class Char>
|
||||
std::ostream& operator<<(std::ostream& os, const rexy::string_view<Char>& str){
|
||||
return os << str.c_str();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#ifdef REXY_BINARY_BASE_HPP
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user