From: Jonathan Wakely Date: Thu, 2 May 2019 15:46:29 +0000 (+0100) Subject: Improve docs for Library Fundamentals TS X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1ababc8bd59bcca3bac8c08d367bf0e91c7e11ab;p=gcc.git 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 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index b22563dcb82..f5f6e74ce92 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,50 @@ 2019-05-02 Jonathan Wakely + * 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. + * 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. diff --git a/libstdc++-v3/doc/doxygen/doxygroups.cc b/libstdc++-v3/doc/doxygen/doxygroups.cc index 6822eac8070..630e02296ed 100644 --- a/libstdc++-v3/doc/doxygen/doxygroups.cc +++ b/libstdc++-v3/doc/doxygen/doxygroups.cc @@ -160,3 +160,15 @@ summarized in tables. */ * Components for concurrent operations, including threads, mutexes, * and condition variables. */ + +/** + * @defgroup experimental Technical Specifications + * + * Components specified by various Technical Specifications. + * + * As indicated by the std::experimental namespace and the header paths, + * the contents of these Technical Specifications are experimental and not + * part of the C++ standard. As such the interfaces and implementations may + * change in the future, and there is no guarantee of compatibility + * between different GCC releases for these features. + */ diff --git a/libstdc++-v3/include/experimental/algorithm b/libstdc++-v3/include/experimental/algorithm index de62c73d55f..8ba212c5132 100644 --- a/libstdc++-v3/include/experimental/algorithm +++ b/libstdc++-v3/include/experimental/algorithm @@ -24,6 +24,7 @@ /** @file experimental/algorithm * This is a TS C++ Library header. + * @ingroup libfund-ts */ #ifndef _GLIBCXX_EXPERIMENTAL_ALGORITHM diff --git a/libstdc++-v3/include/experimental/any b/libstdc++-v3/include/experimental/any index ed7a115f6b2..a6e0fc683d9 100644 --- a/libstdc++-v3/include/experimental/any +++ b/libstdc++-v3/include/experimental/any @@ -24,6 +24,7 @@ /** @file experimental/any * This is a TS C++ Library header. + * @ingroup libfund-ts */ #ifndef _GLIBCXX_EXPERIMENTAL_ANY @@ -49,7 +50,7 @@ inline namespace fundamentals_v1 { /** * @defgroup any Type-safe container of any type - * @ingroup experimental + * @ingroup libfund-ts * * A type-safe container for single values of value types, as * described in n3804 "Any Library Proposal (Revision 3)". @@ -69,6 +70,7 @@ inline namespace fundamentals_v1 virtual const char* what() const noexcept { return "bad any_cast"; } }; + /// @cond undocumented [[gnu::noreturn]] inline void __throw_bad_any_cast() { #if __cpp_exceptions @@ -77,6 +79,7 @@ inline namespace fundamentals_v1 __builtin_abort(); #endif } + /// @endcond /** * @brief A type-safe container of any type. @@ -410,6 +413,7 @@ inline namespace fundamentals_v1 } // @} + /// @cond undocumented template void* __any_caster(const any* __any) { @@ -422,6 +426,7 @@ inline namespace fundamentals_v1 __any->_M_manager(any::_Op_access, __any, &__arg); return __arg._M_obj; } + /// @endcond /** * @brief Access the contained object. diff --git a/libstdc++-v3/include/experimental/array b/libstdc++-v3/include/experimental/array index 3fece233319..5a35fd499d8 100644 --- a/libstdc++-v3/include/experimental/array +++ b/libstdc++-v3/include/experimental/array @@ -24,6 +24,7 @@ /** @file experimental/array * This is a TS C++ Library header. + * @ingroup libfund-ts */ #ifndef _GLIBCXX_EXPERIMENTAL_ARRAY @@ -47,7 +48,7 @@ inline namespace fundamentals_v2 #define __cpp_lib_experimental_make_array 201505 /** * @defgroup make_array Array creation functions - * @ingroup experimental + * @ingroup libfund-ts * * Array creation functions as described in N4529, * Working Draft, C++ Extensions for Library Fundamentals, Version 2 @@ -78,6 +79,7 @@ template "any of the arguments is a reference_wrapper"); }; +/// Create a std::array from a variable-length list of arguments. template constexpr array::type, sizeof...(_Types)> @@ -93,6 +95,7 @@ template return {{__a[_Idx]...}}; } +/// Create a std::array from an array. template constexpr array, _Nm> to_array(_Tp (&__a)[_Nm]) diff --git a/libstdc++-v3/include/experimental/bits/lfts_config.h b/libstdc++-v3/include/experimental/bits/lfts_config.h index cf0cd1dea79..8fc67054c55 100644 --- a/libstdc++-v3/include/experimental/bits/lfts_config.h +++ b/libstdc++-v3/include/experimental/bits/lfts_config.h @@ -30,6 +30,17 @@ #if __cplusplus >= 201402L #include + /** @defgroup libfund-ts Library Fundamentals TS + * @ingroup experimental + * + * Components defined by the _C++ Extensions for Library Fundamentals_ + * Technical Specification, versions 1 and 2. + * + * ISO/IEC TS 19568:2015 C++ Extensions for Library Fundamentals + * + * ISO/IEC TS 19568:2017 C++ Extensions for Library Fundamentals, Version 2 + */ + #if _GLIBCXX_INLINE_VERSION namespace std _GLIBCXX_VISIBILITY(default) { diff --git a/libstdc++-v3/include/experimental/chrono b/libstdc++-v3/include/experimental/chrono index 90fb39f7582..0e41321cc27 100644 --- a/libstdc++-v3/include/experimental/chrono +++ b/libstdc++-v3/include/experimental/chrono @@ -24,6 +24,7 @@ /** @file experimental/chrono * This is a TS C++ Library header. + * @ingroup libfund-ts */ // diff --git a/libstdc++-v3/include/experimental/deque b/libstdc++-v3/include/experimental/deque index 2298674d70b..3a2be39e58f 100644 --- a/libstdc++-v3/include/experimental/deque +++ b/libstdc++-v3/include/experimental/deque @@ -24,6 +24,7 @@ /** @file experimental/deque * This is a TS C++ Library header. + * @ingroup libfund-ts */ #ifndef _GLIBCXX_EXPERIMENTAL_DEQUE diff --git a/libstdc++-v3/include/experimental/forward_list b/libstdc++-v3/include/experimental/forward_list index f6ffbf0a0af..3cee24d2429 100644 --- a/libstdc++-v3/include/experimental/forward_list +++ b/libstdc++-v3/include/experimental/forward_list @@ -24,6 +24,7 @@ /** @file experimental/forward_list * This is a TS C++ Library header. + * @ingroup libfund-ts */ #ifndef _GLIBCXX_EXPERIMENTAL_FORWARD_LIST diff --git a/libstdc++-v3/include/experimental/functional b/libstdc++-v3/include/experimental/functional index 90f2652c29b..28a5708f377 100644 --- a/libstdc++-v3/include/experimental/functional +++ b/libstdc++-v3/include/experimental/functional @@ -24,6 +24,7 @@ /** @file experimental/functional * This is a TS C++ Library header. + * @ingroup libfund-ts */ #ifndef _GLIBCXX_EXPERIMENTAL_FUNCTIONAL diff --git a/libstdc++-v3/include/experimental/iterator b/libstdc++-v3/include/experimental/iterator index f2e10b22069..ff367955bc6 100644 --- a/libstdc++-v3/include/experimental/iterator +++ b/libstdc++-v3/include/experimental/iterator @@ -24,6 +24,7 @@ /** @file experimental/iterator * This is a TS C++ Library header. + * @ingroup libfund-ts */ // diff --git a/libstdc++-v3/include/experimental/list b/libstdc++-v3/include/experimental/list index 2b7a331e63a..ae9269922ac 100644 --- a/libstdc++-v3/include/experimental/list +++ b/libstdc++-v3/include/experimental/list @@ -24,6 +24,7 @@ /** @file experimental/list * This is a TS C++ Library header. + * @ingroup libfund-ts */ #ifndef _GLIBCXX_EXPERIMENTAL_LIST diff --git a/libstdc++-v3/include/experimental/map b/libstdc++-v3/include/experimental/map index 58bf93a891b..82bc493af44 100644 --- a/libstdc++-v3/include/experimental/map +++ b/libstdc++-v3/include/experimental/map @@ -24,6 +24,7 @@ /** @file experimental/map * This is a TS C++ Library header. + * @ingroup libfund-ts */ #ifndef _GLIBCXX_EXPERIMENTAL_MAP diff --git a/libstdc++-v3/include/experimental/memory b/libstdc++-v3/include/experimental/memory index b8faeb23eef..a59394b3583 100644 --- a/libstdc++-v3/include/experimental/memory +++ b/libstdc++-v3/include/experimental/memory @@ -24,6 +24,7 @@ /** @file experimental/memory * This is a TS C++ Library header. + * @ingroup libfund-ts */ // diff --git a/libstdc++-v3/include/experimental/memory_resource b/libstdc++-v3/include/experimental/memory_resource index e9fece55cd0..a0b30632154 100644 --- a/libstdc++-v3/include/experimental/memory_resource +++ b/libstdc++-v3/include/experimental/memory_resource @@ -24,6 +24,7 @@ /** @file experimental/memory_resource * This is a TS C++ Library header. + * @ingroup libfund-ts */ #ifndef _GLIBCXX_EXPERIMENTAL_MEMORY_RESOURCE @@ -37,12 +38,14 @@ #include #include +/// @cond namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION template class malloc_allocator; _GLIBCXX_END_NAMESPACE_VERSION } // namespace __gnu_cxx +/// @endcond namespace std { _GLIBCXX_BEGIN_NAMESPACE_VERSION @@ -259,6 +262,7 @@ namespace pmr { { return !(__a == __b); } + /// @cond undocumented class __resource_adaptor_common { template friend class __resource_adaptor_imp; @@ -372,6 +376,7 @@ namespace pmr { : std::alignment_of::type { }; #endif }; + /// @endcond // 8.7.1 __resource_adaptor_imp template @@ -501,6 +506,7 @@ namespace pmr { // The default memory resource + /// @cond undocumented inline std::atomic& __get_default_resource() { @@ -509,11 +515,14 @@ namespace pmr { static type* __r = new(__buf) type(new_delete_resource()); return *__r; } + /// @endcond + /// Get the current default resource. inline memory_resource* get_default_resource() noexcept { return __get_default_resource().load(); } + /// Change the default resource and return the previous one. inline memory_resource* set_default_resource(memory_resource* __r) noexcept { diff --git a/libstdc++-v3/include/experimental/numeric b/libstdc++-v3/include/experimental/numeric index e5123a993d4..aa5ba7ffbe1 100644 --- a/libstdc++-v3/include/experimental/numeric +++ b/libstdc++-v3/include/experimental/numeric @@ -24,6 +24,7 @@ /** @file experimental/numeric * This is a TS C++ Library header. + * @ingroup libfund-ts */ // diff --git a/libstdc++-v3/include/experimental/optional b/libstdc++-v3/include/experimental/optional index f465eca96f0..9a0112de854 100644 --- a/libstdc++-v3/include/experimental/optional +++ b/libstdc++-v3/include/experimental/optional @@ -24,23 +24,12 @@ /** @file experimental/optional * This is a TS C++ Library header. + * @ingroup libfund-ts */ #ifndef _GLIBCXX_EXPERIMENTAL_OPTIONAL #define _GLIBCXX_EXPERIMENTAL_OPTIONAL 1 -/** - * @defgroup experimental Experimental - * - * Components specified by various Technical Specifications. - * - * As indicated by the std::experimental namespace and the header paths, - * the contents of these Technical Specifications are experimental and not - * part of the C++ standard. As such the interfaces and implementations may - * change in the future, and there is no guarantee of compatibility - * between different GCC releases for these features. - */ - #if __cplusplus >= 201402L #include @@ -63,7 +52,7 @@ inline namespace fundamentals_v1 { /** * @defgroup optional Optional values - * @ingroup experimental + * @ingroup libfund-ts * * Class template for optional values and surrounding facilities, as * described in n3793 "A proposal to add a utility class to represent diff --git a/libstdc++-v3/include/experimental/propagate_const b/libstdc++-v3/include/experimental/propagate_const index a28bed78746..dcdfca46fed 100644 --- a/libstdc++-v3/include/experimental/propagate_const +++ b/libstdc++-v3/include/experimental/propagate_const @@ -24,6 +24,7 @@ /** @file experimental/propagate_const * This is a TS C++ Library header. + * @ingroup libfund-ts */ #ifndef _GLIBCXX_EXPERIMENTAL_PROPAGATE_CONST @@ -49,7 +50,7 @@ inline namespace fundamentals_v2 { /** * @defgroup propagate_const Const-propagating wrapper - * @ingroup experimental + * @ingroup libfund-ts * * A const-propagating wrapper that propagates const to pointer-like members, * as described in n4388 "A Proposal to Add a Const-Propagating Wrapper @@ -58,7 +59,7 @@ inline namespace fundamentals_v2 * @{ */ -/// Const-propagating wrapper. + /// Const-propagating wrapper. template class propagate_const { diff --git a/libstdc++-v3/include/experimental/random b/libstdc++-v3/include/experimental/random index 7176c80f7ea..2d4b83df625 100644 --- a/libstdc++-v3/include/experimental/random +++ b/libstdc++-v3/include/experimental/random @@ -24,6 +24,7 @@ /** @file experimental/random * This is a TS C++ Library header. + * @ingroup libfund-ts */ #ifndef _GLIBCXX_EXPERIMENTAL_RANDOM diff --git a/libstdc++-v3/include/experimental/ratio b/libstdc++-v3/include/experimental/ratio index 6129d1ea36a..3e12af51463 100644 --- a/libstdc++-v3/include/experimental/ratio +++ b/libstdc++-v3/include/experimental/ratio @@ -24,6 +24,7 @@ /** @file experimental/ratio * This is a TS C++ Library header. + * @ingroup libfund-ts */ // diff --git a/libstdc++-v3/include/experimental/regex b/libstdc++-v3/include/experimental/regex index 6d0ee9aa373..71f0ab9c4de 100644 --- a/libstdc++-v3/include/experimental/regex +++ b/libstdc++-v3/include/experimental/regex @@ -24,6 +24,7 @@ /** @file experimental/regex * This is a TS C++ Library header. + * @ingroup libfund-ts */ #ifndef _GLIBCXX_EXPERIMENTAL_REGEX diff --git a/libstdc++-v3/include/experimental/set b/libstdc++-v3/include/experimental/set index 145ca27815d..e55922e7e6f 100644 --- a/libstdc++-v3/include/experimental/set +++ b/libstdc++-v3/include/experimental/set @@ -24,6 +24,7 @@ /** @file experimental/set * This is a TS C++ Library header. + * @ingroup libfund-ts */ #ifndef _GLIBCXX_EXPERIMENTAL_SET diff --git a/libstdc++-v3/include/experimental/source_location b/libstdc++-v3/include/experimental/source_location index 9fa3c4bb9a7..801a1c948a7 100644 --- a/libstdc++-v3/include/experimental/source_location +++ b/libstdc++-v3/include/experimental/source_location @@ -24,6 +24,7 @@ /** @file experimental/source_location * This is a TS C++ Library header. + * @ingroup libfund-ts */ #ifndef _GLIBCXX_EXPERIMENTAL_SRCLOC diff --git a/libstdc++-v3/include/experimental/string b/libstdc++-v3/include/experimental/string index 65bf2b8d009..838af850b52 100644 --- a/libstdc++-v3/include/experimental/string +++ b/libstdc++-v3/include/experimental/string @@ -24,6 +24,7 @@ /** @file experimental/string * This is a TS C++ Library header. + * @ingroup libfund-ts */ #ifndef _GLIBCXX_EXPERIMENTAL_STRING diff --git a/libstdc++-v3/include/experimental/string_view b/libstdc++-v3/include/experimental/string_view index 9e810dec844..9449869367c 100644 --- a/libstdc++-v3/include/experimental/string_view +++ b/libstdc++-v3/include/experimental/string_view @@ -24,6 +24,7 @@ /** @file experimental/string_view * This is a TS C++ Library header. + * @ingroup libfund-ts */ // @@ -57,7 +58,7 @@ inline namespace fundamentals_v1 * * @ingroup strings * @ingroup sequences - * @ingroup experimental + * @ingroup libfund-ts * * @tparam _CharT Type of character * @tparam _Traits Traits for character type, defaults to diff --git a/libstdc++-v3/include/experimental/system_error b/libstdc++-v3/include/experimental/system_error index 73640a40161..ac91c9a4b17 100644 --- a/libstdc++-v3/include/experimental/system_error +++ b/libstdc++-v3/include/experimental/system_error @@ -24,6 +24,7 @@ /** @file experimental/system_error * This is a TS C++ Library header. + * @ingroup libfund-ts */ // diff --git a/libstdc++-v3/include/experimental/tuple b/libstdc++-v3/include/experimental/tuple index be42b588131..8a56fbc6732 100644 --- a/libstdc++-v3/include/experimental/tuple +++ b/libstdc++-v3/include/experimental/tuple @@ -24,6 +24,7 @@ /** @file experimental/tuple * This is a TS C++ Library header. + * @ingroup libfund-ts */ #ifndef _GLIBCXX_EXPERIMENTAL_TUPLE diff --git a/libstdc++-v3/include/experimental/type_traits b/libstdc++-v3/include/experimental/type_traits index ab1ba92c3c6..09743c5e92b 100644 --- a/libstdc++-v3/include/experimental/type_traits +++ b/libstdc++-v3/include/experimental/type_traits @@ -24,6 +24,7 @@ /** @file experimental/type_traits * This is a TS C++ Library header. + * @ingroup libfund-ts */ // diff --git a/libstdc++-v3/include/experimental/unordered_map b/libstdc++-v3/include/experimental/unordered_map index 74a360c1c9c..78079599957 100644 --- a/libstdc++-v3/include/experimental/unordered_map +++ b/libstdc++-v3/include/experimental/unordered_map @@ -24,6 +24,7 @@ /** @file experimental/unordered_map * This is a TS C++ Library header. + * @ingroup libfund-ts */ #ifndef _GLIBCXX_EXPERIMENTAL_UNORDERED_MAP diff --git a/libstdc++-v3/include/experimental/unordered_set b/libstdc++-v3/include/experimental/unordered_set index a84cf6aa3d8..53e6d24c735 100644 --- a/libstdc++-v3/include/experimental/unordered_set +++ b/libstdc++-v3/include/experimental/unordered_set @@ -24,6 +24,7 @@ /** @file experimental/unordered_set * This is a TS C++ Library header. + * @ingroup libfund-ts */ #ifndef _GLIBCXX_EXPERIMENTAL_UNORDERED_SET diff --git a/libstdc++-v3/include/experimental/utility b/libstdc++-v3/include/experimental/utility index fff7bdbb892..635bffa1c6e 100644 --- a/libstdc++-v3/include/experimental/utility +++ b/libstdc++-v3/include/experimental/utility @@ -24,6 +24,7 @@ /** @file experimental/utility * This is a TS C++ Library header. + * @ingroup libfund-ts */ #ifndef _GLIBCXX_EXPERIMENTAL_UTILITY diff --git a/libstdc++-v3/include/experimental/vector b/libstdc++-v3/include/experimental/vector index 965b9036b6d..df107d5bab6 100644 --- a/libstdc++-v3/include/experimental/vector +++ b/libstdc++-v3/include/experimental/vector @@ -24,6 +24,7 @@ /** @file experimental/vector * This is a TS C++ Library header. + * @ingroup libfund-ts */ #ifndef _GLIBCXX_EXPERIMENTAL_VECTOR diff --git a/libstdc++-v3/testsuite/experimental/any/misc/any_cast_neg.cc b/libstdc++-v3/testsuite/experimental/any/misc/any_cast_neg.cc index 145e0be0ed4..8498c740029 100644 --- a/libstdc++-v3/testsuite/experimental/any/misc/any_cast_neg.cc +++ b/libstdc++-v3/testsuite/experimental/any/misc/any_cast_neg.cc @@ -25,5 +25,6 @@ void test01() using std::experimental::any_cast; const any y(1); - any_cast(y); // { dg-error "qualifiers" "" { target { *-*-* } } 357 } + any_cast(y); // { dg-error "here" } + // { dg-error "discards qualifiers" "" { target { *-*-* } } 0 } } diff --git a/libstdc++-v3/testsuite/experimental/array/neg.cc b/libstdc++-v3/testsuite/experimental/array/neg.cc index 75190d7ca7a..a602dc8ef4e 100644 --- a/libstdc++-v3/testsuite/experimental/array/neg.cc +++ b/libstdc++-v3/testsuite/experimental/array/neg.cc @@ -24,5 +24,5 @@ int main() { int dummy; auto bad = std::experimental::make_array(std::ref(dummy)); - // { dg-error "explicit target type" "" { target *-*-* } 76 } + // { dg-error "explicit target type" "" { target *-*-* } 0 } } diff --git a/libstdc++-v3/testsuite/experimental/propagate_const/assignment/move_neg.cc b/libstdc++-v3/testsuite/experimental/propagate_const/assignment/move_neg.cc index 3deef6b9904..84e8baae26d 100644 --- a/libstdc++-v3/testsuite/experimental/propagate_const/assignment/move_neg.cc +++ b/libstdc++-v3/testsuite/experimental/propagate_const/assignment/move_neg.cc @@ -25,8 +25,6 @@ using std::experimental::propagate_const; using std::unique_ptr; -// { dg-error "no type" "" { target *-*-* } 160 } - int main() { propagate_const> test5; @@ -35,3 +33,4 @@ int main() propagate_const> test6; test6 = dummy2; // { dg-error "no match" } } +// { dg-prune-output "no type" } diff --git a/libstdc++-v3/testsuite/experimental/propagate_const/cons/move_neg.cc b/libstdc++-v3/testsuite/experimental/propagate_const/cons/move_neg.cc index e384fe96143..d4bd4dd34ea 100644 --- a/libstdc++-v3/testsuite/experimental/propagate_const/cons/move_neg.cc +++ b/libstdc++-v3/testsuite/experimental/propagate_const/cons/move_neg.cc @@ -25,11 +25,6 @@ using std::experimental::propagate_const; using std::unique_ptr; -// { dg-error "no type" "" { target *-*-* } 118 } -// { dg-error "no type" "" { target *-*-* } 125 } -// { dg-error "no type" "" { target *-*-* } 134 } -// { dg-error "no type" "" { target *-*-* } 143 } - int main() { const int dummy{42}; @@ -39,3 +34,4 @@ int main() propagate_const> test4 = &dummy; // { dg-error "conversion" } propagate_const> test5 = std::move(test1); // { dg-error "conversion" } } +// { dg-prune-output "no type" } diff --git a/libstdc++-v3/testsuite/experimental/propagate_const/requirements2.cc b/libstdc++-v3/testsuite/experimental/propagate_const/requirements2.cc index 29b63eae67e..11d6bfd1b68 100644 --- a/libstdc++-v3/testsuite/experimental/propagate_const/requirements2.cc +++ b/libstdc++-v3/testsuite/experimental/propagate_const/requirements2.cc @@ -21,9 +21,8 @@ using std::experimental::propagate_const; -// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 107 } -// { dg-error "not a pointer-to-object type" "" { target *-*-* } 66 } -// { dg-error "forming pointer to reference type" "" { target *-*-* } 187 } -// { dg-error "forming pointer to reference type" "" { target *-*-* } 213 } - propagate_const test1; + +// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 0 } +// { dg-prune-output "forming pointer to reference type" } +// { dg-prune-output "not a pointer-to-object type" } diff --git a/libstdc++-v3/testsuite/experimental/propagate_const/requirements3.cc b/libstdc++-v3/testsuite/experimental/propagate_const/requirements3.cc index 59d5f073ccc..88753bf2fea 100644 --- a/libstdc++-v3/testsuite/experimental/propagate_const/requirements3.cc +++ b/libstdc++-v3/testsuite/experimental/propagate_const/requirements3.cc @@ -21,6 +21,6 @@ using std::experimental::propagate_const; -// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 107 } - propagate_const test1; + +// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 0 } diff --git a/libstdc++-v3/testsuite/experimental/propagate_const/requirements4.cc b/libstdc++-v3/testsuite/experimental/propagate_const/requirements4.cc index a55999fd578..84770257e7c 100644 --- a/libstdc++-v3/testsuite/experimental/propagate_const/requirements4.cc +++ b/libstdc++-v3/testsuite/experimental/propagate_const/requirements4.cc @@ -21,8 +21,8 @@ using std::experimental::propagate_const; -// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 107 } -// { dg-error "invalid type" "" { target *-*-* } 66 } -// { dg-error "uninitialized reference member" "" { target *-*-* } 112 } - propagate_const test1; // { dg-error "use of deleted function" } + +// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 0 } +// { dg-prune-output "invalid type" } +// { dg-prune-output "uninitialized reference member" } diff --git a/libstdc++-v3/testsuite/experimental/propagate_const/requirements5.cc b/libstdc++-v3/testsuite/experimental/propagate_const/requirements5.cc index 60b33734e57..85a7c7b531c 100644 --- a/libstdc++-v3/testsuite/experimental/propagate_const/requirements5.cc +++ b/libstdc++-v3/testsuite/experimental/propagate_const/requirements5.cc @@ -21,6 +21,6 @@ using std::experimental::propagate_const; -// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 107 } - propagate_const test1; + +// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 0 }