From: Jonathan Wakely Date: Tue, 7 May 2019 23:22:01 +0000 (+0100) Subject: Improve API docs for Filesystem TS and Networking TS X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=041aa6abe46384ba4c7bb9487a7777047984588c;p=gcc.git 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 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index acf58e9c22b..230de3e9119 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2019-05-08 Jonathan Wakely + + * 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. + 2019-05-07 Jonathan Wakely * include/bits/stl_pair.h: Improve docs. diff --git a/libstdc++-v3/include/experimental/bits/fs_path.h b/libstdc++-v3/include/experimental/bits/fs_path.h index fafc9930a5b..f81f33ca161 100644 --- a/libstdc++-v3/include/experimental/bits/fs_path.h +++ b/libstdc++-v3/include/experimental/bits/fs_path.h @@ -514,8 +514,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 /// @relates std::experimental::filesystem::path @{ + /// Swap overload for paths inline void swap(path& __lhs, path& __rhs) noexcept { __lhs.swap(__rhs); } + /// Compute a hash value for a path size_t hash_value(const path& __p) noexcept; /// Compare paths diff --git a/libstdc++-v3/include/experimental/bits/net.h b/libstdc++-v3/include/experimental/bits/net.h index d5ef277b933..1d637fb9b83 100644 --- a/libstdc++-v3/include/experimental/bits/net.h +++ b/libstdc++-v3/include/experimental/bits/net.h @@ -24,7 +24,7 @@ /** @file experimental/bits/net.h * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{experimental/networking} + * Do not attempt to use it directly. @headername{experimental/net} */ #ifndef _GLIBCXX_EXPERIMENTAL_NET_H @@ -55,6 +55,8 @@ inline namespace v1 template class async_result; + /// @cond undocumented + // A type denoted by DEDUCED in the TS. template using __deduced_t = typename @@ -67,25 +69,27 @@ inline namespace v1 is_constructible<_Tp, _Tp&>, is_constructible<_Tp, const _Tp&&> >::type; - struct __throw_on_error + struct __throw_on_error + { + explicit + __throw_on_error(const char* __msg) : _M_msg(__msg) { } + + ~__throw_on_error() noexcept(false) { - explicit - __throw_on_error(const char* __msg) : _M_msg(__msg) { } + if (_M_ec) + _GLIBCXX_THROW_OR_ABORT(system_error(_M_ec, _M_msg)); + } - ~__throw_on_error() noexcept(false) - { - if (_M_ec) - _GLIBCXX_THROW_OR_ABORT(system_error(_M_ec, _M_msg)); - } + __throw_on_error(const __throw_on_error&) = delete; + __throw_on_error& operator=(const __throw_on_error&) = delete; - __throw_on_error(const __throw_on_error&) = delete; - __throw_on_error& operator=(const __throw_on_error&) = delete; + operator error_code&() noexcept { return _M_ec; } - operator error_code&() noexcept { return _M_ec; } + const char* _M_msg; + error_code _M_ec; + }; - const char* _M_msg; - error_code _M_ec; - }; + /// @endcond // Base class for types meeting IntegerSocketOption requirements. template diff --git a/libstdc++-v3/include/experimental/netfwd b/libstdc++-v3/include/experimental/netfwd index f8f4479b6c8..6a7ac4ae281 100644 --- a/libstdc++-v3/include/experimental/netfwd +++ b/libstdc++-v3/include/experimental/netfwd @@ -96,7 +96,7 @@ inline namespace v1 namespace ip { /** - * @ingroup networking-ts + * @addtogroup networking-ts * @{ */ class address;