Re: [Boost-bugs] [Boost C++ Libraries] #10316: Thread: add subscription operator if the value provide it.

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10316: Thread: add subscription operator if the value provide it.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-09-28 22:52:25


#10316: Thread: add subscription operator if the value provide it.
-------------------------------+----------------------
  Reporter: mjklaim@… | Owner: viboes
      Type: Feature Requests | Status: assigned
 Milestone: To Be Determined | Component: thread
   Version: Boost 1.55.0 | Severity: Cosmetic
Resolution: | Keywords:
-------------------------------+----------------------

Comment (by viboes):

 The statement

 {{{
 index[0] = 1;
 }}}

 concerns two operations, the operator[] which returns a reference and the
 assignment operator.

 In order to make this work we will need to use expression templates

 operator[] would return a proxy reference, let call it at_type, that must
 store a reference to the synchronized_value instance and the index.

 We would need to overload the assignment operator on at_type so that it
 can do what you want as an atomic operation.

 I have not too much time to implement this kind of cosmetic features, but
 a patch would be welcome. Do you think that you can do it?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10316#comment:3>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:17 UTC