i have had a problem with /usr/include/c++/4.6/ext/new_allocator.h:108:9: error: use of deleted function ‘SMIBQueue::SMIBQueue(const SMIBQueue&)’ with C++ eclipse.
and i am using -std=c++0x flag to use C++11
though i found the point that the error occur at, i don't know why.
this is header file
class SMIBQueue{ private: std::queue<unsigned char> exceptionQueue; std::queue<UserRequest*> userInputQueue; std::queue<LpRsp*> lpRspQueue; std::queue<LpCmd*> lpCmdQueue; std::mutex EvtQueueLock; std::mutex UserQueueLock; std::mutex LpRspQueueLock; std::mutex LpCmdQueueLock; public: int evtGetItem(unsigned char &item); int evtPutItem(unsigned char item); int userGetItem(UserRequest*& item); int userPutItem(UserRequest* item); int lpGetItem(LpCmd*& queue_buf); int lpPutItem(LpCmd *queue_buf); int lpRspGetItem(LpRsp*& queue_buf); int lpRspPutItem(LpRsp *queue_buf); int lpRemoveQueuedInfo(); int lpRspRemoveQueuedInfo(); }; class SMIBQueues{ public: static std::vector<SMIBQueue> smibQueues; static void queueInit(int numOfClient); static int evtGetItem(int sasAddr, unsigned char &item); static int evtPutItem(int sasAddr, unsigned char item); static int userGetItem(int sasAddr, UserRequest*& item); static int userPutItem(int sasAddr, UserRequest* item); static int lpGetItem(int sasAddr, LpCmd*& queue_buf); static int lpPutItem(int sasAddr, LpCmd *queue_buf); static int lpRspGetItem(int sasAddr, LpRsp*& queue_buf); static int lpRspPutItem(int sasAddr, LpRsp *queue_buf); static int lpRemoveQueuedInfo(int sasAddr); static int lpRspRemoveQueuedInfo(int sasAddr); }; and this is the function that the error occur at
std::vector<SMIBQueue> SMIBQueues::smibQueues; void SMIBQueues::queueInit(int numOfClient){ for(int i = 0 ; i < numOfClient; i++){ SMIBQueue s; smibQueues.push_back(s); } } in this function, push_pack method makes the error. when i eliminate the part, there is no problem while compiling.