Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
Frequently Asked Questions
c++boost.gif (8819 bytes)HomeLibrariesPeopleFAQMore

Frequently Asked Questions


Don't noncopyable signal semantics mean that a class with a signal member will be noncopyable as well?

No. The compiler will not be able to generate a copy constructor or copy assignment operator for your class if it has a signal as a member, but you are free to write your own copy constructor and/or copy assignment operator. Just don't try to copy the signal.


Is Boost.Signals thread-safe?

No. Using Boost.Signals in a multithreaded concept is very dangerous, and it is very likely that the results will be less than satisfying. Boost.Signals will support thread safety in the future.


How do I get Boost.Signals to work with Qt?

When building with Qt, the Moc keywords signals and slots are defined using preprocessor macros, causing programs using Boost.Signals and Qt together to fail to compile. Although this is a problem with Qt and not Boost.Signals, a user can use the two systems together by defining the BOOST_SIGNALS_NAMESPACE macro to some other identifier (e.g., signalslib) when building and using the Boost.Signals library. Then the namespace of the Boost.Signals library will be boost::BOOST_SIGNALS_NAMESPACE instead of boost::signals. To retain the original namespace name in translation units that do not interact with Qt, you can use a namespace alias:

  namespace boost {
    namespace signals = BOOST_SIGNALS_NAMESPACE;
Last revised: March 12, 2003 at 23:27:23 GMTCopyright © 2001-2003 Douglas Gregor