summaryrefslogtreecommitdiff
path: root/chromium/styleguide/c++/c++11.html
blob: 633c649666bdd414d375b3aca44a7aac7f68c029 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
<!DOCTYPE html>
<!--
Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<html>
<head>
<meta charset="utf-8">
<title>Modern C++ use in Chromium</title>
<link rel="stylesheet" href="c++11.css">
<style>
table tbody tr td:first-child {
  font-weight: bold;
  font-size: 110%;
}
</style>
</head>
<body>
<div id="content">
<h1>Modern C++ use in Chromium</h1>

<p><i>This document lives at src/styleguide/c++/c++11.html in a Chromium
checkout and is part of the more general
<a href="https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md">
Chromium C++ style guide</a>. It summarizes the supported state of new and
updated language and library features in recent C++ standards and the
<a href="https://abseil.io/about/">Abseil</a> library. This guide
applies to both Chromium and its subprojects, though subprojects can choose to
be more restrictive if necessary for toolchain support.</i></p>

<p>The C++ language has in recent years received an updated standard every three
years (C++11, C++14, C++17). For various reasons, Chromium does not immediately
allow new features on the publication of such a standard. Instead, once
toolchain support is sufficient, a standard is declared "initially supported",
with new language/library features banned pending discussion.</p>

<p>You can propose changing the status of a feature by sending an email to
<a href="https://groups.google.com/a/chromium.org/forum/#!forum/cxx">
cxx@chromium.org</a>. Include a short blurb on what the feature is and why you
think it should or should not be allowed, along with links to any relevant
previous discussion. If the list arrives at some consensus, send a codereview to
change this file accordingly, linking to your discussion thread.</p>

<p>If an item remains on the TBD list two years after initial support is added,
style arbiters should explicitly move it to an appropriate allowlist or blocklist,
allowing it if there are no obvious reasons to ban.
The current status of existing standards and Abseil features is:

<ul><li><b>C++11:</b> <i>Default allowed; see banned features below</i></li>
<li><b>C++14:</b> <i>Default allowed; see banned features below</i></li>
<li><b>C++17:</b> <i>Not yet supported in Chromium, unlikely before mid-2021; <a href="http://crbug.com/752720">tracking bug</a></i></li>
<li><b>C++20:</b> <i>Not yet standardized</i></li>
<li><b>Abseil:</b> Initially supported July 31, 2020; see allowed/banned/TBD features below</li>
</ul></p>


<h2>Table of Contents</h2>
<ol class="toc">
<li>Allowed Features<ol>
    <li>Library
      <a href="#absl-allowlist">Abseil</a>
    </li>
</ol></li>
<li>Banned Features<ol>
    <li>Language
      <a href="#core-blocklist">C++11</a>
    </li>
    <li>Library
      <a href="#library-blocklist">C++11</a>
      <a href="#library-blocklist-14">C++14</a>
      <a href="#absl-blocklist">Abseil</a>
    </li>
</ol></li>
<li>To Be Discussed<ol>
    <li>Library
      <a href="#absl-review">Abseil</a>
    </li>
</ol></li>
</li>
</ol>

<h2 id="blocklist_banned"><a name="core-blocklist"></a>C++11 Banned Language Features</h2>

<p>The following C++11 language features are not allowed in the Chromium codebase.</p>

<table id="banned_list" class="unlined striped">
<tbody>

<tr>
<th style='width:240px;'>Feature or Library</th>
<th style='width:240px;'>Snippet</th>
<th style='width:240px;'>Description</th>
<th style='width:240px;'>Documentation Link</th>
<th style='width:240px;'>Notes and Discussion Thread</th>
</tr>

<tr>
<td>Inline Namespaces</td>
<td><code>inline namespace foo { ... }</code></td>
<td>Allows better versioning of namespaces</td>
<td><a href="http://en.cppreference.com/w/cpp/language/namespace#Inline_namespaces">Inline namespaces</a></td>
<td>Banned in the <a href="https://google.github.io/styleguide/cppguide.html#Namespaces">Google Style Guide</a>. Unclear how it will work with components.</td>
</tr>

