Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-08-01 16:06:46


"E. Gladyshev" <egladysh_at_[hidden]> writes:

>> Not quite. pImpl is really bad when you have
>> multiple interacting
>> concrete types. I think you'll find yourself doing
>> a lot of
>> polymorphic_downcast<>s.
>
> Another good point against the pImpl idiom. I'd
> suggest to overwrite some of the boost libaries that
> use the pImpl thing. It is not like a modern C++ at
> all.

Pimpl definitely has its place. I'm doing one right now as you can
probably tell from my recent posting. Anyway, maybe you should
consider a preprocessor-based solution:

    #include <boost/gui/windows_defs.hpp>

    namespace boost { namespace gui { namespace windows {

    #include <boost/gui/implementation.hpp>

    }}}

If you buy Doug G.'s argument that no application will use two
GUIs at once, you can even do something simpler because there's no
issue with namespace collisions.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk