From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E867B3858C62; Wed, 12 Jul 2023 03:00:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E867B3858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689130843; bh=LKdIYN7sQROYMYTRIKyUdreAmkUww436iw2VE5+Qbjc=; h=From:To:Subject:Date:From; b=FghOCjGglTbr7D8SX1j7xqdxLLl3o4/v2jleXPvwS3CLYja8HTl4tmKDoWJCH61x4 xy45BLAy3K/7Ru3MhSgIeI1rn3zdh3T3EFWfJE3+MzMzkrZKjwFKLoPPdJHpBKGZIW yWQUy+cxXlmYSoiUPTDOd9wdbvP4JOKiCb5stBSw= From: "justin at jtcholzer dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110636] New: boost::geometry compile error with std::set. Date: Wed, 12 Jul 2023 03:00:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: og12 (devel/omp/gcc-12) X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: justin at jtcholzer dot net 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110636 Bug ID: 110636 Summary: boost::geometry compile error with std::set. Product: gcc Version: og12 (devel/omp/gcc-12) Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: justin at jtcholzer dot net Target Milestone: --- At work, we ran across this upgrading from GCC 9 to GCC 12. This is a trivial example. In our large code base we use a "unity build" t= hat mixes including of .h and .cpp files to speed linking. We worked around the issue by removing "using std::set;" from all files. $ g++ --version g++ (Debian 12.2.0-14) 12.2.0 Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ apt search libboost-dev Sorting... Done Full Text Search... Done libboost-dev/stable,oldstable,testing,now 1.74.0.3 amd64 [installed] Boost C++ Libraries development files (default version) ///////// main.cpp //////////////// #include //!!!! this before geometry.hpp include triggers the error !!!!! using std::set; #include int main(int argc, char** argv) { return 0; } /////////////////////////////////// $ make g++ -c main.cpp -o main.o -std=3Dc++14 In file included from /usr/include/boost/geometry/strategies/geographic/distance.hpp:38, from /usr/include/boost/geometry/strategies/strategies.hpp:113, from /usr/include/boost/geometry/geometry.hpp:58, from /usr/include/boost/geometry.hpp:17, from main.cpp:6: /usr/include/boost/geometry/geometries/point_xy.hpp: In member function =E2= =80=98void boost::geometry::model::d2::point_xy::x(c= onst CoordinateType&)=E2=80=99: /usr/include/boost/geometry/geometries/point_xy.hpp:74:27: error: type/value mismatch at argument 1 in template parameter list for =E2=80=98template class std::set=E2=80=99 74 | { this->template set<0>(v); } | ^ /usr/include/boost/geometry/geometries/point_xy.hpp:74:27: note: expected= a type, got =E2=80=980=E2=80=99 /usr/include/boost/geometry/geometries/point_xy.hpp:74:27: error: template argument 2 is invalid /usr/include/boost/geometry/geometries/point_xy.hpp:74:27: error: template argument 3 is invalid /usr/include/boost/geometry/geometries/point_xy.hpp: In member function =E2= =80=98void boost::geometry::model::d2::point_xy::y(c= onst CoordinateType&)=E2=80=99: /usr/include/boost/geometry/geometries/point_xy.hpp:78:27: error: type/value mismatch at argument 1 in template parameter list for =E2=80=98template class std::set=E2=80=99 78 | { this->template set<1>(v); } | ^ /usr/include/boost/geometry/geometries/point_xy.hpp:78:27: note: expected= a type, got =E2=80=981=E2=80=99 /usr/include/boost/geometry/geometries/point_xy.hpp:78:27: error: template argument 2 is invalid /usr/include/boost/geometry/geometries/point_xy.hpp:78:27: error: template argument 3 is invalid In file included from /usr/include/boost/math/tools/cxx03_warn.hpp:9, from /usr/include/boost/math/constants/constants.hpp:11, from /usr/include/boost/geometry/util/math.hpp:29, from /usr/include/boost/geometry/core/radian_access.hpp:33, from /usr/include/boost/geometry/geometry.hpp:51: /usr/include/boost/detail/no_exceptions_support.hpp: At global scope: /usr/include/boost/detail/no_exceptions_support.hpp:17:1: note: =E2=80=98#p= ragma message: This header is deprecated. Use instead.=E2=80=99 17 | BOOST_HEADER_DEPRECATED("") | ^~~~~~~~~~~~~~~~~~~~~~~ make: *** [Makefile:4: compile] Error 1=