[Boost-bugs] [Boost C++ Libraries] #2134: Namespace conflict in implementation of Boost.Integer

Subject: [Boost-bugs] [Boost C++ Libraries] #2134: Namespace conflict in implementation of Boost.Integer
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-07-21 22:49:23


#2134: Namespace conflict in implementation of Boost.Integer
----------------------------------------------+-----------------------------
 Reporter: dlwalker | Owner: dlwalker
     Type: Bugs | Status: new
Milestone: Boost 1.36.0 | Component: integer
  Version: Boost Development Trunk | Severity: Problem
 Keywords: integer namespace integer_traits |
----------------------------------------------+-----------------------------
 This is based off the thread starting at
 <http://lists.boost.org/Archives/boost/2008/07/139840.php>.

 In "[source:trunk/boost/integer.hpp_at_47408 boost/integer.hpp]", class
 templates in the `boost::detail` namespace refer to an unadorned
 `integer_traits` template. The template referenced is meant to be
 `boost::integer_traits` in
 "[source:trunk/boost/boost/integer_traits.hpp_at_32576
 boost/integer_traits.hpp]". However, a `boost::detail::integer_traits`
 template exists in
 "[source:trunk/boost/boost/detail/numeric_traits.hpp_at_24446
 boost/detail/numeric_traits.hpp]". This latter template gets priority as
 the choice of what the unadorned `integer_traits` mention refers to, which
 was not intended. The problem only manifests when
 "boost/detail/numeric_traits.hpp" gets #included, directly or indirectly,
 before "boost/integer.hpp", but doesn't manifest if "boost/integer.hpp" is
 #included first (which may be a ODR violation).

 Thanks to Jeroen van der Wulp for initially reporting this and providing a
 potential patch.

-- 
Ticket URL: <http://svn.boost.org/trac/boost/ticket/2134>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:58 UTC