Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#12748 closed Bugs (fixed)

Boost.Test defines a variable called VERSION

Reported by: Benoit Sigoure <tsunanet@…> Owned by: Raffi Enficiaud
Milestone: Boost 1.64.0 Component: test
Version: Boost 1.63.0 Severity: Problem
Keywords: Cc:

Description

In commit 86bcffe Boost.Test was changed to define a variable called VERSION. This collides with a #define VERSION usually defined by the GNU Autotools.

My workaround at this point is to #undef VERSION before #includeing Boost.Test but that's not tractable (I'm not gonna chase down every single use of Boost.Test in our large codebase).

Change History (6)

comment:1 by Adam Majer <amajer@…>, 6 years ago

This is a pretty nasty regression.

Generally, it is a terrible idea to use ALL CAPITAL as variable names. These are reserved, by convention, to be used as #defines.

comment:2 by anonymous, 6 years ago

Milestone: To Be DeterminedBoost 1.64.0

Fixed in origin/topic/12748-VERSION-macro-clashes.

comment:3 by Raffi Enficiaud, 6 years ago

Owner: changed from Gennadiy Rozental to Raffi Enficiaud

comment:4 by Raffi Enficiaud, 6 years ago

Resolution: fixed
Status: newclosed

Merged to master, rev a2b73f5d7568e69162dfac213fab87eea0021ec5

comment:5 by anonymous, 5 years ago

Are those variables part of the public API of Boost.Test?

My concern is whether backporting the patch to Fedora's boost-1.63.0 would cause an API incompatibility between Fedora's package and the official Boost 1.63.0 release.

comment:6 by anonymous, 5 years ago

Also, why are those variables non-const?!

Note: See TracTickets for help on using tickets.