diff options
author | Timo Weingärtner <timo@tiwe.de> | 2014-04-20 23:35:04 +0200 |
---|---|---|
committer | Timo Weingärtner <timo@tiwe.de> | 2014-04-20 23:35:04 +0200 |
commit | a257a44837e78d283f1735b4685618c270aa54bc (patch) | |
tree | 1156ace98f6269b0b72c4d0ff9ecb3c39dfb7a08 /rfc4251.h | |
parent | a7f6e0c1d8553df678aa7b401eb374cf179210f7 (diff) | |
download | ssh-agent-filter-a257a44837e78d283f1735b4685618c270aa54bc.tar.gz |
use boost::iostreams instead of std::stringstreams
boost::iostreams::array_source instead of istringstream
boost::iostreams::back_insert_device instead of ostringstream
this should save at least one copy each and still has length checks (input)
or dynamic growth (output)
Diffstat (limited to 'rfc4251.h')
-rw-r--r-- | rfc4251.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -164,6 +164,10 @@ struct rfc4251string : boost::totally_ordered<rfc4251string> { explicit rfc4251string (mpz_class const & x) : rfc4251string{x.get_mpz_t()} {} inline explicit rfc4251string (std::istream &); + size_t size () const { return value.size(); } + char const * data () const { return value.data(); } + char * data () { return value.data(); } + operator std::string () const { return {value.begin(), value.end()}; } operator std::vector<std::string> () const; operator mpz_class () const; |