Add a macro to disallow the copy constructor and operator= functions.

This commit is contained in:
Victor Zverovich
2014-04-27 09:46:56 -07:00
parent 5dee290482
commit 83a7b79c2d
2 changed files with 10 additions and 11 deletions
+1 -2
View File
@@ -1634,8 +1634,7 @@ TEST(FormatIntTest, FormatDec) {
class File {
private:
int fd_;
File(const File &);
void operator=(const File &);
FMT_DISALLOW_COPY_AND_ASSIGN(File);
public:
File(int fd) : fd_(fd) {}
~File() { close(fd_); }