This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/83102] go bootstrap error in ast-dump.cc due to __is_invocable failure
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 21 Nov 2017 23:33:57 +0000
- Subject: [Bug bootstrap/83102] go bootstrap error in ast-dump.cc due to __is_invocable failure
- Auto-submitted: auto-generated
- References: <bug-83102-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83102
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
If we want to relax the check this should work:
--- a/libstdc++-v3/include/bits/stl_tree.h
+++ b/libstdc++-v3/include/bits/stl_tree.h
@@ -448,8 +448,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
typedef __gnu_cxx::__alloc_traits<_Node_allocator> _Alloc_traits;
-#if __cplusplus >= 201103L
- static_assert(__is_invocable<const _Compare&, const _Key&, const
_Key&>{},
+#if __cplusplus >= 201703L
+ // LWG DR 2542: Missing const requirements for associative containers
+ static_assert(is_invocable_v<const _Compare&, const _Key&, const _Key&>,
+ "comparison object must be invocable with two arguments of key
type");
+#elif __cplusplus >= 201103L
+ static_assert(__is_invocable<_Compare&, const _Key&, const _Key&>{},
"comparison object must be invocable with two arguments of key
type");
#endif