diff --git a/libstdc++-v3/doc/html/manual/source_code_style.html b/libstdc++-v3/doc/html/manual/source_code_style.html
index 680e9e70829..669f16d165f 100644
--- a/libstdc++-v3/doc/html/manual/source_code_style.html
+++ b/libstdc++-v3/doc/html/manual/source_code_style.html
@@ -32,6 +32,7 @@
MS adds:
_T
+ __deref
BSD adds:
__used
diff --git a/libstdc++-v3/doc/xml/manual/appendix_contributing.xml b/libstdc++-v3/doc/xml/manual/appendix_contributing.xml
index 00991128525..4380cbbe3f1 100644
--- a/libstdc++-v3/doc/xml/manual/appendix_contributing.xml
+++ b/libstdc++-v3/doc/xml/manual/appendix_contributing.xml
@@ -412,8 +412,9 @@ indicate a place that may require attention for multi-thread safety.
- Bad Identifiers
-
+
+ Bad Identifiers
+
Identifiers that conflict and should be avoided.
@@ -445,6 +446,7 @@ indicate a place that may require attention for multi-thread safety.
MS adds:
_T
+ __deref
BSD adds:
__used
diff --git a/libstdc++-v3/include/debug/functions.h b/libstdc++-v3/include/debug/functions.h
index aaccc8dfe07..942d35f358d 100644
--- a/libstdc++-v3/include/debug/functions.h
+++ b/libstdc++-v3/include/debug/functions.h
@@ -421,10 +421,10 @@ namespace __gnu_debug
{
template
static typename std::iterator_traits<_It>::reference
- __deref();
+ __ref();
template() < __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()(__deref<_It>(), __deref<_It>()))>
+ = decltype(std::declval<_Pred>()(__ref<_It>(), __ref<_It>()))>
_GLIBCXX20_CONSTEXPR
static bool
_S_is_valid_pred(_It __it, _Pred __pred)
diff --git a/libstdc++-v3/testsuite/17_intro/badnames.cc b/libstdc++-v3/testsuite/17_intro/badnames.cc
index c69b8c45d81..a6b98db26f2 100644
--- a/libstdc++-v3/testsuite/17_intro/badnames.cc
+++ b/libstdc++-v3/testsuite/17_intro/badnames.cc
@@ -62,6 +62,7 @@
// MS adds:
#define _T _T is a BADNAME
+#define __deref __deref is a BADNAME
// BSD adds:
#define __used __used is a BADNAME