]> git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/ChangeLog
P0482R5 char8_t: Updates to gdb pretty printing support
[thirdparty/gcc.git] / libstdc++-v3 / ChangeLog
1 2019-02-22 Tom Honermann <tom@honermann.net>
2
3 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
4 printers for u8string and u8string_view.
5
6 2019-02-22 Tom Honermann <tom@honermann.net>
7
8 * testsuite/18_support/byte/ops.cc: Validate
9 std::to_integer<char8_t>, std::to_integer<char16_t>, and
10 std::to_integer<char32_t>.
11 * testsuite/18_support/numeric_limits/dr559.cc: Validate
12 std::numeric_limits<char8_t>.
13 * testsuite/18_support/numeric_limits/lowest.cc: Validate
14 std::numeric_limits<char8_t>::lowest().
15 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
16 std::numeric_limits<char8_t>::max_digits10.
17 * testsuite/18_support/type_info/fundamental.cc: Validate
18 typeinfo for char8_t.
19 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
20 std::from_chars with char8_t.
21 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
22 Validate explicit instantiation of std::hash<char8_t>.
23 * testsuite/20_util/is_integral/value.cc: Validate
24 std::is_integral<char8_t>.
25 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
26 Validate std::make_signed<char8_t>.
27 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
28 Validate u8string construction from char8_t sources.
29 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
30 std::pmr::u8string.
31 * testsuite/21_strings/basic_string_view/operations/compare/
32 char/70483.cc: Validate substr operations on u8string_view.
33 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
34 the u8string_view typedef is defined.
35 * testsuite/21_strings/char_traits/requirements/
36 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
37 member functions.
38 * testsuite/21_strings/char_traits/requirements/
39 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
40 constexpr member functions.
41 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
42 that the u8string typedef is defined.
43 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
44 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
45 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
46 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
47 numbers.
48 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
49 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
50 Likewise.
51 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
52 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
53 Validate std::atomic<char8_t>::is_always_lock_free
54 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
55 Update line numbers.
56 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
57 Likewise.
58 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
59 Likewise.
60 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
61 Validate std::experimental::pmr::u8string.
62 * testsuite/experimental/string_view/typedefs.cc: Validate that the
63 u8string_view typedef is defined.
64 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
65 char32_t to the typelists.
66
67 2019-02-22 Tom Honermann <tom@honermann.net>
68
69 * include/ext/typelist.h: Constrain a partial specialization of
70 typelist::detail::append_ to only match chain<T1,T2>.
71
72 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
73
74 PR libstdc++/89416
75 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
76 class template with class. Replace move and copy member types with
77 member alias templates, so they are only instantiated when needed.
78 (__is_copy_insertable, __is_move_insertable): Adjust base class.
79 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
80 test for C++11/14/17 as well.
81 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
82 test.
83
84 2019-02-20 Jakub Jelinek <jakub@redhat.com>
85
86 PR libstdc++/89402
87 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
88 _GLIBCXX_PURE to the alias declaration.
89
90 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
91
92 * testsuite/21_strings/basic_string/literals/types.cc
93 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
94 * testsuite/21_strings/basic_string/literals/values.cc
95 [_GLIBCXX_USE_CHAR8_T]: Likewise.
96 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
97 potentially having different type.
98 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
99 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
100 to char.
101 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
102 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
103 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
104 string literals only using basic character set.
105 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
106 u8 literals to char.
107 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
108 Test ATOMIC_CHAR8_T_LOCK_FREE.
109 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
110 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
111 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
112 * testsuite/experimental/string_view/literals/types.cc
113 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
114 literal.
115 * testsuite/experimental/string_view/literals/values.cc
116 [_GLIBCXX_USE_CHAR8_T]: Likewise.
117
118 2019-02-19 Tom Honermann <tom@honermann.net>
119
120 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
121 from char16_32_t.cc; validates numeric_limits<char8_t>.
122 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
123 test cloned from types.cc; validates operator""s for char8_t
124 returns u8string.
125 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
126 test cloned from values.cc; validates construction and comparison
127 of u8string values.
128 * testsuite/21_strings/basic_string/requirements/
129 /explicit_instantiation/char8_t/1.cc: New test cloned from
130 char16_t/1.cc; validates explicit instantiation of
131 basic_string<char8_t>.
132 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
133 New test cloned from types.cc; validates operator""sv for char8_t
134 returns u8string_view.
135 * testsuite/21_strings/basic_string_view/literals/
136 values-char8_t.cc: New test cloned from values.cc; validates
137 construction and comparison of u8string_view values.
138 * testsuite/21_strings/basic_string_view/requirements/
139 explicit_instantiation/char8_t/1.cc: New test cloned from
140 char16_t/1.cc; validates explicit instantiation of
141 basic_string_view<char8_t>.
142 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
143 New test cloned from char16_t/65049.cc; validates that
144 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
145 * testsuite/21_strings/char_traits/requirements/char8_t/
146 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
147 that char_traits<char8_t> member typedefs are present and correct.
148 * testsuite/21_strings/char_traits/requirements/
149 explicit_instantiation/char8_t/1.cc: New test cloned from
150 char16_t/1.cc; validates explicit instantiation of
151 char_traits<char8_t>.
152 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
153 from char16_t.cc: validates
154 codecvt<char16_t, char8_t, mbstate_t>.
155 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
156 from char32_t.cc: validates
157 codecvt<char32_t, char8_t, mbstate_t>.
158 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
159 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
160 codecvt<char32_t, char8_t, std::mbstate_t>.
161 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
162 test cloned from string.cc; validates filesystem::path construction
163 from char8_t input.
164 * testsuite/experimental/feat-char8_t.cc: New test; validates that
165 the __cpp_lib_char8_t feature test macro is defined with the
166 correct value.
167 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
168 New test cloned from string.cc; validates filesystem::path
169 construction from char8_t input.
170 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
171 test cloned from types.cc; validates operator""sv for char8_t
172 returns u8string_view.
173 * testsuite/experimental/string_view/literals/values-char8_t.cc:
174 New test cloned from values.cc; validates construction and
175 comparison of u8string_view values.
176 * testsuite/experimental/string_view/requirements/
177 explicit_instantiation/char8_t/1.cc: New test cloned from
178 char16_t/1.cc; validates explicit instantiation of
179 basic_string_view<char8_t>.
180 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
181 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
182 enabled.
183
184 2019-02-19 Tom Honermann <tom@honermann.net>
185
186 P0482R5 char8_t: Standard library support
187 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
188 typeinfo symbols for char8_t.
189 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
190 (GLIBCXX_3.4.26): Add symbols for specializations of
191 numeric_limits and codecvt that involve char8_t.
192 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
193 * include/bits/atomic_base.h: Add atomic_char8_t.
194 * include/bits/basic_string.h: Add std::hash<u8string> and
195 operator""s(const char8_t*, size_t).
196 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
197 __cpp_lib_char8_t.
198 * include/bits/char_traits.h: Add char_traits<char8_t>.
199 * include/bits/codecvt.h: Add
200 codecvt<char16_t, char8_t, mbstate_t>,
201 codecvt<char32_t, char8_t, mbstate_t>,
202 codecvt_byname<char16_t, char8_t, mbstate_t>, and
203 codecvt_byname<char32_t, char8_t, mbstate_t>.
204 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
205 recognize char8_t as an integral type.
206 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
207 char8_t.
208 (path::u8string): Return std::u8string when char8_t support is
209 enabled.
210 (path::generic_u8string): Likewise.
211 (path::_S_convert): Handle conversion from char8_t input.
212 (path::_S_str_convert): Likewise.
213 * include/bits/functional_hash.h: Add hash<char8_t>.
214 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
215 char8_t.
216 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
217 for new char8_t specializations.
218 * include/bits/localefwd.h: Add missing declarations of
219 codecvt<char16_t, char, mbstate_t> and
220 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
221 codecvt<char16_t, char8_t, mbstate_t> and
222 codecvt<char32_t, char8_t, mbstate_t>.
223 * include/bits/postypes.h: Add u8streampos
224 * include/bits/stringfwd.h: Add declarations of
225 char_traits<char8_t> and u8string.
226 * include/c_global/cstddef: Add __byte_operand<char8_t>.
227 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
228 Recognize char8_t.
229 (path::u8string): Return std::u8string when char8_t support is
230 enabled.
231 (path::generic_u8string): Likewise.
232 (path::_S_convert): Handle conversion from char8_t input.
233 (path::_S_str_convert): Likewise.
234 * include/experimental/string: Add u8string.
235 * include/experimental/string_view: Add u8string_view,
236 hash<experimental::u8string_view>, and
237 operator""sv(const char8_t*, size_t).
238 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
239 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
240 as a character type.
241 * include/std/limits: Add numeric_limits<char8_t>.
242 * include/std/string_view: Add u8string_view,
243 hash<experimental::u8string_view>, and
244 operator""sv(const char8_t*, size_t).
245 * include/std/type_traits: Add __is_integral_helper<char8_t>,
246 __make_unsigned<char8_t>, and __make_signed<char8_t>.
247 * libsupc++/atomic_lockfree_defines.h: Define
248 ATOMIC_CHAR8_T_LOCK_FREE.
249 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
250 codecvt.cc and limits.cc so that char8_t specializations of
251 numeric_limits and codecvt and emitted.
252 * src/c++11/Makefile.in: Likewise.
253 * src/c++11/codecvt.cc: Define members of
254 codecvt<char16_t, char8_t, mbstate_t>,
255 codecvt<char32_t, char8_t, mbstate_t>,
256 codecvt_byname<char16_t, char8_t, mbstate_t>, and
257 codecvt_byname<char32_t, char8_t, mbstate_t>.
258 * src/c++11/limits.cc: Define members of
259 numeric_limits<char8_t>.
260 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
261 locale_init.cc and localename.cc.
262 * src/c++98/Makefile.in: Likewise.
263 * src/c++98/locale_init.cc: Add initialization for the
264 codecvt<char16_t, char8_t, mbstate_t> and
265 codecvt<char32_t, char8_t, mbstate_t> facets.
266 * src/c++98/localename.cc: Likewise.
267 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
268
269 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
270
271 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
272 * 27_io/filesystem/operations/resize_file.cc: Likewise.
273 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
274
275 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
276
277 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
278 * doc/html/*: Regenerate.
279
280 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
281 * doc/html/*: Regenerate.
282
283 * doc/xml/manual/intro.xml: Document LWG 2586 status.
284 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
285 allocator type in is_constructible checks.
286 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
287 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
288 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
289 problematic type from LWG 2586 discussion.
290 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
291 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
292
293 * configure.ac: Check for C11 timespec_get function.
294 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
295 (openbsd): Likewise
296 * config.h.in: Regenerate.
297 * configure: Regenerate.
298 * include/c_global/ctime (timespec, timespec_get): Add to namespace
299 std for C++17 and up.
300
301 * doc/xml/manual/intro.xml: Document LWG 2537 status.
302 * include/bits/stl_queue.h
303 (priority_queue(const Compare&, const Container&, const Alloc&))
304 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
305 make_heap.
306 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
307
308 * doc/xml/manual/intro.xml: Document LWG 2566 status.
309 * include/bits/stl_queue.h (queue, priority_queue): Add static
310 assertions to enforce LWG 2566 requirement on value_type.
311 * include/bits/stl_stack.h (stack): Likewise.
312
313 PR middle-end/89303
314 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
315
316 * doc/xml/manual/intro.xml: Document LWG 2735 status.
317 * include/bits/std_abs.h: Add comment about LWG 2735.
318 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
319
320 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
321
322 PR libstdc++/89345
323 * include/std/version [__cpp_impl_destroying_delete]
324 (__cpp_lib_destroying_delete): Only define for C++2a and later.
325 * libsupc++/new [__cpp_impl_destroying_delete]
326 (__cpp_lib_destroying_delete): Likewise.
327 (destroying_delete_t, destroying_delete): Likewise, but define even
328 when __cpp_impl_destroying_delete is not defined.
329 * testsuite/18_support/destroying_delete.cc: New test.
330
331 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
332
333 PR libstdc++/89023
334 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
335 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
336 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
337 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
338
339 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
340
341 PR libstdc++/71044
342 * include/bits/fs_path.h (path::has_root_name)
343 (path::has_root_directory, path::has_root_path)
344 (path::has_relative_path, path::has_parent_path)
345 (path::has_filename, path::has_stem, path::has_extension)
346 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
347 noexcept.
348 * src/c++17/fs_path.cc (path::has_root_name)
349 (path::has_root_directory, path::has_root_path)
350 (path::has_relative_path, path::has_parent_path)
351 (path::has_filename, path::_M_find_extension): Add noexcept.
352
353 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
354
355 PR libstdc++/89102 (partial)
356 * include/std/type_traits (common_type<>): Define.
357 (common_type<T>): Derive from common_type<T, T>.
358 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
359 Test zero-length template argument list.
360 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
361 Test additional single argument cases.
362 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
363 Adjust expected error.
364
365 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
366
367 PR libstdc++/89128
368 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
369 guides.
370 * include/bits/stl_stack.h (stack): Likewise.
371 * testsuite/23_containers/priority_queue/deduction.cc: New test.
372 * testsuite/23_containers/queue/deduction.cc: New test.
373 * testsuite/23_containers/stack/deduction.cc: New test.
374
375 PR libstdc++/89194
376 * include/std/type_traits (__is_convertible_helper)
377 (__is_convertible_helper<_From, _To, false>): Revert changes to
378 support is_nothrow_convertible.
379 (__is_nt_convertible_helper): New helper.
380 (is_nothrow_convertible): Use __is_nt_convertible_helper.
381
382 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
383 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
384
385 PR libstdc++/89130
386 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
387 __is_alloc_insertable_impl. Replace single type member with two
388 members, one for each of copy and move insertable.
389 (__is_move_insertable): New trait for internal use.
390 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
391 (vector::_S_nothrow_relocate(true_type)): New functions to
392 conditionally check if __relocate_a can throw.
393 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
394 on __is_move_insertable.
395 (vector::_S_do_relocate): New overloaded functions to conditionally
396 call __relocate_a.
397 (vector::_S_relocate): New function that dispatches to _S_do_relocate
398 based on _S_use_relocate.
399 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
400 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
401 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
402
403 PR libstdc++/89090
404 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
405 parameter unnamed. Add message to static assertion.
406 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
407 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
408 in C++11 code.
409
410 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
411
412 PR libstdc++/87106
413 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
414 Rename...
415 (__is_bitwise_relocatable): ... to this.
416 (__relocate_a_1): Adapt.
417 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
418 (__is_bitwise_relocatable): ... to this.
419
420 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
421
422 PR libstdc++/89117
423 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
424 final component as well as from _M_pathname. Append the dot using
425 operator+= instead of only to _M_pathname.
426 (path::_M_find_extension): Reformat slightly.
427 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
428 Add more test cases.
429
430 2019-01-30 Ulrich Drepper <drepper@redhat.com>
431
432 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
433
434 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
435
436 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
437 constexpr specifiers from arg and proj.
438
439 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
440 __shared_ptr instantiations used by gcc4-compatible ABI.
441
442 * include/experimental/forward_list (experimental::erase): Qualify
443 call to erase_if.
444 * include/experimental/list (experimental::erase): Likewise.
445 * include/std/forward_list (std::erase): Likewise.
446 * include/std/list (std::erase): Likewise.
447
448 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
449 C++2a.
450 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
451 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
452 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
453 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
454 * testsuite/ext/array_allocator/26875.cc: Likewise.
455 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
456 * testsuite/util/replacement_memory_operators.h: Likewise.
457 * testsuite/util/testsuite_allocator.h: Likewise.
458
459 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
460 normal mode vector, even for debug mode.
461 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
462 Define alias template for normal mode vector.
463
464 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
465
466 PR libstdc++/68737
467 * config/locale/generic/c_locale.h (__convert_from_v)
468 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
469 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
470 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
471 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
472
473 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
474
475 PR libstdc++/88840
476 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
477 data member with static member function _S_use_relocate().
478 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
479 (vector::_M_default_append): Use _S_use_relocate() instead of
480 __use_relocate.
481
482 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
483 sign of results.
484
485 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
486
487 PR libstdc++/88740
488 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
489 write to stderr instead of using printf.
490
491 2019-01-21 Jakub Jelinek <jakub@redhat.com>
492
493 PR libstdc++/86590
494 * include/bits/char_traits.h (__constant_string_p,
495 __constant_char_array_p): Use __builtin_is_constant_evaluated if
496 available.
497
498 2019-01-20 Ulrich Drepper <drepper@redhat.com>
499
500 Implement C++20 P0600r1.
501 * include/backward/hash_map: Add nodiscard attribute to empty.
502 * include/backward/hash_set: Likewise.
503 * backward/hashtable.h: Likewise.
504 * include/bits/basic_string.h: Likewise.
505 * include/bits/forward_list.h: Likewise.
506 * include/bits/hashtable.h: Likewise.
507 * include/bits/regex.h: Likewise.
508 * include/bits/stl_deque.h: Likewise.
509 * include/bits/stl_list.h: Likewise.
510 * include/bits/stl_map.h: Likewise.
511 * include/bits/stl_multimap.h: Likewise.
512 * include/bits/stl_multiset.h: Likewise.
513 * include/bits/stl_queue.h: Likewise.
514 * include/bits/stl_set.h: Likewise.
515 * include/bits/stl_stack.h: Likewise.
516 * include/bits/stl_tree.h: Likewise.
517 * include/bits/stl_vector.h: Likewise.
518 * include/bits/unordered_map.h: Likewise.
519 * include/bits/unordered_set.h: Likewise.
520 * include/debug/array: Likewise.
521 * include/experimental/any: Likewise.
522 * include/experimental/bits/fs_path.h: Likewise.
523 * include/experimental/internet: Likewise.
524 * include/experimental/string_view: Likewise.
525 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
526 Likewise.
527 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
528 Likewise.
529 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
530 Likewise.
531 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
532 Likewise.
533 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
534 Likewise.
535 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
536 Likewise.
537 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
538 Likewise.
539 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
540 Likewise.
541 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
542 info_fn_imps.hpp: Likewise.
543 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
544 left_child_next_sibling_heap_.hpp: Likewise.
545 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
546 Likewise.
547 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
548 Likewise.
549 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
550 Likewise.
551 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
552 Likewise.
553 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
554 Likewise.
555 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
556 Likewise.
557 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
558 Likewise.
559 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
560 * include/ext/pb_ds/trie_policy.hpp: Likewise.
561 * include/ext/rope: Likewise.
562 * include/ext/slist: Likewise.
563 * include/ext/vstring.h: Likewise.
564 * include/profile/array: Likewise.
565 * include/std/array: Likewise.
566 * include/tr1/array: Likewise.
567 * include/tr1/hashtable.h: Likewise.
568 * include/tr1/regex: Likewise.
569 * include/tr2/dynamic_bitset: Likewise.
570 * include/bits/alloc_traits.h: Add nodiscard attribute to
571 allocate.
572 * include/experimental/memory_resource: Likewise.
573 * include/ext/alloc_traits.h: Likewise.
574 * include/ext/array_allocator.h: Likewise.
575 * include/ext/bitmap_allocator.h: Likewise.
576 * include/ext/debug_allocator.h: Likewise.
577 * include/ext/extptr_allocator.h: Likewise.
578 * include/ext/mt_allocator.h: Likewise.
579 * include/ext/new_allocator.h: Likewise.
580 * include/ext/pool_allocator.h: Likewise.
581 * include/ext/throw_allocator.h: Likewise.
582 * include/std/scoped_allocator: Likewise.
583 * libsupc++/eh_alloc.cc: Likewise.
584 * include/std/future: Add nodiscard attribute to async.
585 * libsupc++/new: Add nodiscard attribute to new.
586
587 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
588
589 PR libstdc++/87514
590 PR libstdc++/87520
591 PR libstdc++/88782
592 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
593 * include/bits/shared_ptr.h
594 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
595 (allocate_shared): Change to use new tag type.
596 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
597 Declare new member function.
598 (_Sp_alloc_shared_tag): Define new type.
599 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
600 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
601 _Sp_make_shared_tag::_S_eq to check type_info.
602 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
603 Constrain to prevent being called with _Sp_alloc_shared_tag.
604 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
605 Replace constructor with ...
606 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
607 reference parameter so address of the new object can be returned to
608 the caller. Obtain the allocator from the tag type.
609 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
610 constructor with ...
611 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
612 to the __shared_count constructor.
613 (__allocate_shared): Change to use new tag type.
614 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
615
616 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
617
618 * src/c++17/fs_ops.cc
619 (equivalent(const path&, const path&, error_code&))
620 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
621 compare files instead of relying on incomplete info returned by stat.
622
623 PR libstdc++/88884
624 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
625 if the path is already absolute.
626 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
627 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
628
629 PR libstdc++/88881
630 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
631 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
632 of filesystem::exists.
633 (create_directories(const path&, error_code&)): Add assertions.
634 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
635 Add workaround for bug in _wstat for paths with trailing slash.
636 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
637 for expected behaviour on mingw.
638 * testsuite/experimental/filesystem/operations/create_directories.cc:
639 Likewise.
640 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
641 "TMP" instead of "TMPDIR" and clean environment before each test. Do
642 not test permissions on mingw targets.
643
644 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
645
646 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
647 constructors and open members taking wide strings. Fix patterns for
648 filesystem::path members to match wstring_view parameters. Add
649 exports for shared_ptr members used by directory iterators.
650 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
651 error code parameter if the file doesn't exist.
652 * src/filesystem/ops.cc (remove(const path&, error_code&)):
653 Likewise.
654 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
655 values for mingw targets, where "/" is not an absolute path. Do not
656 test symlinks on mingw targets.
657 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
658 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
659 on mingw targets.
660 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
661 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
662 that each component of the path is created.
663 * testsuite/experimental/filesystem/operations/create_directories.cc:
664 Likewise.
665 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
666 permissions on mingw targets.
667 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
668 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
669 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
670 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
671 mingw targets.
672 * testsuite/experimental/filesystem/operations/permissions.cc:
673 Likewise.
674 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
675 symlinks or permissions on mingw targets.
676 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
677 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
678 symlinks on mingw targets.
679 * testsuite/experimental/filesystem/operations/remove_all.cc:
680 Likewise.
681 * testsuite/27_io/filesystem/operations/status.cc: Do not test
682 permissions on mingw targets.
683 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
684 test symlinks on mingw targets.
685 * testsuite/experimental/filesystem/operations/space.cc: Fix test
686 for mingw targets.
687
688 2019-02-14 Ulrich Drepper <drepper@redhat.com>
689
690 PR libstdc++/88738
691 Warn about unused comparisons of shared_ptr/unique_ptr
692 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
693 * include/bits/shared_ptr.h: Use it for operator ==, !=,
694 <, <=, >, >= for shared_ptr.
695 * include/bits/unique_ptr.h: Likewise for unique_ptr.
696
697 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
698
699 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
700 as 201611L, because P0497R0 changes are supported.
701 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
702
703 * include/bits/erase_if.h [__cplusplus > 201703L]
704 (__cpp_lib_erase_if): Only define for C++2a.
705 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
706 (__cpp_lib_null_iterators): Define.
707 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
708 (__cpp_lib_null_iterators): Define.
709 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
710
711 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
712 status.
713 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
714 Define.
715 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
716 changes are supported.
717 * include/std/optional (__cpp_lib_optional): Likewise.
718 * include/std/variant (__cpp_lib_variant): Likewise.
719 * include/std/version [!__STRICT_ANSI__]
720 (__cpp_lib_uncaught_exceptions): Define as long integer.
721 [__cplusplus >= 201703L] (__cpp_lib_any)
722 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
723 (__cpp_lib_variant): Define for C++17.
724 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
725 as long integer.
726 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
727 integer.
728
729 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
730
731 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
732
733 PR libstdc++/88811
734 PR libstdc++/83306
735 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
736 before second path.
737 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
738 test.
739
740 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
741
742 * doc/xml/manual/intro.xml: Include new section.
743 * doc/xml/manual/status_cxx2017.xml: Document more
744 implementation-defined properties of the library.
745 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
746 * doc/html/*: Regenerate.
747
748 * include/bits/refwrap.h [__cplusplus > 201703L]
749 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
750 (_Reference_wrapper_base_memfun): Do not define for C++2a.
751 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
752 for C++2a.
753 (reference_wrapper::operator()): Add static assertion.
754 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
755
756 * include/std/chrono (duration_values::zero(), duration_values::min())
757 (duration_values::max()): Add noexcept.
758 (duration::zero(), duration::min(), duration::max()): Likewise.
759 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
760 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
761 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
762
763 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
764
765 2019-01-11 Jakub Jelinek <jakub@redhat.com>
766
767 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
768 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
769
770 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
771
772 PR libstdc++/88802
773 * include/bits/functional_hash.h (hash<nullptr_t>): Define
774 specialization for C++17 (P0513R0, LWG 2817).
775 * testsuite/20_util/hash/nullptr.cc: New test.
776
777 PR libstdc++/88125
778 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
779 pattern for std::basic_stringbuf::str().
780
781 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
782 basic_ostream::operator<< patterns.
783
784 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
785
786 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
787 test failures on targets with 32-bit time_t.
788
789 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
790 * include/std/deque: Likewise.
791 * include/std/forward_list: Likewise.
792 * include/std/list: Likewise.
793 * include/std/string: Likewise.
794 * include/std/vector: Likewise.
795 * include/std/version: Likewise.
796 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
797 * testsuite/23_containers/deque/erasure.cc: Likewise.
798 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
799 * testsuite/23_containers/list/erasure.cc: Likewise.
800 * testsuite/23_containers/map/erasure.cc: Likewise.
801 * testsuite/23_containers/set/erasure.cc: Likewise.
802 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
803 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
804 * testsuite/23_containers/vector/erasure.cc: Likewise.
805
806 * include/experimental/internet [AI_NUMERICSERV]
807 (resolver_base::numeric_service): Define conditionally.
808 * testsuite/experimental/net/internet/resolver/base.cc: Test it
809 conditionally.
810 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
811 Likewise.
812
813 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
814 Jonathan Wakely <jwakely@redhat.com>
815
816 Implement LWG 2221
817 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
818 (GLIBCXX_3.4.26): Add new exports.
819 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
820 correct list of sources.
821 * include/Makefile.in: Regenerate.
822 * include/std/ostream (operator<<(nullptr_t)): New member function.
823 * src/c++17/ostream-inst.cc: New file.
824 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
825 test.
826
827 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
828
829 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
830 of the source file containing the caller.
831 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
832 directories created by test.
833 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
834 Likewise.
835 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
836 Likewise.
837 * testsuite/experimental/filesystem/iterators/
838 recursive_directory_iterator.cc: Likewise.
839
840 2019-01-10 Jakub Jelinek <jakub@redhat.com>
841
842 PR tree-optimization/88775
843 * include/bits/stl_function.h (greater<_Tp*>::operator(),
844 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
845 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
846 instead of __builtin_constant_p if available. Don't bother with
847 the pointer comparison in C++11 and earlier.
848
849 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
850
851 PR other/16615
852
853 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
854 with "cannot".
855
856 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
857
858 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
859 for filesystem::path. Give variables more distinctive names.
860
861 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
862 member function to perform non-trivial assignment.
863 (_Optional_payload_base::_M_move_assign): Likewise.
864 (_Optional_payload<T, true, false, true>::operator=)
865 (_Optional_payload<T, true, true, false>::operator=)
866 (_Optional_payload<T, true, false, false>::operator=): Call
867 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
868
869 PR libstdc++/88204
870 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
871 test std::complex<long double> if long double format is IBM128.
872 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
873 Likewise.
874
875 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
876
877 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
878 for old std::unique_ptr layout.
879 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
880 to become valueless. Add filesystem::path tests.
881
882 PR libstdc++/87855
883 * include/std/optional (_Optional_payload_base): New class template
884 for common code hoisted from _Optional_payload specializations. Use
885 a template for the union, to allow a partial specialization for
886 types with non-trivial destructors. Add constructors for in-place
887 initialization to the union.
888 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
889 to perform non-trivial copy construction, instead of relying on
890 non-standard copy elision in a delegating constructor.
891 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
892 non-trivial move construction.
893 (_Optional_payload): Derive from _Optional_payload_base and use it
894 for everything except the non-trivial assignment operators, which are
895 defined as needed.
896 (_Optional_payload<false, C, M>): Derive from the specialization
897 _Optional_payload<true, false, false> and add a destructor.
898 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
899 Forward to corresponding members of _Optional_payload.
900 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
901 Hoist common members from _Optional_base.
902 (_Optional_base): Make all members and base class public.
903 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
904 _Optional_base_impl.
905 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
906 support for new std::optional layout.
907 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
908
909 PR libstdc++/88066
910 * include/bits/locale_conv.h: Use <> for includes not "".
911 * include/ext/random: Likewise.
912 * include/ext/vstring.h: Likewise.
913
914 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
915
916 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
917 (GLIBCXX_3.4.21): Likewise.
918
919 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
920
921 PR libstdc++/88749
922 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
923 to match the one that controls whether utimbuf and utime are declared.
924
925 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
926
927 PR libstdc++/87787
928 * include/bits/char_traits.h (char_traits::move): Do not pass null
929 pointers to memmove.
930 * include/bits/locale_facets.h
931 (ctype<char>::widen(const char*, const char*, char*)): Do not
932 pass null pointers to memcpy.
933 (ctype<char>::narrow(const char*, const char*, char, char*)):
934 Likewise.
935 (ctype<char>::do_widen(const char*, const char*, char*)):
936 Likewise.
937 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
938 Likewise.
939
940 * doc/xml/manual/spine.xml: Update copyright years.
941 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
942 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
943 for C++17 filesystem library.
944 * doc/html/*: Regenerate.
945
946 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
947 * config.h.in: Regenerate.
948 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
949 alphabetically and add missing entries for copy_symlink,
950 hard_link_count, rename, and resize_file.
951 * configure: Regenerate.
952 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
953 used unconditionally.
954 * src/filesystem/ops-common.h (__gnu_posix::truncate)
955 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
956 supports truncating to zero length.
957 * testsuite/27_io/filesystem/operations/all.cc: New test.
958 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
959
960 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
961
962 PR libstdc++/86756
963 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
964 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
965 * config.h.in: Regenerate.
966 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
967 remaining std::filesystem types and functions.
968 * configure: Regenerate.
969 * src/c++17/Makefile.am: Add C++17 filesystem sources.
970 * src/c++17/Makefile.in: Regenerate.
971 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
972 here, and change name of included file.
973 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
974 here, and change name of included file.
975 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
976 path to dir-common.h.
977 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
978 path to ops-common.h. Disable -Wunused-parameter warnings.
979 (internal_file_clock): Define unconditionally.
980 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
981 define.
982 (do_copy_file, do_space): Move definitions to ops.common.h.
983 (copy, file_size, hard_link_count, last_write_time, space): Only
984 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
985 report an error.
986 (last_write_time, read_symlink): Remove unused attributes from
987 parameters.
988 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
989 * src/filesystem/Makefile.in: Regenerate.
990 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
991 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
992 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
993 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
994 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
995 dummy types and functions instead of using #error.
996 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
997 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
998 in terms of stat.
999 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
1000 (do_copy_file, do_space): Move definitions here from std-ops.cc.
1001 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
1002 to account for new namespace.
1003 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
1004 -lstdc++fs from dg-options.
1005 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
1006 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
1007 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
1008 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
1009 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
1010 Likewise.
1011 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
1012 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
1013 Likewise.
1014 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
1015 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
1016 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
1017 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
1018 * testsuite/27_io/filesystem/operations/create_directories.cc:
1019 Likewise.
1020 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
1021 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
1022 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
1023 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
1024 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
1025 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
1026 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
1027 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
1028 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
1029 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
1030 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
1031 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
1032 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
1033 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
1034 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
1035 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
1036 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
1037 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
1038 Likewise.
1039 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
1040
1041
1042 PR libstdc++/86756
1043 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
1044 typeinfo and vtables less greedy.
1045 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
1046 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
1047 * src/c++17/Makefile.in: Regenerate.
1048 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
1049 here, and change name of included file.
1050 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
1051 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
1052 from sources.
1053 * src/filesystem/Makefile.in: Regenerate.
1054 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
1055 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
1056 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
1057 from dg-options and remove dg-require-filesystem-ts.
1058 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
1059 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
1060 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
1061 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
1062 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
1063 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
1064 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
1065 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
1066 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
1067 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
1068 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
1069 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
1070 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
1071 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
1072 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
1073 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
1074 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
1075 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
1076 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
1077 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
1078 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
1079 Likewise.
1080 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
1081 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
1082 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
1083 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
1084 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
1085 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
1086 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
1087 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
1088 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
1089 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
1090 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
1091 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
1092 Likewise.
1093 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
1094 Likewise.
1095 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
1096 Likewise.
1097 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
1098 Likewise.
1099 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
1100 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
1101 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
1102 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
1103 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
1104 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
1105 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
1106 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
1107 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
1108 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
1109 Likewise.
1110 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
1111 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
1112 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
1113 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
1114 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
1115
1116 PR libstdc++/87431
1117 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
1118 Check is_trivially_copyable instead of is_scalar.
1119 (variant::emplace<N, Args>(Args&&...)): If construction of the new
1120 contained value can throw and its type is trivially copyable then
1121 construct into a temporary variant and move from it, to provide the
1122 strong exception safety guarantee.
1123 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
1124 Likewise.
1125 * testsuite/20_util/variant/87431.cc: New test.
1126 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
1127 conversion causes valueless state.
1128
1129 PR libstdc++/88607
1130 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
1131 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
1132 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
1133 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
1134 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
1135
1136 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
1137
1138 * include/bits/fs_fwd.h (__file_clock): Define new clock.
1139 (file_time_type): Redefine in terms of __file_clock.
1140 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
1141 overflow.
1142 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
1143 internal linkage.
1144 (internal_file_lock): New helper type for accessing __file_clock.
1145 (do_copy_file): Use internal_file_lock to convert system time to
1146 file_time_type.
1147 (last_write_time(const path&, error_code&)): Likewise.
1148 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
1149
1150 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
1151
1152 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
1153 for const member functions of std::basic_string.
1154 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
1155 in C++17.
1156 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
1157 Make non-standard constructor private.
1158 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
1159 Likewise.
1160 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
1161 explicit instantiations for C++17 as well as earlier dialects.
1162 * src/c++17/Makefile.am: Add new source files.
1163 * src/c++17/Makefile.in: Regenerate.
1164 * src/c++17/cow-string-inst.cc: New file defining explicit
1165 instantiations for basic_string member functions added in C++17.
1166 * src/c++17/string-inst.cc: Likewise.
1167
1168 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
1169 copy/move constructors for old std::basic_string.
1170 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
1171 (basic_string::reference, basic_string::const_reference): Define
1172 as plain references for C++11 and later.
1173 (basic_string::basic_string()): Put constructor body outside
1174 preprocessor conditional groups.
1175 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
1176 instead of copying it.
1177 (basic_string::basic_string(const basic_string&, const _Alloc&)):
1178 Define.
1179 (basic_string::basic_string(basic_string&&, const _Alloc&)):
1180 Define.
1181 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
1182 cases for old basic_string.
1183 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
1184 allocator-extended constructors unconditionally. Add extra members to
1185 allocator type when using old string ABI.
1186 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
1187 for old string ABI.
1188 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
1189
1190 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
1191 -fno-inline added to test flags.
1192
1193 * testsuite/21_strings/basic_string/requirements/
1194 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
1195
1196 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
1197 assertion failures with old std::string ABI.
1198
1199 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
1200 with ...
1201 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
1202 functions that will only erase elements at the end.
1203 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
1204 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
1205 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
1206 of erase(p, end()).
1207 (path::_List::pop_back()): Define.
1208 (path::_List::_M_erase_from(const_iterator)): Define.
1209 (path::operator/=(const path&)): Use pop_back to remove last component
1210 and _M_erase_from to remove multiple components.
1211 (path::_M_append(basic_string_view<value_type>)): Likewise.
1212 (path::operator+=(const path&)): Likewise.
1213 (path::_M_concat(basic_string_view<value_type>)): Likewise.
1214 (path::remove_filename()): Likewise.
1215 (path::lexically_normal()): Use _List::_Impl iterators instead of
1216 path::iterator. Use pop_back to remove components from the end. Clear
1217 trailing filename, instead of using erase(const_iterator) to remove
1218 a non-final component.
1219 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
1220 additional cases.
1221 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
1222
1223 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
1224 incorrect treatment of empty filename after trailing slash.
1225 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
1226
1227 * testsuite/21_strings/basic_string/modifiers/assign/char/
1228 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
1229 to test flags.
1230 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
1231 move_assign_optim.cc: Likewise.
1232
1233 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
1234 Jakub Jelinek <jakub@redhat.com>
1235
1236 PR libstdc++/88607
1237 * include/experimental/memory: Replace UTF-8 quote characters.
1238 * include/std/future: Replace UTF-8 "em dash" characters.
1239
1240 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
1241
1242 PR libstdc++/88607
1243 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
1244 * include/debug/forward_list: Likewise.
1245 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
1246 character.
1247 * include/experimental/chrono: Likewise.
1248 * include/experimental/functional: Likewise.
1249 * include/experimental/ratio: Likewise.
1250 * include/experimental/system_error: Likewise.
1251 * include/experimental/tuple: Likewise.
1252 * include/experimental/type_traits: Likewise.
1253 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
1254 * include/parallel/multiseq_selection.h: Likewise.
1255
1256 PR libstdc++/88681
1257 * config/abi/pre/gnu.ver: Add missing exports.
1258 * testsuite/22_locale/collate_byname/88681.cc: New test.
1259 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
1260 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
1261
1262 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
1263
1264 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
1265 initializer_list<value_type> and from input iterator ranges.
1266 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
1267
1268 * testsuite/experimental/string_view/element_access/char/empty.cc:
1269 Fix year range in copyright header.
1270
1271 2019-01-02 Joel Brobecker <brobecker@adacore.com>
1272
1273 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
1274 Fix year range in copyright header.
1275
1276 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1277
1278 Update copyright years.
1279 \f
1280 Copyright (C) 2019 Free Software Foundation, Inc.
1281
1282 Copying and distribution of this file, with or without modification,
1283 are permitted in any medium without royalty provided the copyright
1284 notice and this notice are preserved.