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.
<br />
MS adds:<br />
_T<br />
+ __deref<br />
<br />
BSD adds:<br />
__used<br />
<para>
</para>
- <section xml:id="coding_style.bad_identifiers"><info><title>Bad Identifiers</title></info>
-
+
+ <section xml:id="coding_style.bad_identifiers"><info><title>Bad Identifiers</title></info> <!-- BADNAMES -->
+
<para>
Identifiers that conflict and should be avoided.
</para>
MS adds:
_T
+ __deref
BSD adds:
__used
{
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)
{ 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)
// MS adds:
#define _T _T is a BADNAME
+#define __deref __deref is a BADNAME
// BSD adds:
#define __used __used is a BADNAME