/** @namespace std
* @brief ISO C++ entities toplevel namespace is std.
*/
-/** @namespace std
+/** @namespace std::literals
* @brief ISO C++ inline namespace for literal suffixes.
*/
/** @namespace std::__detail
* @ingroup extensions
*/
/** @namespace __gnu_cxx::__detail
- * @brief Implementation details not part of the namespace __gnu_cxx
+ * @brief Implementation details not part of the namespace __gnu_cxx
* interface.
*/
/** @namespace __gnu_internal
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE = Makefile
+EXCLUDE = Makefile \
+ include/experimental/bits/net.h
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
"_GLIBCXX17_DEPRECATED_SUGGEST(E)= " \
"_GLIBCXX20_DEPRECATED(E)= " \
"_GLIBCXX20_DEPRECATED(E)= " \
- _GLIBCXX17_INLINE=inline
+ _GLIBCXX17_INLINE=inline \
+ _GLIBCXX_CHRONO_INT64_T=int64_t \
+ _GLIBCXX_DEFAULT_ABI_TAG
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
-/** @addtogroup filesystem
- * @{
- */
-
/// ISO C++ 2017 namespace for File System library
namespace filesystem
{
#if _GLIBCXX_USE_CXX11_ABI
+/// @cond undocumented
inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { }
+/// @endcond
#endif
+/** @addtogroup filesystem
+ * @{
+ */
class file_status;
_GLIBCXX_BEGIN_NAMESPACE_CXX11
class recursive_directory_iterator;
_GLIBCXX_END_NAMESPACE_CXX11
+ /// Information about free space on a disk
struct space_info
{
uintmax_t capacity;
#endif
};
+ /// Enumerated type representing the type of a file
enum class file_type : signed char {
none = 0, not_found = -1, regular = 1, directory = 2, symlink = 3,
block = 4, character = 5, fifo = 6, socket = 7, unknown = 8
};
- /// Bitmask type
+ /// Bitmask type controlling effects of `filesystem::copy`
enum class copy_options : unsigned short {
none = 0,
skip_existing = 1, overwrite_existing = 2, update_existing = 4,
directories_only = 64, create_symlinks = 128, create_hard_links = 256
};
+ /// @{
+ /// @relates copy_options
constexpr copy_options
operator&(copy_options __x, copy_options __y) noexcept
{
inline copy_options&
operator^=(copy_options& __x, copy_options __y) noexcept
{ return __x = __x ^ __y; }
+ /// @}
- /// Bitmask type
+ /// Bitmask type representing file access permissions
enum class perms : unsigned {
none = 0,
owner_read = 0400,
unknown = 0xFFFF,
};
+ /// @{
+ /// @relates perm_options
constexpr perms
operator&(perms __x, perms __y) noexcept
{
inline perms&
operator^=(perms& __x, perms __y) noexcept
{ return __x = __x ^ __y; }
+ /// @}
- /// Bitmask type
+ /// Bitmask type controlling changes to permissions
enum class perm_options : unsigned {
replace = 0x1,
add = 0x2,
nofollow = 0x8
};
+ /// @{
+ /// @relates perm_options
constexpr perm_options
operator&(perm_options __x, perm_options __y) noexcept
{
inline perm_options&
operator^=(perm_options& __x, perm_options __y) noexcept
{ return __x = __x ^ __y; }
+ /// @}
- // Bitmask type
+ /// Bitmask type controlling directory iteration
enum class directory_options : unsigned char {
none = 0, follow_directory_symlink = 1, skip_permission_denied = 2
};
+ /// @{
+ /// @relates directory_options
constexpr directory_options
operator&(directory_options __x, directory_options __y) noexcept
{
inline directory_options&
operator^=(directory_options& __x, directory_options __y) noexcept
{ return __x = __x ^ __y; }
+ /// @}
+ /// The type used for file timestamps
using file_time_type = __file_clock::time_point;
// operational functions
bool is_regular_file(file_status) noexcept;
bool is_symlink(file_status) noexcept;
-} // namespace filesystem
/// @}
+} // namespace filesystem
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#endif // C++17
{
_GLIBCXX_BEGIN_NAMESPACE_CXX11
- /** @addtogroup filesystem
- * @{
- */
-
class path;
/// @cond undocumented
namespace __detail
{
+ /// @addtogroup filesystem
+ /// @{
template<typename _CharT>
inline constexpr bool __is_encoded_char = false;
template<>
return basic_string<_EcharT>(__first, __last);
}
+ /// @} group filesystem
} // namespace __detail
/// @endcond
- /// A filesystem path.
+ /// @addtogroup filesystem
+ /// @{
+
+ /// A filesystem path
+ /// @ingroup filesystem
class path
{
public:
struct _Parser;
};
- /// @relates std::filesystem::path @{
+ /// @{
+ /// @relates std::filesystem::path
inline void swap(path& __lhs, path& __rhs) noexcept { __lhs.swap(__rhs); }
_GLIBCXX_END_NAMESPACE_CXX11
} // namespace filesystem
+/// @cond undocumented
+
inline ptrdiff_t
distance(filesystem::path::iterator __first, filesystem::path::iterator __last)
{ return __path_iter_distance(__first, __last); }
extern template class __shared_ptr<const filesystem::filesystem_error::_Impl>;
+/// @endcond
+
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
* such as paths, regular files, and directories.
*
* ISO/IEC TS 18822:2015 C++ File System Technical Specification
+ *
+ * @since C++11
+ *
+ * @remark Link using `-lstdc++fs` to use these types and functions.
+ *
* @{
*/
class recursive_directory_iterator;
_GLIBCXX_END_NAMESPACE_CXX11
+ /// Information about free space on a disk
struct space_info
{
uintmax_t capacity;
uintmax_t available;
};
+ /// Enumerated type representing the type of a file
enum class file_type : signed char {
none = 0, not_found = -1, regular = 1, directory = 2, symlink = 3,
block = 4, character = 5, fifo = 6, socket = 7, unknown = 8
};
- /// Bitmask type
+ /// Bitmask type controlling effects of `filesystem::copy`
enum class copy_options : unsigned short {
none = 0,
skip_existing = 1, overwrite_existing = 2, update_existing = 4,
directories_only = 64, create_symlinks = 128, create_hard_links = 256
};
+ /// @{
+ /// @relates copy_options
constexpr copy_options
operator&(copy_options __x, copy_options __y) noexcept
{
inline copy_options&
operator^=(copy_options& __x, copy_options __y) noexcept
{ return __x = __x ^ __y; }
+ /// @}
-
- /// Bitmask type
+ /// Bitmask type representing file access permissions
enum class perms : unsigned {
none = 0,
owner_read = 0400,
symlink_nofollow = 0x40000
};
+ /// @{
+ /// @relates std::experimental::filesystem::perms
constexpr perms
operator&(perms __x, perms __y) noexcept
{
inline perms&
operator^=(perms& __x, perms __y) noexcept
{ return __x = __x ^ __y; }
+ /// @}
- // Bitmask type
+ /// Bitmask type controlling directory iteration
enum class directory_options : unsigned char {
none = 0, follow_directory_symlink = 1, skip_permission_denied = 2
};
+ /// @{
+ /// @relates directory_options
constexpr directory_options
operator&(directory_options __x, directory_options __y) noexcept
{
inline directory_options&
operator^=(directory_options& __x, directory_options __y) noexcept
{ return __x = __x ^ __y; }
+ /// @}
+ /// The type used for file timestamps
using file_time_type = std::chrono::system_clock::time_point;
// operational functions
using std::basic_string_view;
#endif
+ /// @cond undocumented
+namespace __detail
+{
/** @addtogroup filesystem-ts
* @{
*/
- /// @cond undocumented
-namespace __detail
-{
template<typename _CharT,
typename _Ch = typename remove_const<_CharT>::type>
using __is_encoded_char
#endif
>::value, _UnqualVal>::type;
+ /// @} group filesystem-ts
} // namespace __detail
/// @endcond
+ /** @addtogroup filesystem-ts
+ * @{
+ */
+
/// A filesystem path.
+ /// @ingroup filesystem-ts
class path
{
public:
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
- * @brief Thown by exception safety machinery.
+ * @brief Thrown by utilities for testing exception safety.
* @ingroup exceptions
*/
struct forced_error : public std::exception
* @ingroup utilities
*
* Classes and functions for time.
- * @{
+ *
+ * @since C++11
*/
/** @namespace std::chrono
* @brief ISO C++ 2011 namespace for date and time utilities
+ * @ingroup chrono
*/
namespace chrono
{
+ /// @addtogroup chrono
+ /// @{
+
+ /// `chrono::duration` represents a distance between two points in time
template<typename _Rep, typename _Period = ratio<1>>
struct duration;
+ /// `chrono::time_point` represents a point in time as measured by a clock
template<typename _Clock, typename _Dur = typename _Clock::duration>
struct time_point;
+ /// @}
}
+ /// @addtogroup chrono
+ /// @{
+
// 20.11.4.3 specialization of common_type (for duration, sfinae-friendly)
/// @cond undocumented
/// @endcond
+ /// @{
+ /// @relates chrono::duration
+
/// Specialization of common_type for chrono::duration types.
- /// @relates duration
template<typename _Rep1, typename _Period1, typename _Rep2, typename _Period2>
struct common_type<chrono::duration<_Rep1, _Period1>,
chrono::duration<_Rep2, _Period2>>
{ };
/// Specialization of common_type for two identical chrono::duration types.
- /// @relates duration
template<typename _Rep, typename _Period>
struct common_type<chrono::duration<_Rep, _Period>,
chrono::duration<_Rep, _Period>>
};
/// Specialization of common_type for one chrono::duration type.
- /// @relates duration
template<typename _Rep, typename _Period>
struct common_type<chrono::duration<_Rep, _Period>>
{
using type = chrono::duration<typename common_type<_Rep>::type,
typename _Period::type>;
};
+ /// @}
// 20.11.4.3 specialization of common_type (for time_point, sfinae-friendly)
/// @endcond
+ /// @{
+ /// @relates chrono::time_point
+
/// Specialization of common_type for chrono::time_point types.
- /// @relates time_point
template<typename _Clock, typename _Duration1, typename _Duration2>
struct common_type<chrono::time_point<_Clock, _Duration1>,
chrono::time_point<_Clock, _Duration2>>
{ };
/// Specialization of common_type for two identical chrono::time_point types.
- /// @relates time_point
template<typename _Clock, typename _Duration>
struct common_type<chrono::time_point<_Clock, _Duration>,
chrono::time_point<_Clock, _Duration>>
{ using type = chrono::time_point<_Clock, _Duration>; };
/// Specialization of common_type for one chrono::time_point type.
- /// @relates time_point
template<typename _Clock, typename _Duration>
struct common_type<chrono::time_point<_Clock, _Duration>>
{ using type = chrono::time_point<_Clock, _Duration>; };
+ /// @}
/// @} group chrono
/// @endcond
- /// duration
template<typename _Rep, typename _Period>
struct duration
{
rep __r;
};
- /// @relates duration @{
+ /// @{
+ /// @relates std::chrono::duration
/// The sum of two durations.
template<typename _Rep1, typename _Period1,
/// @endcond
- /// @relates duration @{
+ /** @{
+ * Arithmetic operators for chrono::duration
+ * @relates std::chrono::duration
+ */
- /// Multiply a duration by a scalar value.
template<typename _Rep1, typename _Period, typename _Rep2>
constexpr duration<__common_rep_t<_Rep1, _Rep2>, _Period>
operator*(const duration<_Rep1, _Period>& __d, const _Rep2& __s)
return __cd(__cd(__d).count() * __s);
}
- /// Multiply a duration by a scalar value.
template<typename _Rep1, typename _Rep2, typename _Period>
constexpr duration<__common_rep_t<_Rep2, _Rep1>, _Period>
operator*(const _Rep1& __s, const duration<_Rep2, _Period>& __d)
typedef typename common_type<__dur1,__dur2>::type __cd;
return __cd(__cd(__lhs).count() % __cd(__rhs).count());
}
+ /// @}
// comparisons
+ /** @{
+ * Comparisons for chrono::duration
+ * @relates std::chrono::duration
+ */
+
template<typename _Rep1, typename _Period1,
typename _Rep2, typename _Period2>
constexpr bool
/// @}
+ /// @cond undocumented
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
# define _GLIBCXX_CHRONO_INT64_T int64_t
#elif defined __INT64_TYPE__
"Representation type for nanoseconds must have at least 64 bits");
# define _GLIBCXX_CHRONO_INT64_T long long
#endif
+ /// @endcond
/// nanoseconds
using nanoseconds = duration<_GLIBCXX_CHRONO_INT64_T, nano>;
#undef _GLIBCXX_CHRONO_INT64_T
- /// time_point
template<typename _Clock, typename _Dur>
struct time_point
{
}
#endif // C++17
- /// @relates time_point @{
+ /// @{
+ /// @relates time_point
/// Adjust a time point forwards by the given duration.
template<typename _Clock, typename _Dur1,
return __time_point(__lhs.time_since_epoch() -__rhs);
}
- /// @}
-
- /// @relates time_point @{
-
/// The difference between two time points (as a duration)
template<typename _Clock, typename _Dur1, typename _Dur2>
constexpr typename common_type<_Dur1, _Dur2>::type
operator-(const time_point<_Clock, _Dur1>& __lhs,
const time_point<_Clock, _Dur2>& __rhs)
{ return __lhs.time_since_epoch() - __rhs.time_since_epoch(); }
+ /// @}
+
+ /** @{
+ * Comparisons for time_point
+ * @relates chrono::time_point
+ */
template<typename _Clock, typename _Dur1, typename _Dur2>
constexpr bool
};
#endif // C++20
- /// @}
+ /// @} group chrono
} // namespace chrono
#if __cplusplus > 201103L
*/
inline namespace chrono_literals
{
+ /// @addtogroup chrono
+ /// @{
+
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wliteral-suffix"
/// @cond undocumented
#endif // C++20
#pragma GCC diagnostic pop
+ /// @}
} // inline namespace chrono_literals
} // inline namespace literals
#if __cplusplus > 201703L
namespace chrono
{
+ /// @addtogroup chrono
+ /// @{
+
// 12/24 HOURS FUNCTIONS
constexpr bool
return __h + 12h;
}
}
- }
+ /// @} group chrono
+ } // namespace chrono
#endif
#if __cplusplus >= 201703L
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/** @addtogroup diagnostics
- * @{
+ * @{
*/
class error_code;
inline constexpr bool is_error_condition_enum_v =
is_error_condition_enum<_Tp>::value;
#endif // C++17
+ /// @}
+
inline namespace _V2 {
+ /** @addtogroup diagnostics
+ * @{
+ */
+
/** Abstract base class for types defining a category of error codes.
*
* An error category defines a context that give meaning to the integer
* associated with the "generic" category and other OS-specific error
* numbers are associated with the "system" category, but a user-defined
* category might give different meanings to the same numerical values.
+ *
+ * @since C++11
*/
class error_category
{
/// Error category for other error codes defined by the OS.
_GLIBCXX_CONST const error_category& system_category() noexcept;
+ /// @}
} // end inline namespace
+ /** @addtogroup diagnostics
+ * @{
+ */
+
error_code make_error_code(errc) noexcept;
/** Class error_code
* an `errno` value and the "generic" category, but errors from an HTTP
* library might be represented by an HTTP response status code (e.g. 404)
* and a custom category defined by the library.
+ *
+ * @since C++11
+ * @ingroup diagnostics
*/
class error_code
{
*
* An `error_condition` represents something that the program can test for,
* and subsequently take appropriate action.
+ *
+ * @since C++11
*/
class error_condition
{
&& __lhs.value() == __rhs.value()); }
/// @relates error_code
- /// @relates error_condition
inline bool
operator==(const error_code& __lhs, const error_condition& __rhs) noexcept
{
&& __lhs.value() < __rhs.value()));
}
- /// @relates error_code
/// @relates error_condition
inline bool
operator==(const error_condition& __lhs, const error_code& __rhs) noexcept
{ return !(__lhs == __rhs); }
/// @relates error_code
- /// @relates error_condition
inline bool
operator!=(const error_code& __lhs, const error_condition& __rhs) noexcept
{ return !(__lhs == __rhs); }
- /// @relates error_code
/// @relates error_condition
inline bool
operator!=(const error_condition& __lhs, const error_code& __rhs) noexcept
const error_condition& __rhs) noexcept
{ return !(__lhs == __rhs); }
#endif // three_way_comparison
+ /// @}
/**
* @brief An exception type that includes an `error_code` value.
* Typically used to report errors from the operating system and other
* low-level APIs.
*
+ * @since C++11
* @ingroup exceptions
*/
class system_error : public std::runtime_error
*/
/** If an %exception is thrown which is not listed in a function's
- * %exception specification, one of these may be thrown. */
+ * %exception specification, one of these may be thrown.
+ *
+ * @ingroup exceptions
+ */
class bad_exception : public exception
{
public:
/** [18.6.4]/1: 'Returns true after completing evaluation of a
* throw-expression until either completing initialization of the
- * exception-declaration in the matching handler or entering @c unexpected()
- * due to the throw; or after entering @c terminate() for any reason
- * other than an explicit call to @c terminate(). [Note: This includes
+ * exception-declaration in the matching handler or entering `unexpected()`
+ * due to the throw; or after entering `terminate()` for any reason
+ * other than an explicit call to `terminate()`. [Note: This includes
* stack unwinding [15.2]. end note]'
*
- * 2: 'When @c uncaught_exception() is true, throwing an
- * %exception can result in a call of @c terminate()
+ * 2: 'When `uncaught_exception()` is true, throwing an
+ * %exception can result in a call of 1terminate()`
* (15.5.1).'
*/
_GLIBCXX17_DEPRECATED
#if __cplusplus >= 201703L || !defined(__STRICT_ANSI__) // c++17 or gnu++98
#define __cpp_lib_uncaught_exceptions 201411L
- /// The number of uncaught exceptions.
+ /** The number of uncaught exceptions.
+ * @since C++17, or any non-strict mode, e.g. `-std=gnu++98`
+ * @see uncaught_exception()
+ */
int uncaught_exceptions() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));
#endif
/**
* @defgroup exceptions Exceptions
* @ingroup diagnostics
+ * @since C++98
*
* Classes and functions for reporting errors via exceptions.
* @{