From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 32DA63858D34; Thu, 2 Jul 2020 22:53:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 32DA63858D34 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1593730389; bh=bWGJGh/PXy2sPKhk3v4GNKZYtCN3F3VznyZulPdoCTE=; h=From:To:Subject:Date:From; b=kZZvtdKga4bmb8ZNavGatZL6waOm6D1t3NcXY6DSXq7XtkeRSP2ll/tZkJTSJ9b8J 4at4vIjgxDEG9nlSbXTP5Q4XYVyyUihhzVRPOteME2Bia859jN7XhhlVTUbWuoV8bB LOduF0yaHbdnSP/iujk44tivho6yAxsY9tDpHZBI= From: "gcc-bugs at marehr dot dialup.fu-berlin.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/96042] New: Reference type of std::ranges::iota is __int128 with -std=c++2a?! Date: Thu, 02 Jul 2020 22:53:09 +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: 10.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gcc-bugs at marehr dot dialup.fu-berlin.de 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: Thu, 02 Jul 2020 22:53:09 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96042 Bug ID: 96042 Summary: Reference type of std::ranges::iota is __int128 with -std=3Dc++2a?! Product: gcc Version: 10.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: gcc-bugs at marehr dot dialup.fu-berlin.de Target Milestone: --- The following code ```c++ #include using iota_view =3D std::ranges::iota_view; using reference_t =3D std::ranges::range_difference_t; static_assert(std::same_as); // why? // but std::numeric_limits is not specialised which indicates that we use __STRICT_ANSI__ using t =3D std::numeric_limits<__int128>; static_assert(t::is_specialized); ``` https://godbolt.org/z/-XFyYN I don't fully understand what `__int128` and `__STRICT_ANSI__` means, but I think it is unexpected that I get a type that is not described in the stand= ard. I know that `std::indirectly_readable` allows (compiler) implementation def= ined signed integer types, but from what I have seen, `__int128` is normally only supported / exposed in the gnu standard library if `__STRICT_ANSI__` is not defined. Since `-std=3Dc++2a` does not provide a specialisation for `std::numeric_li= mits`, I assume that this means, that `__STRICT_ANSI__` is not defined in that mod= e, and I think this is inconsistent behaviour. Related issues in the range-v3 library: * https://github.com/ericniebler/range-v3/issues/1514 * https://github.com/ericniebler/range-v3/issues/1516=