Opened 8 years ago
Last modified 7 years ago
#11202 new Bugs
boost.sort header conflicts with boost.range header
Reported by: | Owned by: | Neil Groves | |
---|---|---|---|
Milestone: | To Be Determined | Component: | range |
Version: | Boost 1.58.0 | Severity: | Problem |
Keywords: | sort | Cc: | stevenross |
Description
This two-line program fails to compile.
#include <boost/range/algorithm.hpp> #include <boost/sort/spreadsort/spreadsort.hpp>
The headers conflict on "boost::sort". The first header declares a function boost::sort. The second header declares a namespace boost::sort.
Change History (4)
comment:1 by , 7 years ago
Component: | None → algorithm |
---|---|
Owner: | set to |
comment:2 by , 7 years ago
Component: | algorithm → sort |
---|---|
Owner: | changed from | to
comment:3 by , 7 years ago
Cc: | added |
---|---|
Component: | sort → range |
Keywords: | sort added |
Owner: | changed from | to
This is due to the "using range::sort" at the bottom of boost/range/algorithm/sort.hpp (fixing this also requires renaming uses of boost::sort to boost::range::sort). It's causing namespace pollution by putting a function in the boost:: namespace, that's conflicting with the boost::sort library. It's also a violation of this guideline: https://svn.boost.org/trac/boost/wiki/Guidelines/MaintenanceGuidelines#Avoidtheinclusionofsymbolsattheboostorboost::detailnamespace
Neil Groves has agreed to look into it.
comment:4 by , 7 years ago
I know, Boost is a project of volunteers but I just stumbled over the same issue. And since there is no +1 and the last activity has been months ago I figured I just put a comment here to bring that ticket to your attention again.
This is definitely not me. This belongs to Steven Ross, maintainer of the Boost.Sort library.