* doc/xml/manual/status_cxx1998.xml: Correct statement about
what the doc covers.
* doc/xml/manual/status_cxx2011.xml: Likewise.
* doc/xml/manual/status_cxx2014.xml: Likewise.
* doc/xml/manual/status_cxx2017.xml: Update C++17 status, and
information on feature-test macros.
* doc/xml/manual/status_cxxtr1.xml: Correct statement about what
the doc covers.
* doc/xml/manual/status_cxxtr24733.xml: Likewise.
* doc/html/*: Regenerate.
From-SVN: r254080
Backport from mainline
2017-09-12 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/79433
* doc/xml/manual/status_cxx2017.xml: Update feature-test macros.
* doc/html/*: Regenerate.
* include/Makefile.am: Remove <bits/c++17_warning.h>.
* include/Makefile.in: Regenerate.
* include/bits/c++17_warning.h: Remove.
* include/bits/string_view.tcc: Do not include <bits/c++17_warning.h>
for pre-C++17 modes.
* include/std/any: Likewise.
(__cpp_lib_any): Define.
* include/std/mutex (__cpp_lib_scoped_lock): Adjust value as per new
SD-6 draft.
* include/std/numeric (__cpp_lib_gcd_lcm): Define as per new SD-6
draft.
* include/std/optional: Do not include <bits/c++17_warning.h>.
(__cpp_lib_optional): Define.
* include/std/shared_mutex: Do not include <bits/c++14_warning.h>.
* include/std/string_view: Do not include <bits/c++17_warning.h>.
(__cpp_lib_string_view): Define.
* include/std/variant: Do not include <bits/c++17_warning.h>.
(__cpp_lib_variant): Define.
* testsuite/20_util/optional/cons/value_neg.cc: Adjust dg-error line
numbers.
* testsuite/26_numerics/gcd/1.cc: Test for __cpp_lib_gcd_lcm.
* testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line
numbers.
* testsuite/26_numerics/lcm/1.cc: Test for __cpp_lib_gcd_lcm.
* testsuite/26_numerics/lcm/lcm_neg.cc: Adjust dg-error line
numbers.
* testsuite/30_threads/scoped_lock/requirements/typedefs.cc: Adjust
expected value of __cpp_lib_scoped_lock.
From-SVN: r253943
As discussed in PR c++/80265 ("__builtin_{memcmp,memchr,strlen} are
not usable in constexpr functions"), use __builtin_constant_p to tell
whether we can defer to a constexpr algorithm.
I used __always_inline__ just to be thorough. It isn't really really
necessary as far as I could determine.
Changes like these:
if (__n == 0)
return 0;
- return wmemcmp(__s1, __s2, __n);
+ else
+ return wmemcmp(__s1, __s2, __n);
are necessary otherwise G++ complains that we're calling a
non-constexpr function, which looks like a a manifestation of PR67026
to me.
libstdc++-v3:
2017-06-12 Pedro Alves <palves@redhat.com>
* doc/xml/manual/status_cxx2017.xml: Update C++17 constexpr
char_traits status.
* doc/html/*: Regenerate.
* include/bits/char_traits.h (_GLIBCXX_ALWAYS_INLINE): Define if
not already defined.
(__cpp_lib_constexpr_char_traits): Uncomment.
(__constant_string_p, __constant_char_array_p): New.
(std::char_traits<char>, std::char_traits<wchar_t>): Add
_GLIBCXX17_CONSTEXPR on compare, length and find and use
__constant_string_p, __constant_char_array_p and
__builtin_constant_p to defer to __gnu_cxx::char_traits at compile
time.
* testsuite/21_strings/char_traits/requirements/
constexpr_functions_c++17.cc: Uncomment
__cpp_lib_constexpr_char_traits tests. Uncomment
test_compare<char>, test_length<char>, test_find<char>,
test_compare<wchar_t>, test_length<wchar_t> and test_find<wchar_t>
static_assert tests.
From-SVN: r252030
* doc/xml/manual/appendix_contributing.xml: Link to the list of bad
names, and link to the test docs and note higher DejaGnu version
requirement.
* doc/xml/manual/allocator.xml: Fix ViewCVS URLs.
* doc/xml/manual/mt_allocator.xml: Likewise.
* doc/xml/manual/test.xml: Correct instructions on running tests.
* doc/html/*: Regenerate.
From-SVN: r249250
* doc/xml/manual/abi.xml: Rephrase one of the references to the
Itanium C++ ABI.
* doc/xml/manual/test.xml: Document DejaGnu 1.5.3 requirement.
* doc/html/*: Regenerate.
From-SVN: r247003
* doc/xml/manual/appendix_contributing.xml: Convert link to
ansi.org to https.
Update link to the C++ standard at ansi.org.
* doc/xml/faq.xml: Remove information redundant with the above;
instead add a reference.
From-SVN: r246259
* doc/xml/manual/debug_mode.xml: Update and simplify note
on link- and run-time coexistence.
Co-Authored-By: François Dumont <frs.dumont@gmail.com>
Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>
From-SVN: r245848
* doc/xml/manual/policy_data_structures.xml: Fix spelling of author's
name.
* doc/xml/manual/policy_data_structures_biblio.xml: Likewise. Remove
broken links to texts that are no longer online.
* doc/xml/manual/profile_mode.xml: Update links to CGO 2009 paper and
LCPC 2006 paper.
* doc/xml/manual/using.xml: Update links to memory model information.
* doc/xml/manual/using_exceptions.xml: Update link to "Appendix E:
Standard-Library Exception Safety".
* doc/html/*: Regenerate.
From-SVN: r245277
* doc/html/ext/lwg-active.html: Remove.
* doc/html/ext/lwg-closed.html: Ditto.
* doc/html/ext/lwg-defects.html: Ditto.
* doc/Makefile.am (xml_extradir): Remove.
(xml_extra): Ditto.
(stamp-html-docbook-lwg): Remove recipe...
(stamp-html-docbook-data): ...and its use here.
* doc/Makefile.in: Regenerate.
* doc/xml/manual/intro.xml: Shorten two paragraphs explaining
the relationship to the upstream working group.
Replace a local link to ../ext/lwg-active.html by the upstream one.
Replace all reference to ../ext/lwg-defects.html by a new entity
&DR; which refers to the upstream address.
From-SVN: r245258
* doc/xml/manual/documentation_hacking.xml: Remove obsolete link
to DocBook Publishing Tools.
epubcheck has moved to GitHub.
Update URL of the DocBook Element Reference; use that term as
link description instead of "online".
From-SVN: r245205
PR libstdc++/78905
* doc/xml/manual/abi.xml (abi.versioning.history): Add markup to
macro names, filenames, and literal values. Document _GLIBCXX_RELEASE.
Document that the deprecated _GLIBCXX_VERSION macro was removed for
the 4.0.0 release.
* doc/html/*: Regenerate.
* include/Makefile.am (_GLIBCXX_RELEASE): Set value.
* include/Makefile.in: Regenerate.
* include/bits/c++config (_GLIBCXX_RELEASE): Add #define.
* testsuite/ext/profile/mutex_extensions_neg.cc: Use lineno of 0 in
dg-error.
From-SVN: r244642
PR libstdc++/69699
* doc/xml/manual/abi.xml (abi.versioning.history): Explain why the
_GLIBCXX__ macro is not useful. Remove redundant date information
and link to the GCC release timeline.
(abi.versioning.active): Move partial sentence into the previous
paragraph.
* doc/html/*: Regenerate.
From-SVN: r244532
* doc/xml/manual/intro.xml: Document LWG 2770 status. Remove entries
for 2742 and 2748.
* doc/html/*: Regenerate.
* include/std/utility (__tuple_size_cv_impl): New helper to safely
detect tuple_size<T>::value, as per LWG 2770.
(tuple_size<cv T>): Adjust partial specializations to derive from
__tuple_size_cv_impl.
* testsuite/20_util/tuple/cv_tuple_size.cc: Test SFINAE-friendliness.
From-SVN: r242452
* doc/xml/manual/intro.xml: Document LWG 2742 status.
* doc/html/*: Regenerate.
* include/bits/basic_string.h
(basic_string(const T&, size_type, size_type, const Allocator&)): Add
constructor for substring of basic_string_view, as per LWG 2742 but
with additional constraint to fix ambiguity.
* testsuite/21_strings/basic_string/cons/char/9.cc: New test.
* testsuite/21_strings/basic_string/cons/wchar_t/9.cc: New test.
From-SVN: r242416
* doc/xml/manual/intro.xml: Document LWG 2748 status.
* include/std/optional (optional<T>::swap): Use is_nothrow_swappable_v
for exception specification.
(swap(optional<T>&, optional<T>&)): Disable when T is not swappable.
* testsuite/20_util/optional/swap/2.cc: New test.
From-SVN: r242415
* doc/xml/manual/status_cxx2017.xml: Update status.
* doc/html/manual/status.html: Regenerate.
* include/bits/shared_ptr.h (shared_ptr(unique_ptr<_Yp, _Del>)): Add
extension constructor to maintain C++14 behaviour.
* include/bits/shared_ptr_base.h (__sp_array_delete): Add new struct.
(__shared_count(_Ptr, false_type), __shared_count(_Ptr, true_type)):
New constructors.
(__sp_compatible_with, __sp_is_constructible): Add specializations
for array support.
(__sp_is_constructible_arr, __sp_is_constructible_arrN): New helpers.
(__shared_ptr_access): New base class for observer member functions.
(__shared_ptr::element_type): Use remove_extent.
(__shared_ptr::_UniqCompatible): Add __sp_compatible_with check.
(__shared_ptr(_Yp*)): Use tag dispatching to call new __shared_count
constructor.
(__shared_ptr(unique_ptr<_Yp, _Del>)): Add extension constructor.
(__shared_ptr::operator*, __shared_ptr::operator->): Remove and
inherit from __shared_ptr_access base class.
(__shared_ptr::__has_esft_base): Return false for array types.
(__weak_ptr::element_type): Use remove_extent.
* include/experimental/bits/shared_ptr.h (__libfund_v1): Remove.
(__shared_ptr<__libfund_v1<_Tp>>): Remove specializations.
(__wak_ptr<__libfund_v1<_Tp>>): Likewise.
(experimental::__sp_compatible_v): Redefine using
__sp_compatible_with.
(experimental::__sp_is_constructible_v): Redefine using
__sp_is_constructible.
(get_deleter, operator<<): Change argument from __shared_ptr to
shared_ptr.
* testsuite/20_util/shared_ptr/cons/array.cc: New test.
* testsuite/20_util/shared_ptr/cons/unique_ptr_array.cc: Adjust for
new behaviour.
* testsuite/20_util/shared_ptr/observers/array.cc: Test observers for
arrays.
* testsuite/20_util/shared_ptr/observers/array_neg.cc: New test.
From-SVN: r242369