与Clang和Boost 1.48一起使用的多播委托/信号库?

时间:2012-02-20 17:46:49

标签: c++ delegates c++11 signals clang

我曾尝试将clang 3.0与libc ++和C ++ 0x一起使用。

我用libc ++编译了boost 1.48 How to compile/link Boost with clang++/libc++? 升压/信号被破坏。

所以,我正在寻找替代升压/信号,Jae's Fast Delegate看起来不错,除非它取决于早期版本的升压。

#include <boost/pending/ct_if.hpp>

上述文件已于1.48删除。

那么,是否有其他候选多播委托/信号与clang 3.0和C ++ 0x一起工作?

2 个答案:

答案 0 :(得分:1)

只需在Jae的快速代表代码中将boost::ct_if替换为boost::mpl::if_c(和#include <boost/mpl/if.hpp>)。

答案 1 :(得分:0)

http://www.boost.org/doc/libs/1_49_0/doc/html/signals2.html

Signals2仅限标题,并包含在boost中。它有一些很好的额外功能,如线程安全。

编辑: 看起来当前版本的信号2存在一个错误,它阻止它与clang一起工作。 According to this answer它将在boost 1.50

中修复