]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/ChangeLog
PR c/89045
[thirdparty/gcc.git] / libstdc++-v3 / ChangeLog
CommitLineData
f1074115 12019-01-24 Jonathan Wakely <jwakely@redhat.com>
2
4bc4fd90 3 PR libstdc++/88840
4 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
5 data member with static member function _S_use_relocate().
6 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
7 (vector::_M_default_append): Use _S_use_relocate() instead of
8 __use_relocate.
9
f1074115 10 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
11 sign of results.
12
1c4657a3 132019-01-22 Jonathan Wakely <jwakely@redhat.com>
14
15 PR libstdc++/88740
16 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
17 write to stderr instead of using printf.
18
dafe8c59 192019-01-21 Jakub Jelinek <jakub@redhat.com>
20
21 PR libstdc++/86590
22 * include/bits/char_traits.h (__constant_string_p,
23 __constant_char_array_p): Use __builtin_is_constant_evaluated if
24 available.
25
eaf966f3 262019-01-20 Ulrich Drepper <drepper@redhat.com>
27
28 Implement C++20 P0600r1.
29 * include/backward/hash_map: Add nodiscard attribute to empty.
30 * include/backward/hash_set: Likewise.
31 * backward/hashtable.h: Likewise.
32 * include/bits/basic_string.h: Likewise.
33 * include/bits/forward_list.h: Likewise.
34 * include/bits/hashtable.h: Likewise.
35 * include/bits/regex.h: Likewise.
36 * include/bits/stl_deque.h: Likewise.
37 * include/bits/stl_list.h: Likewise.
38 * include/bits/stl_map.h: Likewise.
39 * include/bits/stl_multimap.h: Likewise.
40 * include/bits/stl_multiset.h: Likewise.
41 * include/bits/stl_queue.h: Likewise.
42 * include/bits/stl_set.h: Likewise.
43 * include/bits/stl_stack.h: Likewise.
44 * include/bits/stl_tree.h: Likewise.
45 * include/bits/stl_vector.h: Likewise.
46 * include/bits/unordered_map.h: Likewise.
47 * include/bits/unordered_set.h: Likewise.
48 * include/debug/array: Likewise.
49 * include/experimental/any: Likewise.
50 * include/experimental/bits/fs_path.h: Likewise.
51 * include/experimental/internet: Likewise.
52 * include/experimental/string_view: Likewise.
53 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
54 Likewise.
55 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
56 Likewise.
57 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
58 Likewise.
59 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
60 Likewise.
61 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
62 Likewise.
63 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
64 Likewise.
65 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
66 Likewise.
67 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
68 Likewise.
69 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
70 info_fn_imps.hpp: Likewise.
71 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
72 left_child_next_sibling_heap_.hpp: Likewise.
73 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
74 Likewise.
75 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
76 Likewise.
77 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
78 Likewise.
79 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
80 Likewise.
81 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
82 Likewise.
83 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
84 Likewise.
85 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
86 Likewise.
87 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
88 * include/ext/pb_ds/trie_policy.hpp: Likewise.
89 * include/ext/rope: Likewise.
90 * include/ext/slist: Likewise.
91 * include/ext/vstring.h: Likewise.
92 * include/profile/array: Likewise.
93 * include/std/array: Likewise.
94 * include/tr1/array: Likewise.
95 * include/tr1/hashtable.h: Likewise.
96 * include/tr1/regex: Likewise.
97 * include/tr2/dynamic_bitset: Likewise.
98 * include/bits/alloc_traits.h: Add nodiscard attribute to
99 allocate.
100 * include/experimental/memory_resource: Likewise.
101 * include/ext/alloc_traits.h: Likewise.
102 * include/ext/array_allocator.h: Likewise.
103 * include/ext/bitmap_allocator.h: Likewise.
104 * include/ext/debug_allocator.h: Likewise.
105 * include/ext/extptr_allocator.h: Likewise.
106 * include/ext/mt_allocator.h: Likewise.
107 * include/ext/new_allocator.h: Likewise.
108 * include/ext/pool_allocator.h: Likewise.
109 * include/ext/throw_allocator.h: Likewise.
110 * include/std/scoped_allocator: Likewise.
111 * libsupc++/eh_alloc.cc: Likewise.
112 * include/std/future: Add nodiscard attribute to async.
113 * libsupc++/new: Add nodiscard attribute to new.
114
3c1c2a8c 1152019-01-18 Jonathan Wakely <jwakely@redhat.com>
116
117 PR libstdc++/87514
118 PR libstdc++/87520
119 PR libstdc++/88782
120 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
121 * include/bits/shared_ptr.h
122 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
123 (allocate_shared): Change to use new tag type.
124 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
125 Declare new member function.
126 (_Sp_alloc_shared_tag): Define new type.
127 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
128 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
129 _Sp_make_shared_tag::_S_eq to check type_info.
130 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
131 Constrain to prevent being called with _Sp_alloc_shared_tag.
132 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
133 Replace constructor with ...
134 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
135 reference parameter so address of the new object can be returned to
136 the caller. Obtain the allocator from the tag type.
137 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
138 constructor with ...
139 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
140 to the __shared_count constructor.
141 (__allocate_shared): Change to use new tag type.
142 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
143
21a962b2 1442019-01-17 Jonathan Wakely <jwakely@redhat.com>
145
464ac146 146 * src/c++17/fs_ops.cc
147 (equivalent(const path&, const path&, error_code&))
148 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
149 compare files instead of relying on incomplete info returned by stat.
150
2987a93d 151 PR libstdc++/88884
152 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
153 if the path is already absolute.
154 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
155 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
156
21a962b2 157 PR libstdc++/88881
158 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
159 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
160 of filesystem::exists.
161 (create_directories(const path&, error_code&)): Add assertions.
162 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
163 Add workaround for bug in _wstat for paths with trailing slash.
164 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
165 for expected behaviour on mingw.
166 * testsuite/experimental/filesystem/operations/create_directories.cc:
167 Likewise.
168 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
169 "TMP" instead of "TMPDIR" and clean environment before each test. Do
170 not test permissions on mingw targets.
171
93478c9f 1722019-01-16 Jonathan Wakely <jwakely@redhat.com>
173
174 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
175 constructors and open members taking wide strings. Fix patterns for
176 filesystem::path members to match wstring_view parameters. Add
177 exports for shared_ptr members used by directory iterators.
178 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
179 error code parameter if the file doesn't exist.
180 * src/filesystem/ops.cc (remove(const path&, error_code&)):
181 Likewise.
182 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
183 values for mingw targets, where "/" is not an absolute path. Do not
184 test symlinks on mingw targets.
185 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
186 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
187 on mingw targets.
188 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
189 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
190 that each component of the path is created.
191 * testsuite/experimental/filesystem/operations/create_directories.cc:
192 Likewise.
193 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
194 permissions on mingw targets.
195 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
196 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
197 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
198 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
199 mingw targets.
200 * testsuite/experimental/filesystem/operations/permissions.cc:
201 Likewise.
202 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
203 symlinks or permissions on mingw targets.
204 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
205 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
206 symlinks on mingw targets.
207 * testsuite/experimental/filesystem/operations/remove_all.cc:
208 Likewise.
209 * testsuite/27_io/filesystem/operations/status.cc: Do not test
210 permissions on mingw targets.
211 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
212 test symlinks on mingw targets.
213 * testsuite/experimental/filesystem/operations/space.cc: Fix test
214 for mingw targets.
215
af93b844 2162019-02-14 Ulrich Drepper <drepper@redhat.com>
217
218 PR libstdc++/88738
219 Warn about unused comparisons of shared_ptr/unique_ptr
220 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
221 * include/bits/shared_ptr.h: Use it for operator ==, !=,
222 <, <=, >, >= for shared_ptr.
223 * include/bits/unique_ptr.h: Likewise for unique_ptr.
224
8793c0de 2252019-01-15 Jonathan Wakely <jwakely@redhat.com>
226
afa61572 227 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
228 as 201611L, because P0497R0 changes are supported.
229 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
230
feb89906 231 * include/bits/erase_if.h [__cplusplus > 201703L]
232 (__cpp_lib_erase_if): Only define for C++2a.
233 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
234 (__cpp_lib_null_iterators): Define.
235 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
236 (__cpp_lib_null_iterators): Define.
237 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
238
d253bcb1 239 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
240 status.
241 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
242 Define.
243 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
244 changes are supported.
245 * include/std/optional (__cpp_lib_optional): Likewise.
246 * include/std/variant (__cpp_lib_variant): Likewise.
247 * include/std/version [!__STRICT_ANSI__]
248 (__cpp_lib_uncaught_exceptions): Define as long integer.
249 [__cplusplus >= 201703L] (__cpp_lib_any)
250 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
251 (__cpp_lib_variant): Define for C++17.
252 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
253 as long integer.
254 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
255 integer.
256
8793c0de 257 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
258
a8cd4b2b 2592019-01-12 Jonathan Wakely <jwakely@redhat.com>
260
261 PR libstdc++/88811
262 PR libstdc++/83306
263 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
264 before second path.
265 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
266 test.
267
a5b1332c 2682019-01-11 Jonathan Wakely <jwakely@redhat.com>
269
656ac8b7 270 * doc/xml/manual/intro.xml: Include new section.
271 * doc/xml/manual/status_cxx2017.xml: Document more
272 implementation-defined properties of the library.
273 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
274 * doc/html/*: Regenerate.
275
f5480b8c 276 * include/bits/refwrap.h [__cplusplus > 201703L]
277 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
278 (_Reference_wrapper_base_memfun): Do not define for C++2a.
279 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
280 for C++2a.
281 (reference_wrapper::operator()): Add static assertion.
282 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
283
36496c4d 284 * include/std/chrono (duration_values::zero(), duration_values::min())
285 (duration_values::max()): Add noexcept.
286 (duration::zero(), duration::min(), duration::max()): Likewise.
287 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
288 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
289 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
290
a5b1332c 291 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
292
d9de68bc 2932019-01-11 Jakub Jelinek <jakub@redhat.com>
294
295 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
296 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
297
beb370cb 2982019-01-11 Jonathan Wakely <jwakely@redhat.com>
299
1d628fd4 300 PR libstdc++/88802
301 * include/bits/functional_hash.h (hash<nullptr_t>): Define
302 specialization for C++17 (P0513R0, LWG 2817).
303 * testsuite/20_util/hash/nullptr.cc: New test.
304
a18b3766 305 PR libstdc++/88125
306 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
307 pattern for std::basic_stringbuf::str().
308
beb370cb 309 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
310 basic_ostream::operator<< patterns.
311
cbbb35ec 3122019-01-10 Jonathan Wakely <jwakely@redhat.com>
313
1715824b 314 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
315 test failures on targets with 32-bit time_t.
316
f5529091 317 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
318 * include/std/deque: Likewise.
319 * include/std/forward_list: Likewise.
320 * include/std/list: Likewise.
321 * include/std/string: Likewise.
322 * include/std/vector: Likewise.
323 * include/std/version: Likewise.
324 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
325 * testsuite/23_containers/deque/erasure.cc: Likewise.
326 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
327 * testsuite/23_containers/list/erasure.cc: Likewise.
328 * testsuite/23_containers/map/erasure.cc: Likewise.
329 * testsuite/23_containers/set/erasure.cc: Likewise.
330 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
331 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
332 * testsuite/23_containers/vector/erasure.cc: Likewise.
333
cbbb35ec 334 * include/experimental/internet [AI_NUMERICSERV]
335 (resolver_base::numeric_service): Define conditionally.
336 * testsuite/experimental/net/internet/resolver/base.cc: Test it
337 conditionally.
338 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
339 Likewise.
340
ac9a8436 3412019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
342 Jonathan Wakely <jwakely@redhat.com>
343
344 Implement LWG 2221
345 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
346 (GLIBCXX_3.4.26): Add new exports.
347 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
348 correct list of sources.
349 * include/Makefile.in: Regenerate.
350 * include/std/ostream (operator<<(nullptr_t)): New member function.
351 * src/c++17/ostream-inst.cc: New file.
352 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
353 test.
354
5f027941 3552019-01-10 Jonathan Wakely <jwakely@redhat.com>
356
357 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
358 of the source file containing the caller.
359 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
360 directories created by test.
361 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
362 Likewise.
363 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
364 Likewise.
365 * testsuite/experimental/filesystem/iterators/
366 recursive_directory_iterator.cc: Likewise.
367
3273d2e6 3682019-01-10 Jakub Jelinek <jakub@redhat.com>
369
370 PR tree-optimization/88775
371 * include/bits/stl_function.h (greater<_Tp*>::operator(),
372 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
373 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
374 instead of __builtin_constant_p if available. Don't bother with
375 the pointer comparison in C++11 and earlier.
376
f4d3c071 3772019-01-09 Sandra Loosemore <sandra@codesourcery.com>
378
379 PR other/16615
380
381 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
382 with "cannot".
383
8eba10af 3842019-01-09 Jonathan Wakely <jwakely@redhat.com>
385
6a6ade9f 386 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
387 for filesystem::path. Give variables more distinctive names.
388
41cda271 389 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
390 member function to perform non-trivial assignment.
391 (_Optional_payload_base::_M_move_assign): Likewise.
392 (_Optional_payload<T, true, false, true>::operator=)
393 (_Optional_payload<T, true, true, false>::operator=)
394 (_Optional_payload<T, true, false, false>::operator=): Call
395 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
396
8eba10af 397 PR libstdc++/88204
398 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
399 test std::complex<long double> if long double format is IBM128.
400 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
401 Likewise.
402
64a50f48 4032019-01-08 Jonathan Wakely <jwakely@redhat.com>
404
73f3ad16 405 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
406 for old std::unique_ptr layout.
407 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
408 to become valueless. Add filesystem::path tests.
409
58e897da 410 PR libstdc++/87855
411 * include/std/optional (_Optional_payload_base): New class template
412 for common code hoisted from _Optional_payload specializations. Use
413 a template for the union, to allow a partial specialization for
414 types with non-trivial destructors. Add constructors for in-place
415 initialization to the union.
416 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
417 to perform non-trivial copy construction, instead of relying on
418 non-standard copy elision in a delegating constructor.
419 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
420 non-trivial move construction.
421 (_Optional_payload): Derive from _Optional_payload_base and use it
422 for everything except the non-trivial assignment operators, which are
423 defined as needed.
424 (_Optional_payload<false, C, M>): Derive from the specialization
425 _Optional_payload<true, false, false> and add a destructor.
426 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
427 Forward to corresponding members of _Optional_payload.
428 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
429 Hoist common members from _Optional_base.
430 (_Optional_base): Make all members and base class public.
431 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
432 _Optional_base_impl.
433 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
434 support for new std::optional layout.
435 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
436
64a50f48 437 PR libstdc++/88066
438 * include/bits/locale_conv.h: Use <> for includes not "".
439 * include/ext/random: Likewise.
440 * include/ext/vstring.h: Likewise.
441
95b40931 4422019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
443
444 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
445 (GLIBCXX_3.4.21): Likewise.
446
fa00ec77 4472019-01-08 Jonathan Wakely <jwakely@redhat.com>
448
449 PR libstdc++/88749
450 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
451 to match the one that controls whether utimbuf and utime are declared.
452
3f304b2d 4532019-01-07 Jonathan Wakely <jwakely@redhat.com>
454
fc6ac813 455 PR libstdc++/87787
456 * include/bits/char_traits.h (char_traits::move): Do not pass null
457 pointers to memmove.
458 * include/bits/locale_facets.h
459 (ctype<char>::widen(const char*, const char*, char*)): Do not
460 pass null pointers to memcpy.
461 (ctype<char>::narrow(const char*, const char*, char, char*)):
462 Likewise.
463 (ctype<char>::do_widen(const char*, const char*, char*)):
464 Likewise.
465 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
466 Likewise.
467
bbc66c45 468 * doc/xml/manual/spine.xml: Update copyright years.
469 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
470 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
471 for C++17 filesystem library.
472 * doc/html/*: Regenerate.
473
3f304b2d 474 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
475 * config.h.in: Regenerate.
476 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
477 alphabetically and add missing entries for copy_symlink,
478 hard_link_count, rename, and resize_file.
479 * configure: Regenerate.
480 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
481 used unconditionally.
482 * src/filesystem/ops-common.h (__gnu_posix::truncate)
483 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
484 supports truncating to zero length.
485 * testsuite/27_io/filesystem/operations/all.cc: New test.
486 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
487
0ebb0980 4882019-01-06 Jonathan Wakely <jwakely@redhat.com>
489
3935f409 490 PR libstdc++/86756
491 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
492 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
493 * config.h.in: Regenerate.
494 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
495 remaining std::filesystem types and functions.
496 * configure: Regenerate.
497 * src/c++17/Makefile.am: Add C++17 filesystem sources.
498 * src/c++17/Makefile.in: Regenerate.
499 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
500 here, and change name of included file.
501 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
502 here, and change name of included file.
503 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
504 path to dir-common.h.
505 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
506 path to ops-common.h. Disable -Wunused-parameter warnings.
507 (internal_file_clock): Define unconditionally.
508 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
509 define.
510 (do_copy_file, do_space): Move definitions to ops.common.h.
511 (copy, file_size, hard_link_count, last_write_time, space): Only
512 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
513 report an error.
514 (last_write_time, read_symlink): Remove unused attributes from
515 parameters.
516 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
517 * src/filesystem/Makefile.in: Regenerate.
518 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
519 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
520 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
521 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
522 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
523 dummy types and functions instead of using #error.
524 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
525 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
526 in terms of stat.
527 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
528 (do_copy_file, do_space): Move definitions here from std-ops.cc.
529 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
530 to account for new namespace.
531 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
532 -lstdc++fs from dg-options.
533 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
534 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
535 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
536 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
537 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
538 Likewise.
539 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
540 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
541 Likewise.
542 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
543 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
544 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
545 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
546 * testsuite/27_io/filesystem/operations/create_directories.cc:
547 Likewise.
548 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
549 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
550 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
551 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
552 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
553 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
554 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
555 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
556 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
557 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
558 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
559 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
560 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
561 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
562 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
563 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
564 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
565 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
566 Likewise.
567 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
568
569
c6e37a9f 570 PR libstdc++/86756
571 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
572 typeinfo and vtables less greedy.
573 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
574 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
575 * src/c++17/Makefile.in: Regenerate.
576 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
577 here, and change name of included file.
578 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
579 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
580 from sources.
581 * src/filesystem/Makefile.in: Regenerate.
582 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
583 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
584 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
585 from dg-options and remove dg-require-filesystem-ts.
586 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
587 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
588 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
589 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
590 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
591 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
592 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
593 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
594 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
595 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
596 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
597 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
598 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
599 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
600 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
601 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
602 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
603 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
604 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
605 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
606 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
607 Likewise.
608 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
609 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
610 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
611 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
612 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
613 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
614 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
615 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
616 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
617 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
618 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
619 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
620 Likewise.
621 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
622 Likewise.
623 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
624 Likewise.
625 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
626 Likewise.
627 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
628 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
629 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
630 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
631 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
632 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
633 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
634 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
635 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
636 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
637 Likewise.
638 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
639 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
640 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
641 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
642 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
643
8815ac91 644 PR libstdc++/87431
645 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
646 Check is_trivially_copyable instead of is_scalar.
647 (variant::emplace<N, Args>(Args&&...)): If construction of the new
648 contained value can throw and its type is trivially copyable then
649 construct into a temporary variant and move from it, to provide the
650 strong exception safety guarantee.
651 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
652 Likewise.
653 * testsuite/20_util/variant/87431.cc: New test.
654 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
655 conversion causes valueless state.
656
0ebb0980 657 PR libstdc++/88607
658 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
659 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
660 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
661 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
662 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
663
adc6beee 6642019-01-05 Jonathan Wakely <jwakely@redhat.com>
665
666 * include/bits/fs_fwd.h (__file_clock): Define new clock.
667 (file_time_type): Redefine in terms of __file_clock.
668 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
669 overflow.
670 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
671 internal linkage.
672 (internal_file_lock): New helper type for accessing __file_clock.
673 (do_copy_file): Use internal_file_lock to convert system time to
674 file_time_type.
675 (last_write_time(const path&, error_code&)): Likewise.
676 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
677
6b4a77f2 6782019-01-04 Jonathan Wakely <jwakely@redhat.com>
679
98185b9f 680 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
681 for const member functions of std::basic_string.
682 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
683 in C++17.
684 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
685 Make non-standard constructor private.
686 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
687 Likewise.
688 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
689 explicit instantiations for C++17 as well as earlier dialects.
690 * src/c++17/Makefile.am: Add new source files.
691 * src/c++17/Makefile.in: Regenerate.
692 * src/c++17/cow-string-inst.cc: New file defining explicit
693 instantiations for basic_string member functions added in C++17.
694 * src/c++17/string-inst.cc: Likewise.
695
859e6fed 696 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
697 copy/move constructors for old std::basic_string.
698 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
699 (basic_string::reference, basic_string::const_reference): Define
700 as plain references for C++11 and later.
701 (basic_string::basic_string()): Put constructor body outside
702 preprocessor conditional groups.
703 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
704 instead of copying it.
705 (basic_string::basic_string(const basic_string&, const _Alloc&)):
706 Define.
707 (basic_string::basic_string(basic_string&&, const _Alloc&)):
708 Define.
709 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
710 cases for old basic_string.
711 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
712 allocator-extended constructors unconditionally. Add extra members to
713 allocator type when using old string ABI.
714 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
715 for old string ABI.
716 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
717
e13f6a7f 718 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
719 -fno-inline added to test flags.
720
a18fccd0 721 * testsuite/21_strings/basic_string/requirements/
722 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
723
7f77ca07 724 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
725 assertion failures with old std::string ABI.
726
9346fb0e 727 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
728 with ...
729 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
730 functions that will only erase elements at the end.
731 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
732 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
733 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
734 of erase(p, end()).
735 (path::_List::pop_back()): Define.
736 (path::_List::_M_erase_from(const_iterator)): Define.
737 (path::operator/=(const path&)): Use pop_back to remove last component
738 and _M_erase_from to remove multiple components.
739 (path::_M_append(basic_string_view<value_type>)): Likewise.
740 (path::operator+=(const path&)): Likewise.
741 (path::_M_concat(basic_string_view<value_type>)): Likewise.
742 (path::remove_filename()): Likewise.
743 (path::lexically_normal()): Use _List::_Impl iterators instead of
744 path::iterator. Use pop_back to remove components from the end. Clear
745 trailing filename, instead of using erase(const_iterator) to remove
746 a non-final component.
747 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
748 additional cases.
749 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
750
24230cab 751 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
752 incorrect treatment of empty filename after trailing slash.
753 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
754
6b4a77f2 755 * testsuite/21_strings/basic_string/modifiers/assign/char/
756 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
757 to test flags.
758 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
759 move_assign_optim.cc: Likewise.
760
02df5941 7612019-01-03 Jonathan Wakely <jwakely@redhat.com>
762 Jakub Jelinek <jakub@redhat.com>
763
764 PR libstdc++/88607
765 * include/experimental/memory: Replace UTF-8 quote characters.
766 * include/std/future: Replace UTF-8 "em dash" characters.
767
f8ad40d8 7682019-01-03 Jonathan Wakely <jwakely@redhat.com>
769
9013258b 770 PR libstdc++/88607
771 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
772 * include/debug/forward_list: Likewise.
773 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
774 character.
775 * include/experimental/chrono: Likewise.
776 * include/experimental/functional: Likewise.
777 * include/experimental/ratio: Likewise.
778 * include/experimental/system_error: Likewise.
779 * include/experimental/tuple: Likewise.
780 * include/experimental/type_traits: Likewise.
781 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
782 * include/parallel/multiseq_selection.h: Likewise.
783
f8ad40d8 784 PR libstdc++/88681
785 * config/abi/pre/gnu.ver: Add missing exports.
786 * testsuite/22_locale/collate_byname/88681.cc: New test.
787 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
788 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
789
138292f4 7902019-01-02 Jonathan Wakely <jwakely@redhat.com>
791
553d41a8 792 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
793 initializer_list<value_type> and from input iterator ranges.
794 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
795
138292f4 796 * testsuite/experimental/string_view/element_access/char/empty.cc:
797 Fix year range in copyright header.
798
963c0125 7992019-01-02 Joel Brobecker <brobecker@adacore.com>
800
801 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
802 Fix year range in copyright header.
803
fbd26352 8042019-01-01 Jakub Jelinek <jakub@redhat.com>
d353bf18 805
806 Update copyright years.
fb96fbb3 807\f
fbd26352 808Copyright (C) 2019 Free Software Foundation, Inc.
fb96fbb3 809
810Copying and distribution of this file, with or without modification,
811are permitted in any medium without royalty provided the copyright
812notice and this notice are preserved.