2019-05-02 Jonathan Wakely <jwakely@redhat.com>
+ * 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.
* 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 <STRONG> no guarantee of compatibility
+ * between different GCC releases </STRONG> for these features.
+ */
/** @file experimental/algorithm
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
#ifndef _GLIBCXX_EXPERIMENTAL_ALGORITHM
/** @file experimental/any
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
#ifndef _GLIBCXX_EXPERIMENTAL_ANY
{
/**
* @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)".
virtual const char* what() const noexcept { return "bad any_cast"; }
};
+ /// @cond undocumented
[[gnu::noreturn]] inline void __throw_bad_any_cast()
{
#if __cpp_exceptions
__builtin_abort();
#endif
}
+ /// @endcond
/**
* @brief A type-safe container of any type.
}
// @}
+ /// @cond undocumented
template<typename _Tp>
void* __any_caster(const any* __any)
{
__any->_M_manager(any::_Op_access, __any, &__arg);
return __arg._M_obj;
}
+ /// @endcond
/**
* @brief Access the contained object.
/** @file experimental/array
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
#ifndef _GLIBCXX_EXPERIMENTAL_ARRAY
#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
"any of the arguments is a reference_wrapper");
};
+/// Create a std::array from a variable-length list of arguments.
template <typename _Dest = void, typename... _Types>
constexpr
array<typename __make_array_elem<_Dest, _Types...>::type, sizeof...(_Types)>
return {{__a[_Idx]...}};
}
+/// Create a std::array from an array.
template <typename _Tp, size_t _Nm>
constexpr array<remove_cv_t<_Tp>, _Nm>
to_array(_Tp (&__a)[_Nm])
#if __cplusplus >= 201402L
#include <bits/c++config.h>
+ /** @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)
{
/** @file experimental/chrono
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
//
/** @file experimental/deque
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
#ifndef _GLIBCXX_EXPERIMENTAL_DEQUE
/** @file experimental/forward_list
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
#ifndef _GLIBCXX_EXPERIMENTAL_FORWARD_LIST
/** @file experimental/functional
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
#ifndef _GLIBCXX_EXPERIMENTAL_FUNCTIONAL
/** @file experimental/iterator
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
//
/** @file experimental/list
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
#ifndef _GLIBCXX_EXPERIMENTAL_LIST
/** @file experimental/map
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
#ifndef _GLIBCXX_EXPERIMENTAL_MAP
/** @file experimental/memory
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
//
/** @file experimental/memory_resource
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
#ifndef _GLIBCXX_EXPERIMENTAL_MEMORY_RESOURCE
#include <ext/new_allocator.h>
#include <debug/assertions.h>
+/// @cond
namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp> class malloc_allocator;
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace __gnu_cxx
+/// @endcond
namespace std {
_GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return !(__a == __b); }
+ /// @cond undocumented
class __resource_adaptor_common
{
template<typename, typename> friend class __resource_adaptor_imp;
: std::alignment_of<std::max_align_t>::type { };
#endif
};
+ /// @endcond
// 8.7.1 __resource_adaptor_imp
template<typename _Alloc, typename _Resource>
// The default memory resource
+ /// @cond undocumented
inline std::atomic<memory_resource*>&
__get_default_resource()
{
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
{
/** @file experimental/numeric
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
//
/** @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 <STRONG> no guarantee of compatibility
- * between different GCC releases </STRONG> for these features.
- */
-
#if __cplusplus >= 201402L
#include <utility>
{
/**
* @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
/** @file experimental/propagate_const
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
#ifndef _GLIBCXX_EXPERIMENTAL_PROPAGATE_CONST
{
/**
* @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
* @{
*/
-/// Const-propagating wrapper.
+ /// Const-propagating wrapper.
template <typename _Tp>
class propagate_const
{
/** @file experimental/random
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
#ifndef _GLIBCXX_EXPERIMENTAL_RANDOM
/** @file experimental/ratio
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
//
/** @file experimental/regex
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
#ifndef _GLIBCXX_EXPERIMENTAL_REGEX
/** @file experimental/set
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
#ifndef _GLIBCXX_EXPERIMENTAL_SET
/** @file experimental/source_location
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
#ifndef _GLIBCXX_EXPERIMENTAL_SRCLOC
/** @file experimental/string
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
#ifndef _GLIBCXX_EXPERIMENTAL_STRING
/** @file experimental/string_view
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
//
*
* @ingroup strings
* @ingroup sequences
- * @ingroup experimental
+ * @ingroup libfund-ts
*
* @tparam _CharT Type of character
* @tparam _Traits Traits for character type, defaults to
/** @file experimental/system_error
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
//
/** @file experimental/tuple
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
#ifndef _GLIBCXX_EXPERIMENTAL_TUPLE
/** @file experimental/type_traits
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
//
/** @file experimental/unordered_map
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
#ifndef _GLIBCXX_EXPERIMENTAL_UNORDERED_MAP
/** @file experimental/unordered_set
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
#ifndef _GLIBCXX_EXPERIMENTAL_UNORDERED_SET
/** @file experimental/utility
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
#ifndef _GLIBCXX_EXPERIMENTAL_UTILITY
/** @file experimental/vector
* This is a TS C++ Library header.
+ * @ingroup libfund-ts
*/
#ifndef _GLIBCXX_EXPERIMENTAL_VECTOR
using std::experimental::any_cast;
const any y(1);
- any_cast<int&>(y); // { dg-error "qualifiers" "" { target { *-*-* } } 357 }
+ any_cast<int&>(y); // { dg-error "here" }
+ // { dg-error "discards qualifiers" "" { target { *-*-* } } 0 }
}
{
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 }
}
using std::experimental::propagate_const;
using std::unique_ptr;
-// { dg-error "no type" "" { target *-*-* } 160 }
-
int main()
{
propagate_const<unique_ptr<const int>> test5;
propagate_const<unique_ptr<const int>> test6;
test6 = dummy2; // { dg-error "no match" }
}
+// { dg-prune-output "no type" }
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};
propagate_const<unique_ptr<const int>> test4 = &dummy; // { dg-error "conversion" }
propagate_const<unique_ptr<const int>> test5 = std::move(test1); // { dg-error "conversion" }
}
+// { dg-prune-output "no type" }
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<void*> 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" }
using std::experimental::propagate_const;
-// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 107 }
-
propagate_const<void (*)()> test1;
+
+// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 0 }
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<int&> 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" }
using std::experimental::propagate_const;
-// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 107 }
-
propagate_const<int[1]> test1;
+
+// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 0 }