From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4DD7A395ACCC; Tue, 17 Mar 2020 16:16:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4DD7A395ACCC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1584461793; bh=TcmMkTg1yLt1eQtopQJocw+IMhEZPJYNPuzZN+Qr9Ig=; h=From:To:Subject:Date:From; b=QiBgye3FF0iC1DPYXBH6IMKAApVmCC9igkakqgt9pPClVavCCmtkSO8SApqxIbuaW tLTS9RSVNCMws2mGaRE/haklMlDAdND9wYWZI5ZURcS6M4V/butDyOuwAtwRrqZXtv wStyCpOWdmAyrCHSfZFZnm2QY/y6YWSv5EtYo/FE= From: "erich.keane at intel dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/94203] New: experimental/executor and socket header issues- Date: Tue, 17 Mar 2020 16:16:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: erich.keane at intel 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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, 17 Mar 2020 16:16:33 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94203 Bug ID: 94203 Summary: experimental/executor and socket header issues- Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: erich.keane at intel dot com Target Milestone: --- Again detected by trying to compile these headers with clang, I get two more issues. They can be reproduced here: https://godbolt.org/z/L-UVGq though t= hat still shows the previous version's issue with service_already_exists. First, it appears that _TgtImpl attempts to add 'const' to the return type = of the overridden function: ../include/c++/10.0.1/experimental/executor:1170:2: error: return type of virtual function 'target' is not covariant with the re= turn type of the function it overrides (class type 'const void *' is more qualified than class type 'void *' target(const std::type_info& __ti) const ^ ../include/c++/10.0.1/experimental/executor:1138:21: note: overridden virtual function is here virtual void* target(const std::type_info&) const =3D 0; The second issue is that socket_errc doesn't pass is_error_code_enum in __basic_socket_impl: ../include/c++/10.0.1/experimental/socket:571:9: error: no viable overloaded '=3D' __ec =3D socket_errc::already_open; ~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~ ../include/c++/10.0.1/system_error:208:7: note: candidate template ignored: requirement 'is_error_code_enum::value' was not satisfied [with _ErrorCodeEnum =3D std::experimental::net::v1::socket= _errc] operator=3D(_ErrorCodeEnum __e) noexcept ^ (it then goes on to show a bunch of other options). However, I believe this is because Clang is instantiating this check right away, but the explicit specialization for socket_errc is after it: https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/expe= rimental/socket#L2605 In fact, clang diagnoses this as well: ../include/c++/10.0.1/experimental/socket:2606:12: error: explicit specialization of 'std::is_error_code_enum' after instantiation struct is_error_code_enum ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../include/c++/10.0.1/system_error:206:26: note: implicit instantiation first required here typename enable_if::value, ^=