diff options
Diffstat (limited to 'include/llvm/Support/Unique.h')
-rw-r--r-- | include/llvm/Support/Unique.h | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/include/llvm/Support/Unique.h b/include/llvm/Support/Unique.h deleted file mode 100644 index 2219553..0000000 --- a/include/llvm/Support/Unique.h +++ /dev/null @@ -1,56 +0,0 @@ -//************************************************************-*- C++ -*- -// class Unique: -// Mixin class for classes that should never be copied. -// -// Purpose: -// This mixin disables both the copy constructor and the -// assignment operator. It also provides a default equality operator. -// -// History: -// 09/24/96 - vadve - Created (adapted from dHPF). -// -//*************************************************************************** - -#ifndef UNIQUE_H -#define UNIQUE_H - -#include <assert.h> - - -class Unique -{ -protected: - /*ctor*/ Unique () {} - /*dtor*/ virtual ~Unique () {} - -public: - virtual bool operator== (const Unique& u1) const; - virtual bool operator!= (const Unique& u1) const; - -private: - // - // Disable the copy constructor and the assignment operator - // by making them both private: - // - /*ctor*/ Unique (Unique&) { assert(0); } - virtual Unique& operator= (const Unique& u1) { assert(0); - return *this; } -}; - - -// Unique object equality. -inline bool -Unique::operator==(const Unique& u2) const -{ - return (bool) (this == &u2); -} - - -// Unique object inequality. -inline bool -Unique::operator!=(const Unique& u2) const -{ - return (bool) !(this == &u2); -} - -#endif |