Opened 12 years ago
Closed 12 years ago
#4892 closed Patches (fixed)
boost::make_shared doesn't use r-value ref support unless variadic templates are also supported
Reported by: | Owned by: | Peter Dimov | |
---|---|---|---|
Milestone: | To Be Determined | Component: | smart_ptr |
Version: | Boost 1.45.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Currently, boost::make_shared doesn't make use of r-value references unless there is also support for variadic templates ("#if defined( BOOST_HAS_VARIADIC_TMPL ) && defined( BOOST_HAS_RVALUE_REFS )").
At least one popular compiler supports rvalue refs but unfortunately not variadic templates (MSVC 10.0), so the implementation falls back on the pre-c++0x implementation.
The attached file improves the situation by adding make_shared support for up to 10 perfectly forwarded constructor arguments.
Attachments (1)
Change History (7)
by , 12 years ago
Attachment: | boost_make_shared.hpp added |
---|
comment:1 by , 12 years ago
Type: | Bugs → Patches |
---|
comment:2 by , 12 years ago
Type: | Patches → Feature Requests |
---|
To be honest, I missed that field when creating the ticket, thanks for changing...it's actually an enhancement to an existing feature, so "patches" feels natural although any classification will do as long as it catches Mr Dimov's attention =)
comment:3 by , 12 years ago
Type: | Feature Requests → Patches |
---|
comment:4 by , 12 years ago
comment:5 by , 12 years ago
Status: | new → assigned |
---|
comment:6 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
If the current implementation doesn't make any code to work incorrectly this should be a Feature request.