From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A1E95386F45D; Tue, 21 Apr 2020 08:41:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A1E95386F45D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587458472; bh=VgEkKHnwRhaOCHFD6XQTrq8i6aJE2beEiq/hP1ANiIc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rugU7ZPeqsqbjQt5U5bo0j0TsgoDKsulAI4Z+5MP6Yb4DqJTklgRsSz7kOe0zLbF3 8g6z1CdhR695k7GowaKcFJmPoEWMYXOHq/9zF4ecB4pCxzlw7HewBL+jUIF/Tj2NIu XcmUARM1G+GiU7RAlejnJjKei/HnaZcRa6z86MPk= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94679] link time error: undefined reference to std::projected<...>::operator *() const Date: Tue, 21 Apr 2020 08:41:12 +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: 10.0 X-Bugzilla-Keywords: link-failure X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW 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: Tue, 21 Apr 2020 08:41:12 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94679 --- Comment #2 from Jonathan Wakely --- Reduced: template struct projected { T operator*() const; }; struct IMove { template decltype(auto) operator()(T&& t) const { return *t; } }; IMove iter_move; template concept fooable =3D requires (T t) { iter_move(t); }; template requires fooable> void func(T) { } int main() { int i =3D 0; func(i); } g++ -std=3Dc++20 use.cc -coverage -fkeep-inline-functions /usr/bin/ld: /tmp/ccS2FlMR.o: in function `decltype(auto) IMove::operator()&>(projected&) const': /tmp/use.cc:13: undefined reference to `projected::operator*() const' collect2: error: ld returned 1 exit status=