Hello,
I'm trying to build some projects using Boost 1.55 and VS2013 RC targeting Visual Studio 2013 RC (v120), i.e. MSVC12. I'm currently getting a problem with Boost.Signals2. After much head scratching, I created a test project lifting the simplest Hello World example from the Boost.Signals2 docs. It works, but adapting to receive the "Hello, World!" string, it fails. Also note, oddly, adding the result_type typedef is required whereas it is not under MSVC11. Any ideas?
BTW: the code works fine in MSVC11 ...
struct HelloWorld
{
typedef void result_type; // <--- This seems to be required for MSVC12 RC
void operator()(std::string msg) const
{
std::cout << msg << std::endl;
}
};
int main()
{
boost::signals2::signal<void (const std::string& msg)> sig;
// Connect a HelloWorld slot
HelloWorld hello;
sig.connect(hello);
// Call all of the slots
sig("Hello, World!");
return 0;
}