shared_future<T>::get() has wrong return type
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.
Change History
(10)
| Keywords: |
doc move shared_future added
|
| Owner: |
changed from Anthony Williams to viboes
|
| Status: |
new → assigned
|
| Version: |
Boost Development Trunk → Boost 1.48.0
|
| Milestone: |
To Be Determined → Boost 1.49.0
|
| Milestone: |
Boost 1.49.0 → Boost 1.50.0
|
| Resolution: |
→ fixed
|
| Status: |
assigned → closed
|
| Cc: |
jonathan.jones@… added
|
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.