Compare commits

...

6 Commits

Author SHA1 Message Date
Andrey Semashev 9eeb7f85c5 Replaced tabs with spaces. 2019-06-25 15:46:36 +03:00
Daniel Frey 62c34f51f6 Avoid confusion with the spaceship operator, fixes #59 2019-04-30 18:29:28 +02:00
Glen Fernandes 6a1917ceec Add Free Functions section heading 2019-04-29 20:12:30 -04:00
Glen Fernandes 47c9f69ffe Correct documentation URLs and update documentation 2019-04-29 18:48:51 -04:00
Glen Fernandes 7b74d2d494 Update libraries.json and documentation 2019-04-23 15:37:57 -04:00
Marshall Clow 57da5f0c18 Merge pull request #58 from boostorg/ostream_write
Refactor stream write functionality into a standalone utility
2019-04-23 03:56:04 -07:00
5 changed files with 52 additions and 5 deletions
+18 -2
View File
@@ -15,7 +15,7 @@ Distributed under the Boost Software License, Version 1.0.
[section Overview]
The header <boost/utility/ostream_string.hpp> provides the function template
boost::ostream_string for formatted output that satisfies the requirements of
`boost::ostream_string` for formatted output that satisfies the requirements of
\[ostream.formatted.reqmts\].
[endsect]
@@ -50,13 +50,29 @@ ostream_string(std::basic_ostream<charT, traits>& os,
} /* boost */
```
[heading Free functions]
[variablelist
[[`template<class charT, class traits> std::basic_ostream<charT, traits>&
ostream_string(std::basic_ostream<charT, traits>& os, const charT* data,
std::size_t size);`]
[[variablelist
[[Effects]
[Behaves like a formatted inserter (as described in
\[ostream.formatted.reqmts\]) of `os`. Creates a character sequence `seq` of
`size` characters starting at `data`, each widened using `os.widen()`
(\[basic.ios.members\]). Determines padding for `seq` as described in
\[ostream.formatted.reqmts\]. Inserts `seq` into `os`. Calls `width(0)`.]]
[[Returns] [`os`.]]]
[[Returns][`os`.]]]]]]
[endsect]
[section History]
[heading boost 1.71]
* Glen Fernandes updated the implementation of the `basic_string_ref` and
`basic_string_view` stream insertion operators to write directly to the
`basic_streambuf` and refactored that functionality into this common utility.
[endsect]
+5
View File
@@ -156,6 +156,11 @@ String-like operations:
[section History]
[/===============]
[heading boost 1.71]
* Glen Fernandes updated the implementation of the stream insertion operator to
write directly to the `basic_streambuf` and refactored that functionality into
a common utility.
[heading boost 1.53]
* Introduced
+1 -1
View File
@@ -186,7 +186,7 @@ namespace boost {
if (pos > size())
BOOST_THROW_EXCEPTION(std::out_of_range("string_view::copy" ));
size_type rlen = (std::min)(n, len_ - pos);
traits_type::copy(s, data() + pos, rlen);
traits_type::copy(s, data() + pos, rlen);
return rlen;
}
+26
View File
@@ -85,6 +85,19 @@
"Daniel Frey <d.frey -at- gmx.de>"
]
},
{
"key": "utility/ostream_string",
"name": "ostream_string",
"description": "String formatted output function.",
"documentation": "doc/html/ostream_string.html",
"category": [
"IO"
],
"authors": "Glen Fernandes",
"maintainers": [
"Glen Fernandes <glenjofe -at- gmail.com>"
]
},
{
"key": "utility/result_of",
"name": "Result Of",
@@ -98,6 +111,19 @@
"Daniel Walker <daniel.j.walker -at- gmail.com>"
]
},
{
"key": "utility/string_ref",
"name": "string_ref",
"description": "String view templates.",
"documentation": "doc/html/string_ref.html",
"category": [
"Containers"
],
"authors": "Marshall Clow",
"maintainers": [
"Marshall Clow <marshall -at- idio.com>"
]
},
{
"key": "utility/value_initialized",
"name": "Value Initialized",
+2 -2
View File
@@ -119,8 +119,8 @@
also want <code>x &gt; y, x &gt;= y,</code> and <code>x &lt;= y</code>.
Moreover, unless your class has really surprising behavior, some of these
related operators can be defined in terms of others (e.g. <code>x &gt;= y
&lt;=&gt; !(x &lt; y)</code>). Replicating this boilerplate for multiple
classes is both tedious and error-prone. The <cite><a href=
is equivalent to !(x &lt; y)</code>). Replicating this boilerplate for
multiple classes is both tedious and error-prone. The <cite><a href=
"../../boost/operators.hpp">boost/operators.hpp</a></cite> templates help
by generating operators for you at namespace scope based on other
operators you've defined in your class.</p>