Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Moderated > = delete - what...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 7 Topic 9818 of 9984
Post > Topic >>

= delete - what does this do?

by amarzumkhawala@[EMAIL PROTECTED] Jul 22, 2008 at 03:48 PM

I was looking at the std thread class for c++:

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2497.html#thread.threads

I was wondering what the "= delete" does when declaring a constructor?

-->      thread(const thread&) = delete;

Thanks

{ See the paper titled "Defaulted and Deleted Functions" at
   <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2326.html>.
   -mod/sk }

--------

class thread
{
public:
     // types:
     class id;
     typedef implementation-defined native_handle_type; // See
[thread.native]

     // construct/copy/destroy:
     thread();
     template <class F> explicit thread(F f);
     template <class F, class ...Args> thread(F&& f, Args&&... args);
     ~thread();
     thread(const thread&) = delete;
     thread(thread&&);
     thread& operator=(const thread&) = delete;
     thread& operator=(thread&&);

     // members:
     void swap(thread&&);
     bool joinable() const;
     void join();
     void detach();
     id get_id() const;
     native_handle_type native_handle(); // See [thread.native]

     // static members:
     static unsigned hardware_concurrency();
};

-- 
      [ See http://www.gotw.ca/resources/clcm.htm
for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
 




 7 Posts in Topic:
= delete - what does this do?
amarzumkhawala@[EMAIL PRO  2008-07-22 15:48:25 
Re: = delete - what does this do?
Mathias Gaunard <loufo  2008-07-22 21:02:40 
Re: = delete - what does this do?
Alberto Ganesh Barbati &l  2008-07-23 06:29:44 
Re: = delete - what does this do?
ManicQin <ManicQin@[EM  2008-07-23 07:28:21 
Re: = delete - what does this do?
Francis Glassborow <fr  2008-07-23 07:28:19 
Re: = delete - what does this do?
Francis Glassborow <fr  2008-07-23 19:23:35 
Re: = delete - what does this do?
ManicQin <ManicQin@[EM  2008-07-24 05:34:25 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Sep 7 8:40:46 CDT 2008.