Commit Graph

9039 Commits

Author SHA1 Message Date
François Dumont 857c72026e re PR libstdc++/90277 (Debug Mode test failures)
2019-05-08  François Dumont  <fdumont@gcc.gnu.org>

	PR libstdc++/90277
	* testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
	(test01): Reserve for number of insertions to avoid rehash during test.
	* testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
	(test01): Likewise.
	* testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
	(test01): Likewise.
	(test02): Likewise.
	(test03): Likewise.

From-SVN: r271011
2019-05-08 13:03:32 +00:00
Jonathan Wakely 041aa6abe4 Improve API docs for Filesystem TS and Networking TS
* include/experimental/bits/fs_path.h: Improve docs.
	* include/experimental/bits/net.h: Fix wrong header name in comment.
	Do not document implementation details.
	* include/experimental/netfwd: Fix doxygen grouping.

From-SVN: r270990
2019-05-08 00:22:01 +01:00
Jonathan Wakely 0e7bd559e4 Improve API docs for std::pair
* include/bits/stl_pair.h: Improve docs.
	* include/std/tuple: Likewise.

From-SVN: r270989
2019-05-07 23:46:56 +01:00
Jonathan Wakely c34d3fd306 Improve API docs for <chrono> and <ratio>
* doc/doxygen/doxygroups.cc (std::literals): Add documentation for
	inline namespace.
	* include/std/chrono: Improve docs.
	* include/std/ratio: Do not document implementation details.
	* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
	line numbers.
	* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.

From-SVN: r270988
2019-05-07 23:46:53 +01:00
Jonathan Wakely f61a12b395 PR libstdc++/89102 implement new common_type rules (P0435R1, P0548R1)
This change ensures that std::common_type<> is a complete type (LWG
2408), and that std::common_type<T>, std::common_type<cv T1, cv T2>, and
std::common_type<T1, T2, R...> will use program-defined specializations
for std::common_type<T1, T2> (LWG 2465).

