|
Boost : |
From: Terje Slettebø (tslettebo_at_[hidden])
Date: 2002-05-24 21:16:13
>From: "Beman Dawes" <bdawes_at_[hidden]>
> At 09:00 AM 5/23/2002, Douglas Gregor wrote:
>
> >We can't just replace the 'signals' namespace with a (user-defined, but
> >defaulted) macro BOOST_SIGNALS_NAMESPACE because that doesn't play
nicely
>
> >with (shared) libraries.
> >
> >Here's a possibility: the Signals library moves from the boost::signals
> >namespace to the boost::signalslib namespace (better names anyone?
> please?).
> >
> >Then the Signals library also has this:
> >
> >#ifndef signals
> >namespace boost {
> > namespace signalslib {}
> > namespace signals = signalslib;
> >}
> >#endif
> >
> >So when Qt is not available, the boost::signals namespace alias is used
> and
> >nobody knows the difference (would someone confirm this? I haven't
needed
>
> >namespace aliases before...)...
>
> Ugly. Think about it long and hard. As Boost gets used with more and more
> third party libraries, we are going to run into this sort of problem more
> often.
This is one of the problems with using a proprietary preprocessor like Qt
does (the MOC), which implements these new keywords, making these clashes. I
think it would have been better if they had implemented the signal/slot, and
reflection capability, in the language itself.
> Do we really want to change our libraries because of the rudeness of
> others?
I don't think so, either. The problem is at their end, so to speak. :) They
introduce extensions, making it incompatible with standards compliant code.
I think this is something they should resolve, not other libraries.
However, as with noncompliant compilers, this also comes down to what is
practically possible. Maybe a configuration switch could be used for this,
in config.hpp.
Regards,
Terje
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk