#5990 closed Patches (fixed)
shared_future<T>::get() has wrong return type
Reported by: | Owned by: | viboes | |
---|---|---|---|
Milestone: | Boost 1.50.0 | Component: | thread |
Version: | Boost 1.48.0 | Severity: | Problem |
Keywords: | doc move shared_future | Cc: | Troy.Runkel@…, jonathan.jones@… |
Description
The return type of shared_future<T>::get() seems to be mixed up. The actual code (Trunk) returns T by value. The documentation says 'return by value' at some places and 'return by const ref' at other places (e.g. in the running text). The C++11 standard requires 'return by const ref' too.
Attachments (1)
Change History (10)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Keywords: | doc move shared_future added |
---|
comment:3 by , 11 years ago
Cc: | added |
---|
by , 11 years ago
Attachment: | 5590_5531.diff added |
---|
Could you try the attached patch for this and #5531?
comment:4 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Version: | Boost Development Trunk → Boost 1.48.0 |
comment:5 by , 11 years ago
Type: | Bugs → Patches |
---|
comment:6 by , 11 years ago
Milestone: | To Be Determined → Boost 1.49.0 |
---|
comment:8 by , 10 years ago
Milestone: | Boost 1.49.0 → Boost 1.50.0 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Committed in release branch at [78543]
comment:9 by , 10 years ago
Cc: | added |
---|
Note:
See TracTickets
for help on using tickets.
Same shared_future<T>::get() is broken on compilers that have rvalue (msvc 10). Simplest example is shared_future<std::string> , or any type that has move constructor. It will move away object on first call to get.