The implementation of common_type<T1, T2, R...> is changed to use
void_t, and the specializations for duration and time_point are modified
to also use void_t instead of depending on implementation details of
common_type.

	PR libstdc++/89102
	* doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
	* include/std/chrono (__duration_common_type_wrapper): Replace with ...
	(__duration_common_type): New helper.
	(common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
	__duration_common_type.
	(__timepoint_common_type_wrapper): Replace with ...
	(__timepoint_common_type): New helper.
	(common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
	Use __time_point_common_type.
	* include/std/type_traits (common_type<>): Define, as per LWG 2408.
	(__common_type_impl): If either argument is transformed by decay,
	use the common_type of the decayed types.
	(__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
	decayed, use __do_common_type_impl to get the common_type.
	(common_type<_Tp>): Use common_type<_Tp, _Tp>.
	(__do_member_type_wrapper, __member_type_wrapper)
	(__expanded_common_type_wrapper): Remove.
	(__common_type_pack, __common_type_fold): New helpers.
	(common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
	__member_type_wrapper and __expanded_common_type_wrapper.
	* testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
	Test zero-length template argument list.
	* testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
	Test single argument cases and argument types that should decay.
	* testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
	Adjust expected error.
	* testsuite/20_util/duration/literals/range_neg.cc: Use zero for
	dg-error lineno.
	* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
	* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
	* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.

From-SVN: r270987
2019-05-07 23:46:39 +01:00
Jonathan Wakely 73e828becf Fix incorrect DR numbers in libstdc++ manual
* doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.

From-SVN: r270954
2019-05-07 16:30:52 +01:00
Nina Dinka Ranns f4e678ef74 Make allocator propagation more consistent for operator+(basic_string) (P1165R1)
2019-05-01  Nina Dinka Ranns  <dinka.ranns@gmail.com>

	Make allocator propagation more consistent for
	operator+(basic_string) (P1165R1)
	* include/bits/basic_string.h
	(operator+(basic_string&&, basic_string&&): Changed resulting
	allocator to always be the one from the first parameter.
	* include/bits/basic_string.tcc
	(operator+(const _CharT*, const basic_string&)): Changed
	resulting allocator to be SOCCC on the second parameter's allocator.
	(operator+(_CharT, const basic_string&)): Likewise.
	* testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
	New.
	* testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
	New.

From-SVN: r270953
2019-05-07 16:30:46 +01:00
Jonathan Wakely 2313938e75 Improve API docs for std::regex
* include/bits/regex.h: Improve docs.
	* include/bits/regex.tcc: Do not document implementation details.

From-SVN: r270952
2019-05-07 16:30:40 +01:00
Jonathan Wakely 99f1295989 Add test for std::hash<std::error_code>
Copied from 19_diagnostics/error_condition/hash.cc added recently.

	* testsuite/19_diagnostics/error_code/hash.cc: New test.

From-SVN: r270951
2019-05-07 16:30:29 +01:00
François Dumont 3997383be1 printers.py (add_one_template_type_printer): Add type printer for container types in std::__debug namespace.
2019-05-06  François Dumont  <fdumont@gcc.gnu.org>

	* python/libstdcxx/v6/printers.py (add_one_template_type_printer):
	Add type printer for container types in std::__debug namespace.
	* testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
	(gdb-tests): Use distinct parameters for the type of test and use of
	regex.
	(gdb-test): Check for regex test even if 'whatis' test.
	* testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
	mode.
	* testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.

From-SVN: r270893
2019-05-06 05:33:23 +00:00
Jonathan Wakely 5b5032522b Fix reference to wrong class in comment
* include/std/system_error (error_category): Fix comment.

From-SVN: r270877
2019-05-04 16:52:52 +01:00
Jonathan Wakely 854a5c7722 PR libstdc++/90299 make filesystem::absolute overloads consistent
In this implementation it is an error to pass the empty path to absolute,
because the empty path doesn't represent any file in the filesystem so
the function cannot meet its postcondition.

Currently the absolute(const path&, error_code&) overload reports an
error for the empty path, but using errc::no_such_file_or_directory, and
the other overload does not report an error. This patch makes them
consistntly report an errc::invalid_argument error for the empty path.

	PR libstdc++/90299
	* src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
	argument is an empty path.
	(absolute(const path&, error_code&)): Use invalid_argument as error
	code instead of no_such_file_or_directory.
	* testsuite/27_io/filesystem/operations/absolute.cc: Check handling
	of non-existent paths and empty paths with both overloads of absolute.

From-SVN: r270874
2019-05-04 15:35:33 +01:00
Jonathan Wakely 2f7f1aca29 Improve API docs for <system_error> header
* include/std/system_error (error_category, error_code)
	(error_condition): Improve docs.
	* libsupc++/exception: Add missing @addtogroup Doxygen command.
	* libsupc++/exception_ptr.h (exception_ptr): Link equality operators
	to class documentation. Suppress documentation for implementation
	details.
	* libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
	Suppress documentation for implementation details.

From-SVN: r270873
2019-05-04 15:35:29 +01:00
Jonathan Wakely fe6fb0d159 Fix std::hash<std::error_condition>
The hash value should be based on the identity (i.e. address) of the
error_category member, not its object representation (i.e. underlying
bytes).

	* include/std/system_error (error_code): Remove friend declaration
	for hash<error_code>.
	(hash<error_code>::operator()): Use public member functions to access
	value and category.
	(hash<error_condition>::operator()): Use address of category, not
	its object representation.
	* src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
	Use public member functions to access value and category.
	* testsuite/19_diagnostics/error_condition/hash.cc: New test.

From-SVN: r270872
2019-05-04 15:35:25 +01:00
François Dumont 9db3f73dbf Add missing PR libstdc++/90277 reference.
From-SVN: r270870
2019-05-04 07:41:39 +00:00
François Dumont de6f5f5765 hashtable.h (_Hashtable<>::rehash): Review comment.
2019-05-04  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
	* include/bits/hashtable_policy.h
	(_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
	(_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
	(_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
	smaller than input value rather than always greater. Preserve
	_M_next_resize if called with 0 input. Use __builtin_floorl.
	(_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
	elements + number of insertions is greater than _M_next_resize. Start
	with 11 buckets if not told otherwise. Use __builtin_floorl.
	(_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
	* src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
	Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
	(_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
	told otherwise. Use __builtin_floorl.
	* testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
	to also validate _Power2_rehash_policy.
	* testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
	Adapt.

From-SVN: r270868
2019-05-04 07:38:46 +00:00
Jonathan Wakely e339291fc1 Fix new testcase to not require std::copysign
Use __builtin_copysign{,f,l} when std::copysign isn't available.

	PR libstdc++/61761
	* testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
	std::copysign.

From-SVN: r270859
2019-05-03 20:25:05 +01:00
Jonathan Wakely 56e5b093de Avoid -Woverflow warning in __numeric_limits_integer
This is the same fix as was done for std::numeric_limits in r183905.

	PR libstdc++/52119
	* include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
	overflow warning with -Wpedantic -Wsystem-headers.

From-SVN: r270858
2019-05-03 20:13:31 +01:00
Jonathan Wakely 315f8b5f18 PR libstdc++/90314 fix non-equivalent declarations of std::swap
In order to use the _GLIBCXX_NOEXCEPT_IF macro for an expression
containing commas I enclosed it in parentheses, so the preprocessor
wouldn't treat it as two arguments to the function-like macro. Clang
gives an error because now the noexcept-specifier noexcept((C)) is not
equivalent to the noexcept(C) one on the declaration of swap in
<type_traits>.

Instead of requiring extra parentheses around the expression, redefine
_GLIBCXX_NOEXCEPT_IF as a variadic macro (even though supporting that in
C++98 is a GNU extension).

	PR libstdc++/90314
	* include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
	* include/bits/move.h (swap): Remove extra parentheses.

From-SVN: r270827
2019-05-02 22:23:38 +01:00
Jonathan Wakely b752e2c926 Remove redundant __constexpr_addressof function
The std::__addressof function is always constexpr, even in C++14, so we
can just use that.

	* include/experimental/bits/lfts_config.h: Improve doc markup.
	* include/experimental/optional: Improve docs.
	(_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
	(__constexpr_addressof): Remove.
	(optional::operator->()): Use std::__addressof().
	* include/std/optional (optional::operator->()): Adjust whitespace.
	* testsuite/experimental/optional/constexpr/observers/2.cc: Check
	that operator-> is still constexpr with overloaded operator&. Change
	to compile-only test.
	* testsuite/experimental/optional/constexpr/observers/3.cc: Change to
	compile-only test.

From-SVN: r270826
2019-05-02 22:23:35 +01:00
Jonathan Wakely efa9d8eef0 Improve smart pointer docs
* include/bits/shared_ptr.h: Improve docs.
	* include/bits/shared_ptr_atomic.h: Likewise.
	* include/bits/unique_ptr.h: Likewise. Adjust whitespace.

From-SVN: r270825
2019-05-02 22:23:25 +01:00
Jonathan Wakely 8c6a71e47c Miscellaneous API doc improvements
* include/bits/basic_string.h: Fix iterator/index confusion in
	Doxygen comments.
	* include/bits/range_access.h: Fix Doxygen warnings.
	* include/bits/refwrap.h: Do not document implementation details.
	(ref, cref): Group docs with reference_wrapper.
	* include/std/fstream: Fix Doxygen markup.
	* libsupc++/initializer_list (begin, end): Group docs with
	initializer_list.

From-SVN: r270814
2019-05-02 16:46:50 +01:00
Jonathan Wakely 50d5fcf5e2 Allow Markdown formatting in Doxygen comments
* doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.

From-SVN: r270813
2019-05-02 16:46:46 +01:00
Jonathan Wakely 725708ab75 Improve docs for mutexes
* include/bits/unique_lock.h: Fix/improve doxygen markup.
	* include/std/mutex: Likewise.
	* include/std/shared_mutex: Likewise.

From-SVN: r270812
2019-05-02 16:46:42 +01:00
Jonathan Wakely d727fdc42b Improve docs for C++17 Filesystem library
* include/bits/fs_dir.h: Fix/improve doxygen markup.
	* include/bits/fs_fwd.h: Likewise.
	* include/bits/fs_ops.h: Likewise.
	* include/bits/fs_path.h: Likewise.
	* include/std/filesystem: Likewise.

From-SVN: r270811
2019-05-02 16:46:38 +01:00
Jonathan Wakely 3084625d39 Improve docs for Networking TS
* include/experimental/bits/net.h: Fix/improve doxygen markup.
	* include/experimental/buffer: Likewise.
	* include/experimental/executor: Likewise.
	* include/experimental/internet: Likewise.
	* include/experimental/io_context: Likewise.
	* include/experimental/net: Likewise.
	* include/experimental/netfwd: Likewise.
	* include/experimental/socket: Likewise.
	* include/experimental/timer: Likewise.

From-SVN: r270810
2019-05-02 16:46:34 +01:00
Jonathan Wakely 1ababc8bd5 Improve docs for Library Fundamentals TS
* doc/doxygen/doxygroups.cc: Move description of experimental group
	here.
	* include/experimental/algorithm: Add to libfund-ts doc group.
	* include/experimental/any: Likewise. Do not document implementation
	details.
	* include/experimental/array: Add to libfund-ts doc group.
	* include/experimental/bits/lfts_config.h: Define libfund-ts doc group
	for Library Fundamentals.
	* include/experimental/chrono: Add to libfund-ts doc group.
	* include/experimental/deque: Likewise.
	* include/experimental/forward_list: Likewise.
	* include/experimental/functional: Likewise.
	* include/experimental/iterator: Likewise.
	* include/experimental/list: Likewise.
	* include/experimental/map: Likewise.
	* include/experimental/memory: Likewise.
	* include/experimental/memory_resource: Likewise. Improve docs.
	details.
	* include/experimental/numeric: Add to libfund-ts doc group.
	* include/experimental/optional: Likewise.
	* include/experimental/propagate_const: Likewise.
	* include/experimental/random: Likewise.
	* include/experimental/ratio: Likewise.
	* include/experimental/regex: Likewise.
	* include/experimental/set: Likewise.
	* include/experimental/source_location: Likewise.
	* include/experimental/string: Likewise.
	* include/experimental/string_view: Likewise.
	* include/experimental/system_error: Likewise.
	* include/experimental/tuple: Likewise.
	* include/experimental/type_traits: Likewise.
	* include/experimental/unordered_map: Likewise.
	* include/experimental/unordered_set: Likewise.
	* include/experimental/utility: Likewise.
	* include/experimental/vector: Likewise.
	* testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
	* testsuite/experimental/array/neg.cc: Adjust dg-error.
	* testsuite/experimental/propagate_const/assignment/move_neg.cc:
	Likewise.
	* testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
	* testsuite/experimental/propagate_const/requirements2.cc: Likewise.
	* testsuite/experimental/propagate_const/requirements3.cc: Likewise.
	* testsuite/experimental/propagate_const/requirements4.cc: Likewise.
	* testsuite/experimental/propagate_const/requirements5.cc: Likewise.

From-SVN: r270809
2019-05-02 16:46:29 +01:00
Jonathan Wakely caace30081 Improve docs for Filesystem TS
* include/experimental/bits/fs_dir.h: Fix Doxygen markup.
	* include/experimental/bits/fs_fwd.h: Improve docs.
	* include/experimental/bits/fs_ops.h: fix Doxygen markup.
	* include/experimental/bits/fs_path.h: Likewise.
	(path, filesystem_error, u8path): Improve docs.
	* include/experimental/filesystem: Link to docs for TS.

From-SVN: r270808
2019-05-02 16:45:32 +01:00
Jonathan Wakely c05ab418b3 Improve API docs for <memory> and <scoped_allocator>
* config/allocator/new_allocator_base.h (__allocator_base): Add
	workaround for Doxygen bug #6945.
	* include/std/memory: Improve docs. Define group for pointer safety.
	* include/std/scoped_allocator: Improve docs. Use "undocumented"
	conditional to suppress documentation for implementation details.

From-SVN: r270807
2019-05-02 16:45:04 +01:00
Jonathan Wakely d16250de4a Improve API docs for mathematical special functions
This prevents "Mathematical Special Functions" appearing in the
top-level menu of the generated HTML docs, and adds "TR1" to the title
for the TR1 docs, to avoid duplicate titles.

	* include/bits/specfun.h: Improve docs.
	* include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
	and namespaces.

From-SVN: r270806
2019-05-02 16:44:59 +01:00
Jonathan Wakely 19aaf81412 Improve Doxygen docs for nested namespaces
* doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
	(std::experimental): Add docs.
	* doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
	namespace to nothing when generating docs.
	* include/bits/regex_constants.h (std::regex_constants): Improve docs.
	* include/std/chrono (std::chrono): Likewise.
	* include/std/functional (std::placeholders): Likewise.
	* include/std/thread (std::this_thread): Likewise.

From-SVN: r270805
2019-05-02 16:44:55 +01:00
Jonathan Wakely 69b1efc787 Fix markup for Parallel Mode docs
* include/parallel/settings.h: Fix Doxygen markup.

From-SVN: r270804
2019-05-02 16:44:51 +01:00
Jonathan Wakely 574dfb67be Adjust Doxygen processing of pb_ds containers
Several of the pb_ds headers are intended to be included multiple times,
within the definition of various class templates. The including files
define macros like PB_DS_CLASS_C_DEC and PB_DS_GEN_POS before including
these headers.

In some cases the types defined in the headers are actually nested types
within other classes, and so should not have been documented as though
they are declared in the global namespace, as in:
https://gcc.gnu.org/onlinedocs/gcc-8.3.0/libstdc++/api/a12028.html

In other cases the headers provide inline member function definitions,
but when processed by Doxygen the class name "PB_DS_CLASS_C_DEC" is not
recognised.

This patch makes Doxygen ignore definitions that only make sense when
included in the right context with the right macros defined.

	* include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
	anything unless PB_DS_CLASS_C_DEC is defined.
	* include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
	* include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
	Likewise.
	* include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
	* include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
	* include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
	Likewise.
	* include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
	* include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
	Likewise.
	* include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
	Likewise.

From-SVN: r270803
2019-05-02 16:44:46 +01:00
Jonathan Wakely acd482ba72 Update libstdc++ Doxygen config
The GROUP_NESTED_COMPOUNDS option means that types nested inside inline
namespaces or other classes will be automatically added to a Doxygen
group, e.g. this actually works as intended:

  /**
   * @defgroup chrono Time
   * @ingroup utilities
   *
   * Classes and functions for time.
   * @{
   */

  namespace chrono
  {
    template<typename _Rep, typename _Period = ratio<1>>
      struct duration;

    template<typename _Clock, typename _Dur = typename _Clock::duration>
      struct time_point;
  }

  /// @}

Currently chrono::duration and chrono::time_point are not added to the
"chrono" group. They would need an explicit @ingroup tag added to them
individually. With GROUP_NESTED_COMPOUNDS=YES they get added to the
enclosing group.

The SORT_BY_SCOPE_NAME option means that the list of classes will sort
by class name, not the full qualified-id. Currently the alphabetical
Class List for classes beginning with 'c' looks like:

  char_traits (__gnu_cxx)
  character (__gnu_cxx)
  condition_base (__gnu_cxx)
  const_iterator_
  condition_variable_any (std::_V2)
  cauchy_distribution (std)
  char_traits (std)

i.e. the list is sorted by the namespaces first, then the class names.
This is not helpful when you don't know which namespace a class might be
in, and inline namespaces with reserved names are not hidden (see
https://github.com/doxygen/doxygen/issues/5914 for a feature request to
allow that).

With SORT_BY_SCOPE_NAME=NO the list looks like:

  cauchy_distribution (std)
  char_traits (__gnu_cxx)
  char_traits (std)
  character (__gnu_cxx)
  condition_base (__gnu_cxx)
  condition_variable_any (std::_V2)
  const_iterator_

This allows you to find a class by name more easily.

Also add PREDEFINED macros so that __attribute__ and various macros like
_GLIBCXX_NO_DISCARD, _GLIBCXX14_CONSTEXPR don't appear in the generated
docs.

	* doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
	GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
	_GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
	Doxygen expands.

From-SVN: r270802
2019-05-02 16:44:16 +01:00
Rainer Orth 7ee7c29355 Update Solaris baselines for GCC 9.1
* config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
	* config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
	* config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
	* config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
	* config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
	* config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
	Likewise.
	* config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
	* config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
	Likewise.

From-SVN: r270773
2019-05-01 16:14:30 +00:00
Jonathan Wakely 4f75543dc4 PR libstdc++/61761 fix std::proj for targets without C99 cproj
The current generic implementation of __complex_proj used when cproj is
not available calculates the wrong projection, giving a different result
than given by C99's cproj.

When C99 cproj is not available but isinf and copysign are, use those to
give correct results for float, double and long double. Otherwise, and
for other specializations of std::complex, just use a generic version
that returns its argument, and so doesn't support infinities.

We might want to consider adding additional overloads of __complex_proj
to support extended types such as _Float64x, _Float128 etc.

	PR libstdc++/61761
	* include/std/complex (__complex_proj): Return parameter unchanged.
	[_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
	floating-point types to take std::complex arguments.
	[_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
	floating-point types.
	* testsuite/26_numerics/complex/proj.cc: New test.

From-SVN: r270759
2019-05-01 01:08:36 +01:00
Jakub Jelinek 9e3501f765 gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports to _Lock_policyE[012].
* config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
	to _Lock_policyE[012].
	* config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.

From-SVN: r270687
2019-04-30 13:40:28 +02:00
Jonathan Wakely 95767c6597 Fix filesystem::path tests
The root_path.cc test had some debugging macros left in accidentally, so
didn't FAIL correctly if an assertion failed.

The string-char8_t.cc tests didn't compile on Windows.

	* testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
	macros accidentally left in.
	* testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
	unnecessary -lstdc++fs option. Fix test for mingw.
	* testsuite/experimental/filesystem/path/native/string-char8_t.cc:
	Fix test for mingw.

From-SVN: r270685
2019-04-30 11:39:59 +01:00
Jakub Jelinek 379637d5e2 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
From-SVN: r270678
2019-04-30 10:55:12 +02:00
Jonathan Wakely f373ad68cf Adjust doxygen comment for std::generate_n
* include/bits/stl_algo.h (generate_n): Adjust doxygen comment.

From-SVN: r270651
2019-04-29 14:31:50 +01:00
Jonathan Wakely 81912fb385 Use _GLIBCXX_NOEXCEPT_IF for std::swap
* include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
	_GLIBCXX_NOEXCEPT_IF to simplify declarations.

From-SVN: r270650
2019-04-29 14:25:38 +01:00
Jonathan Wakely 7bbdd8d13e PR libstdc++/71312 Increase alignment of pooled mutexes
PR libstdc++/71312
	* src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.

From-SVN: r270649
2019-04-29 13:55:29 +01:00
Jonathan Wakely ad1f468736 Add nodiscard to std::vector<bool>::empty()
We already added it to the std::vector primary template.

	* include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
	attribute.

From-SVN: r270648
2019-04-29 13:35:24 +01:00
Jonathan Wakely 82b6276fb3 Remove unused std::_Iter_base class template
This class template has been unused since __gnu_debug::__base was
removed in r263786.

	* include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
	class template and partial specialization.

From-SVN: r270647
2019-04-29 13:12:46 +01:00
Jonathan Wakely 846541dd15 PR libstdc++/87982 Fix generate_n and fill_n use of _Size parameter
The standard only requires that _Size can be converted to an integral
type, not that it can be used for arithmetic. Add a new set of
__size_to_integer helper functions to do the conversion (which will be
ambiguous if there is no one conversion that is better than any others).

Also add tests for DR 426 which requires these algorithms and search_n
to handle negative values of n.

	PR libstdc++/87982
	* include/bits/stl_algo.h (generate_n): Convert _Size parameter to
	an integral type.
	* include/bits/stl_algobase.h (__size_to_integer): New overloaded
	functions to convert a value to an integral type.
	(__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
	(fill_n): Convert _Size parameter to an integral type.
	* testsuite/25_algorithms/fill_n/dr426.cc: New test.
	* testsuite/25_algorithms/generate_n/87982.cc: New test.
	* testsuite/25_algorithms/generate_n/dr426.cc: New test.

From-SVN: r270646
2019-04-29 13:12:43 +01:00
Jonathan Wakely ecc7ed8aae Fix ChangeLog format
From-SVN: r270633
2019-04-28 22:38:19 +01:00
Nina Dinka Ranns ec087ba34e Adding noexcept-specification on tuple constructors (LWG 2899)
2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>

* libstdc++-v3/include/std/tuple:
(tuple()): Add noexcept-specification.
(tuple(const _Elements&...)): Likewise
(tuple(_UElements&&...)): Likewise
(tuple(const tuple<_UElements...>&)): Likewise
(tuple(tuple<_UElements...>&&)): Likewise
(tuple(const _T1&, const _T2&)): Likewise
(tuple(_U1&&, _U2&&)): Likewise
(tuple(const tuple<_U1, _U2>&): Likewise
(tuple(tuple<_U1, _U2>&&): Likewise
(tuple(const pair<_U1, _U2>&): Likewise
(tuple(pair<_U1, _U2>&&): Likewise
* libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New

From-SVN: r270632
2019-04-29 00:17:50 +03:00
Marc Glisse 2b326d53c2 Use __restrict for __relocate_object_a
2019-04-27  Marc Glisse  <marc.glisse@inria.fr>

	PR libstdc++/87106
	* include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
	arguments with __restrict.

From-SVN: r270624
2019-04-27 14:09:20 +00:00
H.J. Lu ca2efef75d x32: Update baseline_symbols.txt
* config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.

From-SVN: r270613
2019-04-26 09:53:54 -07:00
Jonathan Wakely 700e6332a7 Remove redundant step in experimental::filesystem::path construction
* include/experimental/bits/fs_path.h
	(path::_S_convert_loc<_InputIterator>): Create const std::string to
	avoid redundant call to _S_convert_loc with non-const pointers.

From-SVN: r270608
2019-04-26 16:58:47 +01:00