Modify

Opened 2 years ago

Last modified 2 years ago

#11869 new Bugs

Boost should consistently use BOOST_ for all #defines and standardize header guards

Reported by: Joseph Garvin <joseph.h.garvin@…> Owned by:
Milestone: To Be Determined Component: None
Version: Boost 1.61.0 Severity: Problem
Keywords: Cc:

Description

I use boost in my own code, and I've recently had to make it work with a 3rd party that uses boost as well, but they're on a different version. Getting them to update versions is going to take a long time, and I have no other choice of vendor for this particular product, so a coworker was forced to write a script to try and rename all the #defines and symbol names (boost -> bxxst) in order to have the two versions coexist in the same binary.

This works, but it's forced to have a lot of special cases due to two issues:

-Header guard style is basically random, I've seen 5+ different variants.

-A random assortment of #define's that have no indication in their name that they come from boost that I have to just hard code into my script.

Seeing as the first is a style inconsistency it would be desirable to fix anyway, and the latter is bad for interoperability with other libraries (prefixing #define's with your library's name is pretty standard practice in the C/C++ world), and I've heard of others dealing with my problem before, I figured it merited a bug report.

Fixing it won't help me for now because any changes will only be in newer versions obviously, but it would it make it easier to deal with going forward and have the other mentioned benefits.

Attachments (0)

Change History (1)

comment:1 Changed 2 years ago by viboes

For the second point I recommend you to create a ticket for each concerned library as concrete as possible.

For the first point, I believe that the battle is lost in advance.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.