Skip to content

Commit 2860e39

Browse files
authored
Merge branch 'master' into master
2 parents ae6562b + 79264ea commit 2860e39

91 files changed

Lines changed: 5579 additions & 438 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

_includes/side-nav-fast.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<ul class="doc-side-nav">
22
<li><h5 class="doc-side-nav-title">
3-
<a href="{{ site.baseurl }}/fast/">Fast Tips</a></h5>
3+
<a href="{{ site.baseurl }}/fast/">Performance Guide</a></h5>
44
</li>
5+
<li><h6 class="doc-side-nav-title">Fast Tips</h6></li>
56
{% assign sorted_posts = site.posts | sort: 'order' %}
67

78
{% for post in sorted_posts %}

_includes/sticky-nav.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<li><a href="{{ site.baseurl }}/about" {% if current[1] == 'about' %}class='current'{% endif %}>About</a></li>
2121
<li><a href="{{ site.baseurl }}/docs/cpp" {% if current[1] == 'cpp.html' %}class='current'{% endif %}>C++ Guide</a></li>
2222
<li><a href="{{ site.baseurl }}/tips/" {% if current[1] == 'tips' %}class='current'{% endif %}>C++ Tips</a></li>
23-
<li><a href="{{ site.baseurl }}/fast/" {% if current[1] == 'fast' %}class='current'{% endif %}Fast Tips</a></li>
23+
<li><a href="{{ site.baseurl }}/fast/" {% if current[1] == 'fast' %}class='current'{% endif %}>Fast Tips</a></li>
2424
<li><a href="{{ site.baseurl }}/docs/python" {% if current[1] == 'python.html' %}class='current'{% endif %}>Python Guide</a></li>
2525
<li><a href="{{ site.baseurl }}/blog/" {% if current[1] == 'blog' %}class='current'{% endif %}>Blog</a></li>
2626
<li><a href="{{ site.baseurl }}/community/" {% if current[1] == 'community' %}class='current'{% endif %}>Community</a></li>

_layouts/blog.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ <h1>{{page.title}}</h1>
2020
title="Subscribe to Abseil Blog &amp; Tips"
2121
rel="alternate"
2222
type="application/rss+xml">
23-
<img src="//feedburner.google.com/fb/images/pub/feed-icon32x32.png"
23+
<img src="//gstatic.com/ac/dashboard/feedburner-32.png"
2424
alt="Subscribe to the Abseil Blog" style="border:0;">
2525
</img>
2626
</a>

_layouts/fast.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h1>{{page.title}}</h1>
2121
title="Subscribe to Abseil Blog &amp; Tips"
2222
rel="alternate"
2323
type="application/rss+xml">
24-
<img src="//feedburner.google.com/fb/images/pub/feed-icon32x32.png"
24+
<img src="//gstatic.com/ac/dashboard/feedburner-32.png"
2525
alt="Subscribe to the Abseil Blog" style="border:0;">
2626
</img>
2727
</a>

_layouts/tips.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h1>{{page.title}}</h1>
2121
title="Subscribe to Abseil Blog &amp; Tips"
2222
rel="alternate"
2323
type="application/rss+xml">
24-
<img src="//feedburner.google.com/fb/images/pub/feed-icon32x32.png"
24+
<img src="//gstatic.com/ac/dashboard/feedburner-32.png"
2525
alt="Subscribe to the Abseil Blog" style="border:0;">
2626
</img>
2727
</a>

_posts/2017-09-26-totw-1.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,19 @@ void AlreadyHasCharStar(const char* s) {
9090

9191
Because the `string_view` does not own its data, any strings pointed to by the
9292
`string_view` (just like a `const char*`) must have a known lifespan, and must
93-
outlast the `string_view` itself. This means that using `string_view` for
94-
storage is often questionable: you need some proof that the underlying data will
95-
outlive the `string_view`.
93+
outlast the `string_view` itself.
94+
95+
This means that using `string_view` for storage is often questionable: you need
96+
some proof that the underlying data will outlive the `string_view`. For example,
97+
the following struct probably doesn't make sense if it might be stored beyond
98+
the result of a function call that accepts it as a parameter:
99+
100+
<pre class="prettyprint lang-cpp bad-code">
101+
struct TestScore {
102+
absl::string_view username; // Probably should be a `std::string`
103+
double score;
104+
};
105+
</pre>
96106

97107
If your API only needs to reference the string data during a single call, and
98108
doesn't need to modify the data, accepting a `string_view` is sufficient.

_posts/2018-02-15-totw-88.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ variable?", both to follow in your own code and to cite in your code reviews:
104104
```cpp
105105
// Bad code
106106

107-
// Could invoke an intializer list constructor, or a two-argument constructor.
107+
// Could invoke an initializer list constructor, or a two-argument constructor.
108108
Frobber frobber{size, &bazzer_to_duplicate};
109109

110110
// Makes a vector of two doubles.

_posts/2018-02-22-totw-93.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ Some of the benefits of using `Span` as a function parameter are similar to
4242
those of using `string_view`.
4343

4444
The caller can pass a slice of the original vector, or pass a plain array. It is
45-
also compatible with other array-like containers, like `InlinedVector`,
46-
`FixedArray`, `google::protobuf::RepeatedField`, etc.
45+
also compatible with other array-like containers, like `absl::InlinedVector`,
46+
`absl::FixedArray`, `google::protobuf::RepeatedField`, etc.
4747

4848
As with `string_view`, it is usually better to pass `Span` by value when used as
4949
a function parameter - this form is slightly faster, and produces smaller code.

_posts/2018-05-03-totw-148.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ order: "148"
1010

1111
Originally posted as TotW #148 on May 3, 2018
1212

13-
*By [Titus Winters](mailto:titus@google.com)*
13+
*By [Titus Winters](mailto:titus@cs.ucr.edu)*
1414

1515
Updated 2020-04-06
1616

_posts/2018-05-03-totw-149.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ order: "149"
1010

1111
Originally posted as TotW #149 on May 3, 2018
1212

13-
*By [Titus Winters](mailto:titus@google.com)*
13+
*By [Titus Winters](mailto:titus@cs.ucr.edu)*
1414

1515
Updated 2020-04-06
1616

@@ -188,8 +188,8 @@ expressed in those types, not in the APIs that operate on them.
188188
### Ref-qualification
189189

190190
As a side note: it's possible to apply the same reasoning for ref-qualifiers on
191-
destructive accessors. Consider a class like `std::stringbuf` - in C++20 it will
192-
gain an accessor to consume the contained string, presented as an overload set
191+
destructive accessors. Consider a class like `std::stringbuf` - in C++20 it
192+
gained an accessor to consume the contained string, presented as an overload set
193193
with the existing accessor:
194194

195195
<pre class="prettyprint lang-cpp code">

0 commit comments

Comments
 (0)