[Boost-bugs] [Boost C++ Libraries] #2569: export macro cannot be used on same line # in different files in same translation unit

Subject: [Boost-bugs] [Boost C++ Libraries] #2569: export macro cannot be used on same line # in different files in same translation unit
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-12-05 16:50:38


#2569: export macro cannot be used on same line # in different files in same
translation unit
---------------------------------+------------------------------------------
 Reporter: kfriddile_at_[hidden] | Owner: ramey
     Type: Patches | Status: new
Milestone: Boost 1.38.0 | Component: serialization
  Version: Boost 1.37.0 | Severity: Problem
 Keywords: |
---------------------------------+------------------------------------------
 In export.hpp the BOOST_CLASS_EXPORT macro calls the
 BOOST_CLASS_EXPORT_GUID macro which uses the __LINE__ directive in an
 attempt to create a globally unique variable name. However, if multiple
 headers use the aforementioned macro on the same line #, and are included
 in the same translation unit, compilation will fail due to variable
 redefinition. This scenario isn't unlikely, as I had three conflicting
 headers out of the five I included in a single cpp. I have attached a
 patch in unified diff format that fixes this issue for me, but has not
 been run through any unit tests.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2569>
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:59 UTC