<tr>
<td><code>long long</code> Type</td>
<td><code>long long <i>var</i> = <i>value</i>;</code></td>
<td>An integer of at least 64 bits</td>
<td><a href="http://en.cppreference.com/w/cpp/language/types">Fundamental types</a></td>
<td>Use a stdint.h type if you need a 64-bit number. <a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/RxugZ-pIDxk">Discussion thread</a></td>
</tr>

<tr>
<td>User-Defined Literals</td>
<td><code><i>type</i> <i>var</i> = <i>literal_value</i>_<i>type</i></code></td>
<td>Allows user-defined literal expressions</td>
<td><a href="http://en.cppreference.com/w/cpp/language/user_literal">User-defined literals</a></td>
<td>Banned in the <a href="https://google.github.io/styleguide/cppguide.html#Operator_Overloading">Google Style Guide</a>.</td>
</tr>

<tr>
<td>thread_local storage class</td>
<td><code>thread_local int foo = 1;</code></td>
<td>Puts variables into thread local storage.</td>
<td><a href="http://en.cppreference.com/w/cpp/language/storage_duration">Storage duration</a></td>
<td>Some surprising effects on Mac (<a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/2msN8k3Xzgs">discussion</a>, <a href="https://groups.google.com/a/chromium.org/forum/#!topic/cxx/h7O5BdtWCZw">fork</a>). Use <code>base::SequenceLocalStorageSlot</code> for sequence support, and <code>base::ThreadLocal</code>/<code>base::ThreadLocalStorage</code> otherwise.</td>
</tr>

</tbody>
</table>

<h2 id="blocklist_stdlib"><a name="library-blocklist"></a>C++11 Banned Library Features</h2>

<p>The following C++11 library features are not allowed in the Chromium codebase.</p>

<table id="blocklist_lib_list" class="unlined striped">
<tbody>

<tr>
<th style='width:240px;'>Feature</th>
<th style='width:240px;'>Snippet</th>
<th style='width:240px;'>Description</th>
<th style='width:240px;'>Documentation Link</th>
<th style='width:240px;'>Notes and Discussion Thread</th>
</tr>

<td>Bind Operations</td>
<td><code>std::bind(<i>function</i>, <i>args</i>, ...)</code></td>
<td>Declares a function object bound to certain arguments</td>
<td><a href="http://en.cppreference.com/w/cpp/utility/functional/bind">std::bind</a></td>
<td>Use <code>base::Bind</code> instead. Compared to <code>std::bind</code>, <code>base::Bind</code> helps prevent lifetime issues by preventing binding of capturing lambdas and by forcing callers to declare raw pointers as <code>Unretained</code>. <a href="https://groups.google.com/a/chromium.org/forum/#!topic/cxx/SoEj7oIDNuA">Discussion thread</a></td>
</tr>

<tr>
<td>C Floating-Point Environment</td>
<td><code>&lt;cfenv&gt;</code>, <code>&lt;fenv.h&gt;</code></td>
<td>Provides floating point status flags and control modes for C-compatible code</td>
<td><a href="http://en.cppreference.com/w/cpp/header/cfenv">Standard library header &lt;cfenv&gt;</a></td>
<td>Banned by the <a href="https://google.github.io/styleguide/cppguide.html#C++11">Google Style Guide</a> due to concerns about compiler support.</td>
</tr>

<tr>
<td>Date and time utilities</td>
<td><code>&lt;chrono&gt;</code></td>
<td>A standard date and time library</td>
<td><a href="http://en.cppreference.com/w/cpp/chrono">Date and time utilities</a></td>
<td>Overlaps with <code>Time</code> APIs in <code>base/</code>. Keep using the <code>base/</code> classes.</td>
</tr>

<tr>
<td>Exceptions</td>
<td><code>&lt;exception&gt;</code></td>
<td>Enhancements to exception throwing and handling</td>
<td><a href="http://en.cppreference.com/w/cpp/header/exception">Standard library header &lt;exception&gt;</a></td>
<td>Exceptions are banned by the <a href="https://google.github.io/styleguide/cppguide.html#Exceptions">Google Style Guide</a> and disabled in Chromium compiles. However, the <code>noexcept</code> specifier is explicitly allowed. <a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/8i4tMqNpHhg">Discussion thread</a></td>
</tr>

<tr>
<td>Function Objects</td>
<td><code>std::function</code></td>
<td>Wraps a standard polymorphic function</td>
<td><a href="http://en.cppreference.com/w/cpp/utility/functional/function">std::function</a></td>
<td>Use <code>base::Callback</code> instead. Compared to <code>std::function</code>, <code>base::Callback</code> directly supports Chromium's refcounting classes and weak pointers and deals with additional thread safety concerns. <a href="https://groups.google.com/a/chromium.org/forum/#!topic/cxx/SoEj7oIDNuA">Discussion thread</a></td>
</tr>

<tr>
<td>Random Number Engines</td>
<td>The random number engines defined in <code>&lt;random&gt;</code> (see separate item for random number distributions), e.g.:<br/>
<code>linear_congruential_engine</code>, <code>mersenne_twister_engine</code><br/>
<code>minstd_rand0</code>, <code>mt19937</code>, <code>ranlinux48</code><br/>
<code>random_device</code>
</td>
<td>Random number generation algorithms and utilities.</td>
<td><a href="http://en.cppreference.com/w/cpp/numeric/random">Pseudo-random number generation</a></td>
<td>Do not use any random number engines from <code>&lt;random&gt;</code>. Instead, use <code>base::RandomBitGenerator</code>. <a href="https://groups.google.com/a/chromium.org/forum/#!topic/cxx/16Xmw05C-Y0">Discussion thread</a></td>
</tr>

<tr>
<td>Ratio Template Class</td>
<td><code>std::ratio&lt;<i>numerator</i>, <i>denominator</i>&gt;</code></td>
<td>Provides compile-time rational numbers</td>
<td><a href="http://en.cppreference.com/w/cpp/numeric/ratio/ratio">std::ratio</a></td>
<td>Banned by the <a href="https://google.github.io/styleguide/cppguide.html#C++11">Google Style Guide</a> due to concerns that this is tied to a more template-heavy interface style.</td>
</tr>

<tr>
<td>Regular Expressions</td>
<td><code>&lt;regex&gt;</code></td>
<td>A standard regular expressions library</td>
<td><a href="http://en.cppreference.com/w/cpp/regex">Regular expressions library</a></td>
<td>Overlaps with many regular expression libraries in Chromium. When in doubt, use re2.</td>
</tr>

<tr>
<td>Shared Pointers</td>
<td><code>std::shared_ptr</code></td>
<td>Allows shared ownership of a pointer through reference counts</td>
<td><a href="http://en.cppreference.com/w/cpp/memory/shared_ptr">std::shared_ptr</a></td>
<td>Needs a lot more evaluation for Chromium, and there isn't enough of a push for this feature. <a href="https://google.github.io/styleguide/cppguide.html#Ownership_and_Smart_Pointers">Google Style Guide</a>. <a href="https://groups.google.com/a/chromium.org/forum/#!topic/cxx/aT2wsBLKvzI">Discussion Thread</a></td>
</tr>

<tr>
<td>String-Number Conversion Functions</td>
<td><code>std::stoi()</code>, <code>std::stol()</code>, <code>std::stoul()</code>, <code>std::stoll</code>, <code>std::stoull()</code>, <code>std::stof()</code>, <code>std::stod()</code>, <code>std::stold()</code>, <code>std::to_string()</code></td>
<td>Converts strings to/from numbers</td>
<td><a href="http://en.cppreference.com/w/cpp/string/basic_string/stol">std::stoi, std::stol, std::stoll</a>, <a href="http://en.cppreference.com/w/cpp/string/basic_string/stoul">std::stoul, std::stoull</a>, <a href="http://en.cppreference.com/w/cpp/string/basic_string/stof">std::stof, std::stod, std::stold</a>, <a href="http://en.cppreference.com/w/cpp/string/basic_string/to_string">std::to_string</a></td>
<td>The string-to-number conversions rely on exceptions to communicate failure, while the number-to-string conversions have performance concerns and depend on the locale.  Use the routines in <code>base/strings/string_number_conversions.h</code> instead.</td>
</tr>

<tr>
<td>Thread Library</td>
<td><code>&lt;thread&gt;</code> and related headers, including<br />
<code>&lt;future&gt;</code>, <code>&lt;mutex&gt;</code>, <code>&lt;condition_variable&gt;</code></td>
<td>Provides a standard multithreading library using <code>std::thread</code> and associates</td>
<td><a href="http://en.cppreference.com/w/cpp/thread">Thread support library</a></td>
<td>Overlaps with many classes in <code>base/</code>. Keep using the <code>base/</code> classes for now. <code>base::Thread</code> is tightly coupled to <code>MessageLoop</code> which would make it hard to replace. We should investigate using standard mutexes, or unique_lock, etc. to replace our locking/synchronization classes.</td>
</tr>

<tr>
<td>Weak Pointers</td>
<td><code>std::weak_ptr</code></td>
<td>Allows a weak reference to a <code>std::shared_ptr</code></td>
<td><a href="http://en.cppreference.com/w/cpp/memory/weak_ptr">std::weak_ptr</a></td>
<td>Banned because <code>std::shared_ptr</code> is banned.  Use <code>base::WeakPtr</code> instead.</td>
</tr>

</tbody>
</table>

<h2 id="blocklist_stdlib"><a name="library-blocklist-14"></a>C++14 Banned Library Features</h2>

<p>The following C++14 library features are not allowed in the Chromium codebase.</p>

<table id="blocklist_lib_list" class="unlined striped">
<tbody>

<tr>
<th style='width:240px;'>Feature</th>
<th style='width:240px;'>Snippet</th>
<th style='width:240px;'>Description</th>
<th style='width:240px;'>Documentation Link</th>
<th style='width:240px;'>Notes and Discussion Thread</th>
</tr>

<tr>
<td><code>std::chrono</code> literals</td>
<td><code>using namespace std::chrono_literals;<br>auto timeout = 30s;</code></td>
<td>Allows <code>std::chrono</code> types to be more easily constructed.</td>
<td><a href="http://en.cppreference.com/w/cpp/chrono/operator%22%22s">std::literals::chrono_literals::operator""s</a></td>
<td>Banned because <code>&lt;chrono&gt;</code> is banned.</td>
</tr>

</tbody>
</table>

<h2 id="allowlist_abseil"><a name="absl-allowlist"></a>Abseil Allowed Library Features</h2>

<p>The following Abseil library features are allowed in the Chromium codebase.</p>

<table id="allowlist_abseil_list" class="unlined striped">
<tbody>

<tr>
<th style='width:240px;'>Feature</th>
<th style='width:240px;'>Snippet</th>
<th style='width:240px;'>Description</th>
<th style='width:240px;'>Documentation Link</th>
<th style='width:240px;'>Notes and Discussion Thread</th>
</tr>

<tr>
<td>Variant</td>
<td><code>absl::variant</code></td>
<td>Early adaptation of C++17 std::variant.</td>
<td><a href="https://en.cppreference.com/w/cpp/utility/variant">std::variant</a></td>
<td><a href="https://groups.google.com/a/chromium.org/g/cxx/c/DqvG-TpvMyU">Discussion thread</a></td>
</tr>

</tbody>
</table>

<h2 id="blocklist_absl"><a name="absl-blocklist"></a>Abseil Banned Library Features</h2>

<p>The following Abseil library features are not allowed in the Chromium codebase.</p>

<table id="blocklist_absl_list" class="unlined striped">
<tbody>

<tr>
<th style='width:240px;'>Feature</th>
<th style='width:240px;'>Snippet</th>
<th style='width:240px;'>Description</th>
<th style='width:240px;'>Documentation Link</th>
<th style='width:240px;'>Notes and Discussion Thread</th>
</tr>

<tr>
<td>Any</td>
<td><code>absl::any a = int{5};
<br>EXPECT_THAT(absl::any_cast&lt;int&gt;(&a), Pointee(5));
<br>EXPECT_EQ(absl::any_cast&lt;size_t&gt;(&a), nullptr);</code></td>
<td>Early adaptation of C++17 std::any.</td>
<td><a href="https://en.cppreference.com/w/cpp/utility/any">std::any</a></td>
<td>Banned since workaround for lack of RTTI isn't compatible with the component build. <a href="http://crbug.com/1096380">Bug</a></td>
</tr>

<tr>
<td>Command line flags</td>
<td><code>ABSL_FLAG(bool, logs, false, "print logs to stderr");<br>app --logs=true;</code></td>
<td>Allows programmatic access to flag values passed on the command-line to binaries.</td>
<td><a href="https://abseil.io/docs/cpp/guides/flags">Flags Library</a></td>
<td>Banned since workaround for lack of RTTI isn't compatible with the component build. <a href="http://crbug.com/1096380">Bug</a><br>
Use <code>base::CommandLine</code> instead.</td>
</tr>

<tr>
<td>Span</td>
<td><code>absl::Span</code></td>
<td>Early adaptation of C++20 std::span.</td>
<td><a href="https://abseil.io/tips/93">Using absl::Span</a></td>
<td>Banned due to being less std::-compliant than <code>base::span</code>.
<br>Keep using <code>base::span</code>.</td>
</tr>

<tr>
<td>string_view</td>
<td><code>absl::string_view</code></td>
<td>Early adaptation of C++17 std::string_view.</td>
<td><a href="https://abseil.io/tips/1">absl::string_view</a></td>
<td>Banned due to only working with 8-bit characters.
Keep using <code>base::StringPiece</code> from <code>base/strings/</code>.</td>
</tr>

</tbody>
</table>

<h2 id="review_abseil"><a name="absl-review"></a>Abseil TBD Features</h2>

<p>The following Abseil library features are not allowed in the Chromium codebase.
See the top of this page on how to propose moving a feature from this list into
the allowed or banned sections.</p>

<table id="absl_review_list" class="unlined striped">
<tbody>

<tr>
<th style='width:240px;'>Feature</th>
<th style='width:240px;'>Snippet</th>
<th style='width:240px;'>Description</th>
<th style='width:240px;'>Documentation Link</th>
<th style='width:240px;'>Notes and Discussion Thread</th>
</tr>

<tr>
<td>128bit integer</td>
<td><code>uint64_t a;<br>absl::uint128 v = a;</code></td>
<td>Signed and unsigned 128-bit integer types meant to mimic intrinsic types as closely as possible.</td>
<td><a href="https://abseil.io/docs/cpp/guides/numeric">Numerics</a></td>
<td></td>
</tr>

<tr>
<td>bind_front</td>
<td><code>absl::bind_front</code></td>
<td>Binds the first N arguments of an invocable object and stores them by value.</td>
<td><a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/abseil-cpp/absl/functional/bind_front.h">bind_front.h</a>
<br><a href="https://abseil.io/tips/108">Avoid std::bind</a></td>
<td>Overlaps with <code>base::Bind</code>.</td>
</tr>

<tr>
<td>Containers</td>
<td><code>absl::flat_hash_map, absl::flat_hash_set,<br>absl::node_hash_map, absl::node_hash_set,<br>
absl::btree_map, absl::btree_set,<br>absl::btree_multimap, absl::btree_multiset,<br>
absl::InlinedVector, absl::FixedArray</code></td>
<td>Alternatives to STL containers designed to be more efficient in the general case.</td>
<td><a href="https://abseil.io/docs/cpp/guides/container">Containers</a><br>
<a href="https://abseil.io/docs/cpp/guides/hash">Hash</a></td>
<td>Supplements <code>base/containers/</code>.</td>
</tr>

<tr>
<td>Container utilities</td>
<td><code>auto it = absl::c_find(container, value);</code></td>
<td>Container-based versions of algorithmic functions within C++ standard library.</td>
<td><a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/abseil-cpp/absl/algorithm/container.h">container.h</a></td>
<td>Overlaps with <code>base/util/ranges/algorithm.h</code>.</td>
</tr>

<tr>
<td>FunctionRef</td>
<td><code>absl::FunctionRef</code></td>
<td>Type for holding a non-owning reference to an object of any invocable type.</td>
<td><a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/abseil-cpp/absl/functional/function_ref.h">function_ref.h</a></td>
<td></td>
</tr>

<tr>
<td>Optional</td>
<td><code>absl::optional</code></td>
<td>Early adaptation of C++17 std::optional.</td>
<td><a href="https://en.cppreference.com/w/cpp/utility/optional">std::optional</a></td>
<td>Overlaps with <code>base::Optional</code>.</td>
</tr>

<tr>
<td>Random</td>
<td><code>absl::BitGen bitgen;<br>
size_t index = absl::Uniform(bitgen, 0u, elems.size());</code></td>
<td>Functions and utilities for generating pseudorandom data.</td>
<td><a href="https://abseil.io/docs/cpp/guides/random">Random library</a></td>
<td>Overlaps with <code>base/rand_util.h</code>.</td>
</tr>

<tr>
<td>Status</td>
<td><code>absl::Status</code></td>
<td>Type for returning detailed errors.</td>
<td><a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/abseil-cpp/absl/status/status.h">status.h</a></td>
<td></td>
</tr>

<tr>
<td>String Formatting</td>
<td><code>absl::StrFormat</code>
<td>A typesafe replacement for the family of printf() string formatting routines.</td>
<td><a href="https://abseil.io/docs/cpp/guides/format">String Formatting</a>
<td></td>
</tr>

<tr>
<td>Strings Library</td>
<td><code>absl::StrSplit, absl::StrJoin,<br> absl::StrCat, absl::StrAppend,<br> absl::Substitute, absl::StrContains</code></td>
<td>Classes and utility functions for manipulating and comparing strings.</td>
<td><a href="https://abseil.io/docs/cpp/guides/strings">String Utilities</a>
<td>Overlaps with <code>base/strings</code>.</td>
</tr>

<tr>
<td>Synchronization</td>
<td><code>absl::Mutex</code></td>
<td>Primitives for managing tasks across different threads.</td>
<td><a href="https://abseil.io/docs/cpp/guides/synchronization">Synchronization</a></td>
<td>Overlaps with <code>Lock</code> in <code>base/synchronization/</code>.</td>
</tr>

<tr>
<td>Time library</td>
<td><code>absl::Duration, absl::Time,<br> absl::TimeZone, absl::CivilDay</code></td>
<td>Abstractions for holding time values, both in terms of absolute time and civil time.</td>
<td><a href="https://abseil.io/docs/cpp/guides/time">Time</a></td>
<td>Overlaps with <code>Time</code> APIs in <code>base/</code>.</td>
</tr>

</tbody>
</table>

</div>
</body>
</html>