Stjepan Rajko | 26 Aug 23:43
Favicon

[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/last_value.hpp#L68

Could the thread-safe version be made consistent with Boost.Signals?

Thanks,

Stjepan
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Frank Mori Hess | 27 Aug 04:27
Favicon

Re: [thread_safe_signals] returning void from last_value when possible

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.
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Stjepan Rajko | 27 Aug 06:32
Favicon

Re: [thread_safe_signals] returning void from last_value when possible

On Tue, Aug 26, 2008 at 7:27 PM, Frank Mori Hess <fmhess <at> 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=24016

But yeah, it looks like the intent is that unusable should be private
but in fact it isn't.

Best,

Stjepan
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Gmane