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