Opened 14 years ago
Closed 14 years ago
#2248 closed Bugs (duplicate)
BLL constifies return values of operator*
Reported by: | Owned by: | No-Maintainer | |
---|---|---|---|
Milestone: | Boost 1.37.0 | Component: | lambda |
Version: | Boost 1.36.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Hi, the problem can quickly described as
( *_1 = 0 ) ( shared_ptr<int>(new int) ); // vs ( *_1 = 0) ( new int );
only the second line compiles. I tracked down the problem to boost/lambda/operator_return_type_traits.hpp:230. The BLL sets the return type of (const shared_ptr<int>)::operator*() to be const int& rather than int&. This is like turning int * const into int const *. I (and others) don't see a reason for this specialization, the code above works with the specialization removed.
Note:
See TracTickets
for help on using tickets.
Duplicates #1572.