Opened 11 years ago

Closed 11 years ago

#6181 closed Feature Requests (wontfix)

Function for overlaoding "=" operator in boost/interprocess/sync/file_lock.hpp should be made public ( It is private currently )

Reported by: pravar.jawalkar@… Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: interprocess
Version: Boost 1.38.0 Severity: Problem
Keywords: Cc:

Description

I am using boost1.38.0 with below combination:

  • OS : HP-UX 11iv3
  • Compiler : aCC A.0.17 ( It is said to be compatible with boost1.38.0)

I am using include boost/interprocess/sync/file_lock.hpp somewhere in my source that use "=" operator for assigning one file_lock object to another.

ScopedShmAttacher::ScopedShmAttacher():

shmPtr(NULL), lockStatus(-1), lockFd(0)

{

std::string mtxName = lockFileDir + lockFileName; createLockFile(mtxName); this->flock = boost::interprocess::file_lock(mtxName.c_str()); this->lock();

}

The above piece of code fails at compilation because "=" operator which is overloaded in file_lock class is declared private and also not defined.

But when I compile same code with boost1.45.0, My code compiles.

It would be better if same functionality as of boost1.45.0 can be provided in boost1.38.0. I am not sure though it is feasible. I am trying for some hack as of now.

Change History (2)

comment:1 by viboes, 11 years ago

Component: Noneinterprocess

comment:2 by Ion Gaztañaga, 11 years ago

Resolution: wontfix
Status: newclosed

File_lock is not copyable, but movable. Move semantics were added in recent versions so there are no plans to backport features to Boost 1.38.

Note: See TracTickets for help on using tickets.