diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2020-10-10 21:22:12 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2020-10-10 21:22:12 +0100 |
commit | 2137aa92412da363d52ef699987441be28b239d0 (patch) | |
tree | a51c2d65dfeba5ee9c15b0dd3a5f3242a57b7493 /libstdc++-v3/include/debug/functions.h | |
parent | 988f0466e80a6e4cc758f4df387b6c021b1cb078 (diff) | |
download | gcc-2137aa92412da363d52ef699987441be28b239d0.zip gcc-2137aa92412da363d52ef699987441be28b239d0.tar.gz gcc-2137aa92412da363d52ef699987441be28b239d0.tar.bz2 |
libstdc++: Replace use of reserved name that clashes [PR 97362]
The name __deref is defined as a macro by Windows headers.
This renames the __deref() helper function to __ref. It doesn't actually
dereference an iterator. it just has the same type as the iterator's
reference type.
libstdc++-v3/ChangeLog:
PR libstdc++/97362
* doc/html/manual/source_code_style.html: Regenerate.
* doc/xml/manual/appendix_contributing.xml: Add __deref to
BADNAMES.
* include/debug/functions.h (_Irreflexive_checker::__deref):
Rename to __ref.
* testsuite/17_intro/badnames.cc: Check __deref.
Diffstat (limited to 'libstdc++-v3/include/debug/functions.h')
-rw-r--r-- | libstdc++-v3/include/debug/functions.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libstdc++-v3/include/debug/functions.h b/libstdc++-v3/include/debug/functions.h index aaccc8d..942d35f 100644 --- a/libstdc++-v3/include/debug/functions.h +++ b/libstdc++-v3/include/debug/functions.h @@ -421,10 +421,10 @@ namespace __gnu_debug { template<typename _It> static typename std::iterator_traits<_It>::reference - __deref(); + __ref(); template<typename _It, - typename = decltype(__deref<_It>() < __deref<_It>())> + typename = decltype(__ref<_It>() < __ref<_It>())> _GLIBCXX20_CONSTEXPR static bool _S_is_valid(_It __it) @@ -438,7 +438,7 @@ namespace __gnu_debug { return true; } template<typename _It, typename _Pred, typename - = decltype(std::declval<_Pred>()(__deref<_It>(), __deref<_It>()))> + = decltype(std::declval<_Pred>()(__ref<_It>(), __ref<_It>()))> _GLIBCXX20_CONSTEXPR static bool _S_is_valid_pred(_It __it, _Pred __pred) |