Boost logo

Boost :

Subject: Re: [boost] Single letter template type causes errors in compile of program_options and filesystem boost libraries
From: Beman Dawes (bdawes_at_[hidden])
Date: 2008-12-18 16:37:12

On Thu, Dec 18, 2008 at 3:51 PM, Andrey Semashev
<andrey.semashev_at_[hidden]> wrote:
> Stefan Seefeld wrote:
>> 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.

It might be better not include the vendor-provided headers at all,
since it would not be surprising if these headers had many other
additional problems. Better to provide a modern, safe interface via
your own headers, implemented in an isolated translation unit that
calls the vendor's functionality.

>> 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.

Yep. One wonders what they could have been thinking and why they used
macros rather than something that observed scoping.


Boost list run by bdawes at, gregod at, cpdaniel at, john at