From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D4727385AC1D; Thu, 6 Jan 2022 09:31:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D4727385AC1D From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/103923] is_invocable inexplicably fails Date: Thu, 06 Jan 2022 09:31:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 11.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jan 2022 09:31:18 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103923 --- Comment #3 from Jonathan Wakely --- If I change the __cache_default trait to be: template using __cache_default =3D __bool_constant::value // Do not cache fo= r fast hasher. // Mandatory to have erase not throwing. && noexcept(std::declval()(std::declval())))>; Then you get an error from the instantiation of std::unordered_map, confirm= ing what I said above: In file included from /home/jwakely/gcc/12/include/c++/12.0.0/unordered_map= :46, from 103923.C:4: /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h: In instantiation = of 'class std::unordered_map': 103923.C:13:45: required from here /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' 50 | && noexcept(std::declval()(std::declval())))>; | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~ /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' In file included from /home/jwakely/gcc/12/include/c++/12.0.0/unordered_map= :47, from 103923.C:4: /home/jwakely/gcc/12/include/c++/12.0.0/bits/unordered_map.h:874:42: error: using invalid field 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::_= M_h' 874 | find(const _Kt& __x) -> decltype(_M_h._M_find_tr(__x)) | ^~~~ /home/jwakely/gcc/12/include/c++/12.0.0/bits/unordered_map.h:885:48: error: using invalid field 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::_= M_h' 885 | find(const _Kt& __x) const -> decltype(_M_h._M_find_tr(__x)) | ^~~~ /home/jwakely/gcc/12/include/c++/12.0.0/bits/unordered_map.h:907:49: error: using invalid field 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::_= M_h' 907 | count(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__= x)) | ^~~~ /home/jwakely/gcc/12/include/c++/12.0.0/bits/unordered_map.h:926:21: error: using invalid field 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::_= M_h' 926 | -> decltype(_M_h._M_find_tr(__x), void(), true) | ^~~~ In file included from /home/jwakely/gcc/12/include/c++/12.0.0/unordered_map= :46, from 103923.C:4: /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' 50 | && noexcept(std::declval()(std::declval())))>; | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~ In file included from /home/jwakely/gcc/12/include/c++/12.0.0/unordered_map= :47, from 103923.C:4: /home/jwakely/gcc/12/include/c++/12.0.0/bits/unordered_map.h:948:21: error: using invalid field 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::_= M_h' 948 | -> decltype(_M_h._M_equal_range_tr(__x)) | ^~~~ In file included from /home/jwakely/gcc/12/include/c++/12.0.0/unordered_map= :46, from 103923.C:4: /home/jwakely/gcc/12/include/c++/12.0.0/bits/hashtable.h:50:50: error: use = of 'auto T::H::operator()(const T::K&) const' before deduction of 'auto' 50 | && noexcept(std::declval()(std::declval())))>; | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~ In file included from /home/jwakely/gcc/12/include/c++/12.0.0/unordered_map= :47, from 103923.C:4: /home/jwakely/gcc/12/include/c++/12.0.0/bits/unordered_map.h:960:21: error: using invalid field 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::_= M_h' 960 | -> decltype(_M_h._M_equal_range_tr(__x)) | ^~~~=