Opened 9 years ago
Closed 9 years ago
#9620 closed Bugs (fixed)
detail::storage forcing a needless copy, doesn't support move-only types
Reported by: | Eric Niebler | Owned by: | Steven Watanabe |
---|---|---|---|
Milestone: | To Be Determined | Component: | type_erasure |
Version: | Boost 1.54.0 | Severity: | Problem |
Keywords: | Cc: |
Description
struct storage { storage() {} template<class T> storage(const T& arg) : data(new T(arg)) {} void* data; };
A type with a deleted copy ctor causes a compile failure in the above code. This constructor should use perfect forwarding when rvalue references are available.
Change History (2)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
I see this change is already made on the develop branch. Consider this bug report a polite request to merge it to master. :-)