Opened 14 years ago
Closed 14 years ago
#2569 closed Patches (fixed)
export macro cannot be used on same line # in different files in same translation unit
Reported by: | Owned by: | Robert Ramey | |
---|---|---|---|
Milestone: | Boost 1.38.0 | Component: | serialization |
Version: | Boost 1.37.0 | Severity: | Problem |
Keywords: | Cc: |
Description
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.
Attachments (1)
Change History (2)
by , 14 years ago
Attachment: | boost_serialization.patch added |
---|
comment:1 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This looks ok. I rolled in a version of this patch to my local system where it will eventually migrate into the package.
Robert Ramey