From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3C3913858D39; Mon, 1 May 2023 11:23:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C3913858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682940216; bh=lGwLosSghnwrPvhjU5Roa540Sneg6px8xtP8IXzlzw4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TwICtA5zuEmGNIPCa2gddxuBjYb8zaRh8k5FLsSrD+53AoVVIn2YwmVy41g8Ye3yN yC+wUx79e8pDlkNvCV2HQky5sj7BqscNmUXjpaCFkArup3dGgp5W9rGGjYnaAJaP3g RaIKuSMWlOrccrefxgpa8UioL01TpOWTJ3YgvjQs= From: "ali.mpfard at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109683] [13/14 Regression] False cyclic dependency error reported for constraint Date: Mon, 01 May 2023 11:23:35 +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: 13.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ali.mpfard at gmail dot com 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: cc 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109683 Ali Mohammad Pur Fard changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ali.mpfard at gmail dot com --- Comment #1 from Ali Mohammad Pur Fard --- As a note, using a type alias for `T` in the constraint seems to work around the issue: ``` template struct VariantConstructors { using U =3D T; VariantConstructors(T&& t) requires(requires { U(t); }); }; // Everything below is the same as the repro case template struct InheritFromEntries : Ts... {}; template struct InheritFromPack: InheritFromEntries... { using InheritFromEntries::InheritFromEntries...; }; template struct Variant : InheritFromPack>...> {}; template class Outer; struct Inner { Inner(Outer); }; template class Outer { Variant value_; }; struct Empty {}; void fn(Outer x) {} ``` (https://godbolt.org/z/1GTrjcvG6)=