1 2019-02-14 Ulrich Drepper <drepper@redhat.com>
4 Warn about unused comparisons of shared_ptr/unique_ptr
5 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
6 * include/bits/shared_ptr.h: Use it for operator ==, !=,
7 <, <=, >, >= for shared_ptr.
8 * include/bits/unique_ptr.h: Likewise for unique_ptr.
10 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
12 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
13 as 201611L, because P0497R0 changes are supported.
14 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
16 * include/bits/erase_if.h [__cplusplus > 201703L]
17 (__cpp_lib_erase_if): Only define for C++2a.
18 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
19 (__cpp_lib_null_iterators): Define.
20 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
21 (__cpp_lib_null_iterators): Define.
22 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
24 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
26 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
28 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
29 changes are supported.
30 * include/std/optional (__cpp_lib_optional): Likewise.
31 * include/std/variant (__cpp_lib_variant): Likewise.
32 * include/std/version [!__STRICT_ANSI__]
33 (__cpp_lib_uncaught_exceptions): Define as long integer.
34 [__cplusplus >= 201703L] (__cpp_lib_any)
35 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
36 (__cpp_lib_variant): Define for C++17.
37 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
39 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
42 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
44 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
48 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
50 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
53 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
55 * doc/xml/manual/intro.xml: Include new section.
56 * doc/xml/manual/status_cxx2017.xml: Document more
57 implementation-defined properties of the library.
58 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
59 * doc/html/*: Regenerate.
61 * include/bits/refwrap.h [__cplusplus > 201703L]
62 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
63 (_Reference_wrapper_base_memfun): Do not define for C++2a.
64 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
66 (reference_wrapper::operator()): Add static assertion.
67 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
69 * include/std/chrono (duration_values::zero(), duration_values::min())
70 (duration_values::max()): Add noexcept.
71 (duration::zero(), duration::min(), duration::max()): Likewise.
72 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
73 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
74 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
76 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
78 2019-01-11 Jakub Jelinek <jakub@redhat.com>
80 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
81 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
83 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
86 * include/bits/functional_hash.h (hash<nullptr_t>): Define
87 specialization for C++17 (P0513R0, LWG 2817).
88 * testsuite/20_util/hash/nullptr.cc: New test.
91 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
92 pattern for std::basic_stringbuf::str().
94 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
95 basic_ostream::operator<< patterns.
97 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
99 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
100 test failures on targets with 32-bit time_t.
102 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
103 * include/std/deque: Likewise.
104 * include/std/forward_list: Likewise.
105 * include/std/list: Likewise.
106 * include/std/string: Likewise.
107 * include/std/vector: Likewise.
108 * include/std/version: Likewise.
109 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
110 * testsuite/23_containers/deque/erasure.cc: Likewise.
111 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
112 * testsuite/23_containers/list/erasure.cc: Likewise.
113 * testsuite/23_containers/map/erasure.cc: Likewise.
114 * testsuite/23_containers/set/erasure.cc: Likewise.
115 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
116 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
117 * testsuite/23_containers/vector/erasure.cc: Likewise.
119 * include/experimental/internet [AI_NUMERICSERV]
120 (resolver_base::numeric_service): Define conditionally.
121 * testsuite/experimental/net/internet/resolver/base.cc: Test it
123 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
126 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
127 Jonathan Wakely <jwakely@redhat.com>
130 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
131 (GLIBCXX_3.4.26): Add new exports.
132 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
133 correct list of sources.
134 * include/Makefile.in: Regenerate.
135 * include/std/ostream (operator<<(nullptr_t)): New member function.
136 * src/c++17/ostream-inst.cc: New file.
137 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
140 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
142 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
143 of the source file containing the caller.
144 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
145 directories created by test.
146 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
148 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
150 * testsuite/experimental/filesystem/iterators/
151 recursive_directory_iterator.cc: Likewise.
153 2019-01-10 Jakub Jelinek <jakub@redhat.com>
155 PR tree-optimization/88775
156 * include/bits/stl_function.h (greater<_Tp*>::operator(),
157 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
158 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
159 instead of __builtin_constant_p if available. Don't bother with
160 the pointer comparison in C++11 and earlier.
162 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
166 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
169 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
171 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
172 for filesystem::path. Give variables more distinctive names.
174 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
175 member function to perform non-trivial assignment.
176 (_Optional_payload_base::_M_move_assign): Likewise.
177 (_Optional_payload<T, true, false, true>::operator=)
178 (_Optional_payload<T, true, true, false>::operator=)
179 (_Optional_payload<T, true, false, false>::operator=): Call
180 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
183 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
184 test std::complex<long double> if long double format is IBM128.
185 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
188 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
190 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
191 for old std::unique_ptr layout.
192 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
193 to become valueless. Add filesystem::path tests.
196 * include/std/optional (_Optional_payload_base): New class template
197 for common code hoisted from _Optional_payload specializations. Use
198 a template for the union, to allow a partial specialization for
199 types with non-trivial destructors. Add constructors for in-place
200 initialization to the union.
201 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
202 to perform non-trivial copy construction, instead of relying on
203 non-standard copy elision in a delegating constructor.
204 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
205 non-trivial move construction.
206 (_Optional_payload): Derive from _Optional_payload_base and use it
207 for everything except the non-trivial assignment operators, which are
209 (_Optional_payload<false, C, M>): Derive from the specialization
210 _Optional_payload<true, false, false> and add a destructor.
211 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
212 Forward to corresponding members of _Optional_payload.
213 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
214 Hoist common members from _Optional_base.
215 (_Optional_base): Make all members and base class public.
216 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
218 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
219 support for new std::optional layout.
220 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
223 * include/bits/locale_conv.h: Use <> for includes not "".
224 * include/ext/random: Likewise.
225 * include/ext/vstring.h: Likewise.
227 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
229 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
230 (GLIBCXX_3.4.21): Likewise.
232 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
235 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
236 to match the one that controls whether utimbuf and utime are declared.
238 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
241 * include/bits/char_traits.h (char_traits::move): Do not pass null
243 * include/bits/locale_facets.h
244 (ctype<char>::widen(const char*, const char*, char*)): Do not
245 pass null pointers to memcpy.
246 (ctype<char>::narrow(const char*, const char*, char, char*)):
248 (ctype<char>::do_widen(const char*, const char*, char*)):
250 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
253 * doc/xml/manual/spine.xml: Update copyright years.
254 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
255 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
256 for C++17 filesystem library.
257 * doc/html/*: Regenerate.
259 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
260 * config.h.in: Regenerate.
261 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
262 alphabetically and add missing entries for copy_symlink,
263 hard_link_count, rename, and resize_file.
264 * configure: Regenerate.
265 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
266 used unconditionally.
267 * src/filesystem/ops-common.h (__gnu_posix::truncate)
268 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
269 supports truncating to zero length.
270 * testsuite/27_io/filesystem/operations/all.cc: New test.
271 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
273 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
276 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
277 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
278 * config.h.in: Regenerate.
279 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
280 remaining std::filesystem types and functions.
281 * configure: Regenerate.
282 * src/c++17/Makefile.am: Add C++17 filesystem sources.
283 * src/c++17/Makefile.in: Regenerate.
284 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
285 here, and change name of included file.
286 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
287 here, and change name of included file.
288 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
289 path to dir-common.h.
290 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
291 path to ops-common.h. Disable -Wunused-parameter warnings.
292 (internal_file_clock): Define unconditionally.
293 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
295 (do_copy_file, do_space): Move definitions to ops.common.h.
296 (copy, file_size, hard_link_count, last_write_time, space): Only
297 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
299 (last_write_time, read_symlink): Remove unused attributes from
301 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
302 * src/filesystem/Makefile.in: Regenerate.
303 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
304 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
305 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
306 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
307 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
308 dummy types and functions instead of using #error.
309 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
310 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
312 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
313 (do_copy_file, do_space): Move definitions here from std-ops.cc.
314 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
315 to account for new namespace.
316 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
317 -lstdc++fs from dg-options.
318 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
319 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
320 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
321 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
322 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
324 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
325 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
327 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
328 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
329 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
330 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
331 * testsuite/27_io/filesystem/operations/create_directories.cc:
333 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
334 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
335 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
336 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
337 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
338 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
339 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
340 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
341 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
342 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
343 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
344 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
345 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
346 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
347 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
348 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
349 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
350 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
352 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
356 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
357 typeinfo and vtables less greedy.
358 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
359 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
360 * src/c++17/Makefile.in: Regenerate.
361 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
362 here, and change name of included file.
363 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
364 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
366 * src/filesystem/Makefile.in: Regenerate.
367 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
368 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
369 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
370 from dg-options and remove dg-require-filesystem-ts.
371 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
372 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
373 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
374 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
375 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
376 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
377 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
378 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
379 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
380 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
381 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
382 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
383 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
384 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
385 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
386 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
387 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
388 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
389 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
390 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
391 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
393 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
394 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
395 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
396 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
397 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
398 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
399 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
400 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
401 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
402 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
403 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
404 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
406 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
408 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
410 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
412 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
413 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
414 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
415 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
416 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
417 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
418 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
419 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
420 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
421 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
423 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
424 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
425 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
426 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
427 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
430 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
431 Check is_trivially_copyable instead of is_scalar.
432 (variant::emplace<N, Args>(Args&&...)): If construction of the new
433 contained value can throw and its type is trivially copyable then
434 construct into a temporary variant and move from it, to provide the
435 strong exception safety guarantee.
436 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
438 * testsuite/20_util/variant/87431.cc: New test.
439 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
440 conversion causes valueless state.
443 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
444 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
445 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
446 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
447 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
449 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
451 * include/bits/fs_fwd.h (__file_clock): Define new clock.
452 (file_time_type): Redefine in terms of __file_clock.
453 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
455 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
457 (internal_file_lock): New helper type for accessing __file_clock.
458 (do_copy_file): Use internal_file_lock to convert system time to
460 (last_write_time(const path&, error_code&)): Likewise.
461 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
463 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
465 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
466 for const member functions of std::basic_string.
467 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
469 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
470 Make non-standard constructor private.
471 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
473 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
474 explicit instantiations for C++17 as well as earlier dialects.
475 * src/c++17/Makefile.am: Add new source files.
476 * src/c++17/Makefile.in: Regenerate.
477 * src/c++17/cow-string-inst.cc: New file defining explicit
478 instantiations for basic_string member functions added in C++17.
479 * src/c++17/string-inst.cc: Likewise.
481 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
482 copy/move constructors for old std::basic_string.
483 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
484 (basic_string::reference, basic_string::const_reference): Define
485 as plain references for C++11 and later.
486 (basic_string::basic_string()): Put constructor body outside
487 preprocessor conditional groups.
488 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
489 instead of copying it.
490 (basic_string::basic_string(const basic_string&, const _Alloc&)):
492 (basic_string::basic_string(basic_string&&, const _Alloc&)):
494 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
495 cases for old basic_string.
496 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
497 allocator-extended constructors unconditionally. Add extra members to
498 allocator type when using old string ABI.
499 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
501 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
503 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
504 -fno-inline added to test flags.
506 * testsuite/21_strings/basic_string/requirements/
507 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
509 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
510 assertion failures with old std::string ABI.
512 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
514 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
515 functions that will only erase elements at the end.
516 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
517 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
518 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
520 (path::_List::pop_back()): Define.
521 (path::_List::_M_erase_from(const_iterator)): Define.
522 (path::operator/=(const path&)): Use pop_back to remove last component
523 and _M_erase_from to remove multiple components.
524 (path::_M_append(basic_string_view<value_type>)): Likewise.
525 (path::operator+=(const path&)): Likewise.
526 (path::_M_concat(basic_string_view<value_type>)): Likewise.
527 (path::remove_filename()): Likewise.
528 (path::lexically_normal()): Use _List::_Impl iterators instead of
529 path::iterator. Use pop_back to remove components from the end. Clear
530 trailing filename, instead of using erase(const_iterator) to remove
531 a non-final component.
532 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
534 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
536 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
537 incorrect treatment of empty filename after trailing slash.
538 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
540 * testsuite/21_strings/basic_string/modifiers/assign/char/
541 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
543 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
544 move_assign_optim.cc: Likewise.
546 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
547 Jakub Jelinek <jakub@redhat.com>
550 * include/experimental/memory: Replace UTF-8 quote characters.
551 * include/std/future: Replace UTF-8 "em dash" characters.
553 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
556 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
557 * include/debug/forward_list: Likewise.
558 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
560 * include/experimental/chrono: Likewise.
561 * include/experimental/functional: Likewise.
562 * include/experimental/ratio: Likewise.
563 * include/experimental/system_error: Likewise.
564 * include/experimental/tuple: Likewise.
565 * include/experimental/type_traits: Likewise.
566 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
567 * include/parallel/multiseq_selection.h: Likewise.
570 * config/abi/pre/gnu.ver: Add missing exports.
571 * testsuite/22_locale/collate_byname/88681.cc: New test.
572 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
573 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
575 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
577 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
578 initializer_list<value_type> and from input iterator ranges.
579 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
581 * testsuite/experimental/string_view/element_access/char/empty.cc:
582 Fix year range in copyright header.
584 2019-01-02 Joel Brobecker <brobecker@adacore.com>
586 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
587 Fix year range in copyright header.
589 2019-01-01 Jakub Jelinek <jakub@redhat.com>
591 Update copyright years.
593 Copyright (C) 2019 Free Software Foundation, Inc.
595 Copying and distribution of this file, with or without modification,
596 are permitted in any medium without royalty provided the copyright
597 notice and this notice are preserved.