aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2019-10-25 13:29:37 +0000
committerJonathan Wakely <jwakely@redhat.com>2019-10-25 13:29:37 +0000
commitb85e704b14e4df91dff66cca9f200e6041fa2c30 (patch)
tree55332f00ba4b5e9b865820b01c159c2cda0d9aeb
parentcad94ac8ff9043196d4915f41cad8ac6441e6a87 (diff)
Guard use of concepts with feature test macro
This fixes a regression when using Clang. * include/bits/range_cmp.h: Check __cpp_lib_concepts before defining concepts. Fix comment. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@277449 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/include/bits/range_cmp.h4
2 files changed, 8 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 85cded32877..d1f0e3a4cd4 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2019-10-25 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/bits/range_cmp.h: Check __cpp_lib_concepts before defining
+ concepts. Fix comment.
+
2019-10-25 Gerald Pfeifer <gerald@pfeifer.com>
* doc/xml/manual/policy_data_structures_biblio.xml: Switch
diff --git a/libstdc++-v3/include/bits/range_cmp.h b/libstdc++-v3/include/bits/range_cmp.h
index a77fd5274b9..870eb3a8ee5 100644
--- a/libstdc++-v3/include/bits/range_cmp.h
+++ b/libstdc++-v3/include/bits/range_cmp.h
@@ -22,7 +22,7 @@
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
-/** @file bits/ranges_function.h
+/** @file bits/range_cmp.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{functional}
*/
@@ -54,6 +54,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
using is_transparent = __is_transparent;
};
+#ifdef __cpp_lib_concepts
namespace ranges
{
namespace __detail
@@ -182,6 +183,7 @@ namespace ranges
};
} // namespace ranges
+#endif // library concepts
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#endif // C++20