Subject: Re: [boost] Single letter template type causes errors in compile of program_options and filesystem boost libraries
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2008-12-18 15:51:00
Stefan Seefeld wrote:
> Mike Collier wrote:
>> The errors are the result of using single letters for variables or
>> template types. The reason for the errors is in my compile environment
>> ( electrical engineering related ) defines are used for the
>> convenience of writing units in code. These defines exist in a vendor
>> supplied header in my project:
>> #define A
>> #define V
>> #define W
>> #define s
>> #define S
>> #define J
> Sorry, but this is just bad coding practice. Instead of changing boost
> in order to accomodate for it, I suggest that you isolate the libraries
> from each other, by carefully undefining those single-letter macros
> prior to including boost.
Another solution might be simply changing include order, so that boost
headers get included prior to the vendor-provided headers.
> If something should use longer names, it's these macros in your library,
> not boost template parameters.
Since this library is not Mike's, I'd rather suggest reporting this
issue to the library vendor.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk