#6999 closed Feature Requests (fixed)
Boost.Move support in Boost.Any
Reported by: | Owned by: | nasonov | |
---|---|---|---|
Milestone: | To Be Determined | Component: | any |
Version: | Boost 1.49.0 | Severity: | Problem |
Keywords: | Cc: | antoshkka@… |
Description
Currently there is no support for move semantics in Boost.Any. It would be nice if the boost::any itself could be movable, but more importantly if it can store values of movable types without copying.
Attachments (2)
Change History (20)
by , 10 years ago
Attachment: | anymove.patch added |
---|
comment:1 by , 10 years ago
I added a naive implementation which seems to work under MSVC 2010, MINGW 4.6 and ICL 12.0. But I never used Boost.Move or rvalue references before, especially not with templates, so probably a deep review is required before merging. :)
comment:2 by , 10 years ago
Cc: | added |
---|
Naive patch (anymove.patch) does not work well on trunk version of boost.
Attached new patch with a series of tests. Tests pass on MSVC11 and GCC-4.6
comment:3 by , 10 years ago
comment:4 by , 10 years ago
comment:5 by , 10 years ago
comment:6 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:7 by , 9 years ago
comment:8 by , 9 years ago
comment:9 by , 9 years ago
comment:11 by , 9 years ago
comment:12 by , 9 years ago
(In [84603]) Docs update: ValueType of Boost.Any shall be CopyConstructible, not Move constructible (refs #6999)
comment:13 by , 9 years ago
(In [84604]) Docs update: ValueType of Boost.Any shall be CopyConstructible, not Move constructible (refs #6999)
comment:15 by , 9 years ago
comment:16 by , 9 years ago
comment:18 by , 9 years ago
Why "const" in "decay<const ValueType>" in the template conversion ctor of any ?
Naive move semantics implementation.