public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/110636] New: boost::geometry compile error with std::set.
@ 2023-07-12  3:00 justin at jtcholzer dot net
  2023-07-12  3:24 ` [Bug c++/110636] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: justin at jtcholzer dot net @ 2023-07-12  3:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110636

            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" that
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 <set>

//!!!! this before geometry.hpp include triggers the error !!!!!
using std::set;

#include <boost/geometry.hpp>


int main(int argc, char** argv)
{
    return 0;
}
///////////////////////////////////

$ make
g++ -c main.cpp -o main.o -std=c++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 ‘void
boost::geometry::model::d2::point_xy<CoordinateType, CoordinateSystem>::x(const
CoordinateType&)’:
/usr/include/boost/geometry/geometries/point_xy.hpp:74:27: error: type/value
mismatch at argument 1 in template parameter list for ‘template<class _Key,
class _Compare, class _Alloc> class std::set’
   74 |     { this->template set<0>(v); }
      |                           ^
/usr/include/boost/geometry/geometries/point_xy.hpp:74:27: note:   expected a
type, got ‘0’
/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 ‘void
boost::geometry::model::d2::point_xy<CoordinateType, CoordinateSystem>::y(const
CoordinateType&)’:
/usr/include/boost/geometry/geometries/point_xy.hpp:78:27: error: type/value
mismatch at argument 1 in template parameter list for ‘template<class _Key,
class _Compare, class _Alloc> class std::set’
   78 |     { this->template set<1>(v); }
      |                           ^
/usr/include/boost/geometry/geometries/point_xy.hpp:78:27: note:   expected a
type, got ‘1’
/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: ‘#pragma
message: This header is deprecated. Use <boost/core/no_exceptions_support.hpp>
instead.’
   17 | BOOST_HEADER_DEPRECATED("<boost/core/no_exceptions_support.hpp>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:4: compile] Error 1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/110636] boost::geometry compile error with std::set.
  2023-07-12  3:00 [Bug c++/110636] New: boost::geometry compile error with std::set justin at jtcholzer dot net
@ 2023-07-12  3:24 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-12  3:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110636

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup .

*** This bug has been marked as a duplicate of bug 106310 ***

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-07-12  3:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-12  3:00 [Bug c++/110636] New: boost::geometry compile error with std::set justin at jtcholzer dot net
2023-07-12  3:24 ` [Bug c++/110636] " pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).