[thread_safe_signals] returning void from last_value when possible

Hello, When dealing with a signature of void return type, the Boost.Signals version of last_value only returns last_value::unusable when the compiler doesn't support void returns: http://svn.boost.org/trac/boost/browser/trunk/boost/last_value.hpp#L34 But the thread-safe version always returns last_value::unusable: http://svn.boost.org/trac/boost/browser/sandbox/thread_safe_signals/boost/la... Could the thread-safe version be made consistent with Boost.Signals? Thanks, Stjepan

On Tuesday 26 August 2008 17:44, Stjepan Rajko wrote:
Hello,
When dealing with a signature of void return type, the Boost.Signals version of last_value only returns last_value::unusable when the compiler doesn't support void returns: http://svn.boost.org/trac/boost/browser/trunk/boost/last_value.hpp#L34
But the thread-safe version always returns last_value::unusable: http://svn.boost.org/trac/boost/browser/sandbox/thread_safe_signals/boos t/last_value.hpp#L68
Could the thread-safe version be made consistent with Boost.Signals?
Ok, I've done it in svn. By the way, did you mean to make struct unusable private in boost.signals last_value<void>? Because it's declared as a struct so it is actually public.

On Tue, Aug 26, 2008 at 7:27 PM, Frank Mori Hess <fmhess@speakeasy.net> wrote:
Ok, I've done it in svn. By the way, did you mean to make struct unusable private in boost.signals last_value<void>? Because it's declared as a struct so it is actually public.
Thanks for the quick fix! As far as private/public, I just followed what was there before: http://svn.boost.org/trac/boost/browser/trunk/boost/boost/last_value.hpp?rev... But yeah, it looks like the intent is that unusable should be private but in fact it isn't. Best, Stjepan
participants (2)
-
Frank Mori Hess
-
Stjepan Rajko