* @brief Swaps the contents of two regular expression objects.
* @param __lhs First regular expression.
* @param __rhs Second regular expression.
+ * @relates basic_regex
*/
template<typename _Ch_type, typename _Rx_traits>
inline void
{ return this->_M_str().compare(__s); }
// @}
+ /// @cond undocumented
// Non-standard, used by comparison operators
int
_M_compare(const value_type* __s, size_t __n) const
{ return this->_M_str().compare({__s, __n}); }
+ /// @endcond
private:
// Simplified basic_string_view for C++11
// [7.9.2] sub_match non-member operators
+ /// @relates sub_match @{
+
/**
* @brief Tests the equivalence of two regular expression submatches.
* @param __lhs First regular expression submatch.
operator>(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
{ return __lhs.compare(__rhs) > 0; }
+ /// @cond undocumented
+
// Alias for a basic_string that can be compared to a sub_match.
template<typename _Bi_iter, typename _Ch_traits, typename _Ch_alloc>
using __sub_match_string = basic_string<
typename iterator_traits<_Bi_iter>::value_type,
_Ch_traits, _Ch_alloc>;
+ /// @endcond
/**
* @brief Tests the equivalence of a string and a regular expression
const sub_match<_Bi_iter>& __m)
{ return __os << __m.str(); }
+ // @} relates sub_match
+
// [7.10] Class template match_results
/**
* of characters [first, second) which formed that match. Otherwise matched
* is false, and members first and second point to the end of the sequence
* that was searched.
- *
- * @nosubgrouping
*/
template<typename _Bi_iter,
typename _Alloc = allocator<sub_match<_Bi_iter> > >
public:
/**
- * @name 10.? Public Types
+ * @name 28.10 Public Types
*/
//@{
typedef sub_match<_Bi_iter> value_type;
/**
* @brief Constructs a default %match_results container.
* @post size() returns 0 and str() returns an empty string.
- * @{
*/
match_results() : match_results(_Alloc()) { }
+ /**
+ * @brief Constructs a default %match_results container.
+ * @post size() returns 0 and str() returns an empty string.
+ */
explicit
match_results(const _Alloc& __a) noexcept
: _Base_type(__a)
{ }
- // @}
-
/**
* @brief Copy constructs a %match_results.
*/
//@}
/**
- * @name 10.3 Element Access
+ * @name 28.10.4 Element Access
*/
//@{
//@}
/**
- * @name 10.4 Formatting
+ * @name 28.10.5 Formatting
*
* These functions perform formatted substitution of the matched
* character sequences into their target. The format specifiers and
//@}
/**
- * @name 10.5 Allocator
+ * @name 28.10.6 Allocator
*/
//@{
//@}
/**
- * @name 10.6 Swap
+ * @name 28.10.7 Swap
*/
//@{
//@}
private:
- template<typename, typename, typename, bool>
- friend class __detail::_Executor;
-
template<typename, typename, typename>
friend class regex_iterator;
+ /// @cond undocumented
+
+ template<typename, typename, typename, bool>
+ friend class __detail::_Executor;
+
template<typename _Bp, typename _Ap, typename _Cp, typename _Rp,
__detail::_RegexExecutorPolicy, bool>
friend bool
{ return _Base_type::operator[](_Base_type::size() - 1); }
_Bi_iter _M_begin;
+ /// @endcond
};
typedef match_results<const char*> cmatch;
#endif
// match_results comparisons
+
/**
* @brief Compares two match_results for equality.
* @returns true if the two objects refer to the same match,
- * false otherwise.
+ * false otherwise.
*/
template<typename _Bi_iter, typename _Alloc>
inline bool
/**
* @brief Compares two match_results for inequality.
* @returns true if the two objects do not refer to the same match,
- * false otherwise.
+ * false otherwise.
*/
template<typename _Bi_iter, class _Alloc>
inline bool
match_results<_Bi_iter, _Alloc>& __rhs) noexcept
{ __lhs.swap(__rhs); }
+
_GLIBCXX_END_NAMESPACE_CXX11
- // [7.11.2] Function template regex_match
+ // [28.11.2] Function template regex_match
/**
* @name Matching, Searching, and Replacing
*/