[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: implement workaround for header files

From: Gavin Smith
Subject: Re: implement workaround for header files
Date: Sun, 9 Jun 2013 18:41:40 +0100

On Fri, Jun 7, 2013 at 1:03 AM, Peter Johansson <address@hidden> wrote:
> I maintain a library that uses boost heavily. Recently I learnt that
> <boost/exception_ptr.hpp> is broken with certain version of GCC (4.4.7 for
> example). I would like provide a workaround for users of the library (myself
> e.g.) so we won't even notice the breakage. I've implemented a compile test
> with AC_COMPILE_IFELSE that tests whether the compiler and
> 'exception_ptr.hpp' get along or not, but now I'm not sure what is the best
> way to use this test. If I wrote an application I would AC_DEFINE and
> whether depending on that define or not I could include a patched header
> file first. But since I'm writing a library and the problem is exposed in
> header files that are installed I'm not sure what is the best way to
> accomplish that. I already have a 'public_config.h' with a subset of content
> in 'config.h', which is installed. Yet I'm not sure what is the best way to
> accomplish a good solution here. If I need to install a patched boost header
> file, it must be hidden away so people won't include it by mistake;
> otherwise I might get a mob after me rightfully. Anyone having experience
> with this kind of workaround? I looked at gnulib but it seems focused on
> workarounds for end applications and not installed headers, which is
> slightly different.

Do users of your library have to use what is declared in
<boost/exception_ptr.hpp>; equivalently, do they have to include this
file to use your library? If not, there wouldn't be a problem - the
source for your library could include an alternative header file, but
it wouldn't have to be installed - it is only needed when the library
itself is compiled.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]