From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E2DD5383D834; Mon, 21 Jun 2021 13:33:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E2DD5383D834 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/101137] std::conjunction result error Date: Mon, 21 Jun 2021 13:33:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.1.0 X-Bugzilla-Keywords: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: WAITING 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: Mon, 21 Jun 2021 13:33:23 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101137 --- Comment #4 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #3) > template > concept SignedIntegralRef1 > =3D std::is_lvalue_reference_v && SignedIntegral1; Oops, that should be std::is_lvalue_reference_v && SignedIntegral1> (which is easy to spot when you break the wall of text into pieces). It's irrelevant here anyway, because you can never have a type like deque, so it would make a lot more sense for your code to have separa= te concepts as above, and then for the the concepts like Container you only ne= ed to use the SignedIntegral1 concept, because the container's value type can'= t be a reference. N.B. defining traits just to use as arguments to std::conjunction just to define concepts is ... peculiar. Why not just define the concepts directly? It will compile much faster. template concept ContainerOfSignedIntegral =3D Container && SignedIntegral; template concept SignedIntegralConvertCopy1 =3D ContainerOfSignedIntegral && !ForwardList && ContainerOfSignedIntegral && (!std::same_as); template concept SignedIntegralConvertCopy =3D (SignedIntegralConvertCopy1 && ...);=