VirtualBox

Changeset 10967 in vbox for trunk/include


Ignore:
Timestamp:
Jul 30, 2008 9:46:01 AM (17 years ago)
Author:
vboxsync
Message:

iprt/cpputils.h: added stdx::non_copyable class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/cpputils.h

    r8245 r10967  
    398398};
    399399
     400/**
     401 * A simple class used to prevent copying and assignment.  Inherit from this
     402 * class in order to prevent automatic generation of the copy constructor
     403 * and assignment operator in your class.
     404 */
     405class non_copyable
     406{
     407protected:
     408    non_copyable() {}
     409    ~non_copyable() {}
     410private:
     411    non_copyable(non_copyable const&);
     412    non_copyable const &operator=(non_copyable const&);
     413};
     414
    400415} /* namespace stdx */
    401416
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette