Created
February 5, 2013 20:07
-
-
Save acmorrow/4717221 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In C++03, we need to resort to tricks or funky | |
// base classes to control whether classes are copyable: | |
class Foo : public boost::noncopyable{}; | |
class Bar { | |
private: | |
Bar(const Bar&); // Not implemented | |
Bar& operator=(const Bar&); // Not implemented | |
}; | |
// In C++11, we don't need these hacks: | |
class Awesome { | |
Awesome(const Awesome&) = delete; | |
Awesome& operator=(const Awesome&) = delete; | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment