Home > Error C2248 > Error C2248 Boost Noncopyable_ Noncopyable Noncopyable

Error C2248 Boost Noncopyable_ Noncopyable Noncopyable

Contents

I have no clue where this is being thrown so its a hard one for me to debug. The error this generated from the compiler was: 1>Q:\include\boost\1.39.0\boost/asio/basic_io_object.hpp(92) : error C2248: 'boost::noncopyable_::noncopyable::noncopyable' : cannot access private member declared in class 'boost::noncopyable_::noncopyable' 1> Q:\include\boost\1.39.0\boost/noncopyable.hpp(27) : see declaration of 'boost::noncopyable_::noncopyable::noncopyable' 1> Q:\include\boost\1.39.0\boost/noncopyable.hpp(22) if ( nextJob ) { ( *nextJob )(); } } } TrackView::WorkerThread::JobPtr TrackView::WorkerThread::enqueJob( const boost::function1< void, const CancelRequest& >& func ) { JobPtr pJob( new TrackView::WorkerThread::Job( func ) ); mv_JobQueue.put( pJob In this case the goal would be to make the compiler fail in such a way as to report the class the actual copy was taking place in. this contact form

It took a long time to track this down because there was zero information about even what source file the offending code was in. std::auto_ptr< boost::thread > mv_pThread; typedef Queue< JobPtr > JobQueue; /// Queue containing any jobs to be processed by this worker thread instance. Can Tex make a footnote to the footnote of a footnote? JohnDBCT Aug 2, 2014 at 5:25pm UTC closed account (10X9216C) Just don't use noncopyable. great post to read

Error C2248 Boost Noncopyable_ Noncopyable Noncopyable

Reply to quoted postsClear » Forums » Home » Forums » The Technical Side » General Programming English (USA) English (USA) English (USA) (COPY) Mark Community Read Forums Members Developer How can I have low-level 5e necromancer NPCs controlling many, many undead in this converted adventure? Back to top #3 Sneftel Senior Moderators -Reputation: 1788 Like 0Likes Like Posted 15 November 2007 - 09:57 AM Quote:Original post by AntheusYou are somewhere in your code, by intent

size_t pendingJobs() const; private: /// The work horse of the class. void setPleaseCancelFlag(); /// Returns true if the job should be canceled; false otherwise. There is no way to unset the flag /// once it has been set. Making the parsing of a String to an Int32 robust (valid, positive, not 0 validation) Klein's curve (algebraic geometry) Is there a word in Esperanto for "lightsaber"?

Emil Dotchevski Reverge Studios, Inc. asked 3 years ago viewed 1373 times active 3 years ago Related 1Access to class data from handler for boost deadline_timer2boost::bind with member functions (as boost::asio async write handler)1cannot access private more hot questions question feed default about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation Edit: To summarize, what I don't understand here is why the compiler is picky about when to apply the error regarding boost::noncopyable.

void requestTermination( bool bWait ); /// Returns true if the thread hasn't ended yet. It took a long time to track this down because there was zero information about even what source file the offending code was in. Back to top #3 __sprite Members -Reputation: 461 Like 0Likes Like Posted 16 May 2010 - 09:38 AM I tried deriving behaviour from boost::noncopyable, but that didn't work either.GCC provided He notes himself that he found the line of code - "it's all caused by this" - and it seems likely to me that's the header file line referenced at the

Back to top #4 SiCrane Moderators -Reputation: 11418 Like 0Likes Like Posted 15 November 2007 - 09:58 AM Or try adding a private copy constructor to your class and see but this hardly helped as I had been using socket stuff all over the place. Error C2248 Boost Noncopyable_ Noncopyable Noncopyable What is the success probability for which this is most likely to happen? Why?

asked 4 years ago viewed 3288 times active 4 years ago Related 2How to make a copyable boost::signal?10664-bit version of Boost for 64-bit windows8Creating not copyable, but movable, objects in c++2Using http://megavoid.net/error-c2248/error-c2248-fstream.html std::cout << "Enter message: "; char request[max_length]; std::cin.getline(request, max_length); size_t request_length = strlen(request); boost::asio::write(*s, boost::asio::buffer(request, request_length)); } void client::send(char c[]) { boost::asio::write(*s, boost::asio::buffer(c, max_length)); } // This will be used by Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. Register now!

And I'm not sure if anything but a compiler fix will make it better. share|improve this answer answered Jul 29 '13 at 9:06 nijansen 4,97433255 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign There are three things: 1) error (boost::noncopyable is not copyable), 2) what caused the error (automatically generating the copy-constructor for a noncopyable class, 3) which line in user's code requires the http://megavoid.net/error-c2248/error-c2248-c.html There are always ways to finesse error messages or do tricky things just to get the compiler to report a different error message.

Proof of infinitely many prime numbers What is the difference between SAN and SNI SSL certificates? Browse other questions tagged c++ boost boost-asio or ask your own question. We all know that > this spells "non-copyable".

Browse other questions tagged c++ debugging boost or ask your own question.

Inserting a DBNull value in database Would a fighter jet be able to go into orbit from Mars surface? current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list. Why are three-bladed helicopters relatively rare? Was any city/town/place named "Washington" prior to 1790?

I agree with your comments and no, I am not confusing usage of references. An experiment is repeated, and the first success occurs on the 8th attempt. class BusyGuard : private boost::noncopyable { private: ThreadState& mv_threadState; JobPtr mv_pJob; public: BusyGuard( ThreadState& ts, JobPtr pJob ); ~BusyGuard(); }; /// RAII helper to automatically unset the running flag when we his comment is here but that is a different thing. –David Rodríguez - dribeas Sep 21 '10 at 7:51 I admitted to ask the question too abstract...

Post _all_ lines of the output.Well, in this case it really wasn't very helpful. ;-) Here's the full output.Quote:1>------ Build started: Project: WorkerThreadTest, Configuration: Debug Win32 ------1>Compiling...1>TrVw_WorkerThread.cpp1>c:\dev\myprojects\workerthreadtest\workerthreadtest\h\trvw_workerthread.h(167) : error C2248: 'boost::noncopyable_::noncopyable::noncopyable' Draw an asterisk triangle Stopping time, by speeding it up inside a bubble Can a class instance variable be excluded from a subclass in Java? JohnDBCT Aug 2, 2014 at 7:24pm UTC cire (7672) Any questions or comments on how I can improve this preceding source code? Why is there a white line in Russian fighter jets canopy?

bool isBusy() const; /// Returns true if the thread is not currently processing a job and has no pending jobs left in its queue. A power source that would last a REALLY long time Could accessed sites over an SSH tunnel be tracked by ISP? What happens if anti-refelctive coating is fully ruined or removed from lens most outer surface? What part of speech is "нельзя"?

Are backpack nets an effective deterrent when going to rougher parts of the world? Roman Perepelitsa 2009-04-06 07:31:27 UTC PermalinkRaw Message Post by 041021042Post by 041021042struct A : boost::noncopyable {int a;A(int _a) : a(_a) {}bool operator == (const A& r) const { return a == Then there is no reason to inform user that an error that should never occur has, in fact, occurred. Back to top Back to General Programming Old topic!

I would appreciate any help in figuring out the error that I am getting as I am not sure what is causing it, and going through the file tree leads back Can two different firmware files have same md5 sum? You cannot reply to this topic 8 replies to this topic #1 Red Ant Members -Reputation: 471 Like 0Likes Like Posted 15 November 2007 - 08:42 AM Hi, I have bool m_bBusy; /// Internal flag stating whether the thread is still in its run() method or not.

Not the answer you're looking for? Can Tex make a footnote to the footnote of a footnote? class CancelRequest : private boost::noncopyable { public: /// Constructs a CancelRequest with the please-cancel-flag initially set to false. Back to top #5 Red Ant Members -Reputation: 471 Like 0Likes Like Posted 15 November 2007 - 09:59 AM Argg, you're right.

Aug 2, 2014 at 8:06pm UTC closed account (10X9216C) //tell user about error. class RunningGuard : private boost::noncopyable { private: ThreadState& mv_threadState; public: explicit RunningGuard( ThreadState& ts ); ~RunningGuard(); }; ThreadState mv_ThreadState; }; } #endif #include "../h/TrVw_WorkerThread.h" #include "../h/TrVw_BoostHelper.h" #include #include TrackView::WorkerThread::CancelRequest::CancelRequest( Nowhere in my code do I attempt to copy a WorkerThread, yet for some reason unknown to me, the compiler tells me: Quote:output from MSVC++ 8.0 Compiling... 1>TrVw_WorkerThread.cpp 1>c:\dev\myprojects\workerthreadtest\workerthreadtest\h\trvw_workerthread.h(167) : error