id summary reporter owner description type status milestone component version severity resolution keywords cc 11177 signals2 does not allow reference return values for a slot Peter Brockamp Frank Mori Hess "As can easily be tested it is not possible to declare a slot with a reference as a return value: {{{ #!cpp #include ""boost\signals2.hpp"" void f() { boost::signals2::signal pTest; boost::signals2::signal rTest; int* p = *pTest(); // OK //int& r = *rTest(); // C2528 on Visual Studio } }}} I do understand what is causing the compiler error (pointer to reference is illegal) and that this is due to the implementation trying to store a pointer to the return value object. Of course this could be worked around by using pointers instead of references (see above example). Nevertheless I think it would be helpful (and make a slot operate more general/generic) if a return type could also be a reference. The question is: Could this be done (didn't take an in-depth look inside the code, as usual there's a lot of macro magic and things behind the scenes)? At least for the enduser there's no apparent reason why this should be prohibited and in case of a given library the current situation enforces additional boiler plate code. Maybe the maintainer of signals2 could give a statement about how he rates the status quo? Thx Peter " Bugs closed To Be Determined signals2 Boost 1.57.0 Problem fixed slot return reference