libstdc++: Fix non-reserved name in <regex> header

libstdc++-v3/ChangeLog:

	* include/bits/regex_compiler.tcc (_Compiler::_M_match_token):
	Use reserved name for parameter.
	* testsuite/17_intro/names.cc: Check "token".
This commit is contained in:
Jonathan Wakely 2021-12-13 13:36:33 +00:00
parent 561414cdf8
commit b0e6a257f1
2 changed files with 3 additions and 2 deletions

View File

@ -580,9 +580,9 @@ namespace __detail
template<typename _TraitsT> template<typename _TraitsT>
bool bool
_Compiler<_TraitsT>:: _Compiler<_TraitsT>::
_M_match_token(_TokenT token) _M_match_token(_TokenT __token)
{ {
if (token == _M_scanner._M_get_token()) if (__token == _M_scanner._M_get_token())
{ {
_M_value = _M_scanner._M_get_value(); _M_value = _M_scanner._M_get_value();
_M_scanner._M_advance(); _M_scanner._M_advance();

View File

@ -109,6 +109,7 @@
#define func ( #define func (
#define tmp ( #define tmp (
#define sz ( #define sz (
#define token (
#if __cplusplus < 201103L #if __cplusplus < 201103L
#define uses_allocator ( #define uses_allocator (