Opened 13 years ago

Closed 13 years ago

#3944 closed Bugs (invalid)

unique_ptr problem with return

Reported by: habdank@… Owned by:
Milestone: Boost 1.43.0 Component: interprocess
Version: Boost 1.38.0 Severity: Problem
Keywords: Cc: gernot.zankl@…

Description

Dears

We are using gcc 4.1.2.

In the boost version 1.39 the code like compiles well:

return unique_ptr<FILE,PIPE_Deleter>(0);

In the boost 1.38 does not.

The error message is like below and points that during return copy ctor is used, which is private, but there is no documentation on changes between 1.39 and 1.38 in the unique_ptr interface, so for both boost versions code shall be OK.

Could you look at that issue, please.

/usr/local/include/boost-1_38/boost/interprocess/smart_ptr/unique_ptr.hpp:378: error: 'boost::interprocess::unique_ptr<T, D>::unique_ptr(const boost::interprocess::unique_ptr<T, D>&) [with T = _IO_FILE, D = PIPE_Deleter]' is private jpegDisplay.cpp:279: error: within this context /usr/local/include/boost-1_38/boost/interprocess/smart_ptr/unique_ptr.hpp:378: error: 'boost::interprocess::unique_ptr<T, D>::unique_ptr(const boost::interprocess::unique_ptr<T, D>&) [with T = _IO_FILE, D = PIPE_Deleter]' is private jpegDisplay.cpp:279: error: within this context

Change History (1)

comment:1 by Steven Watanabe, 13 years ago

Component: Noneinterprocess
Resolution: invalid
Status: newclosed

If it didn't work in the older version and does work in the newer version, it's probably a bug that was fixed. 1.38 was released a while ago and we can't easily go back and fix it.

Note: See TracTickets for help on using tickets.