Home | History | Annotate | Download | only in ADT
      1 //===- Uncopyable.h -------------------------------------------------------===//
      2 //
      3 //                     The MCLinker Project
      4 //
      5 // This file is distributed under the University of Illinois Open Source
      6 // License. See LICENSE.TXT for details.
      7 //
      8 //===----------------------------------------------------------------------===//
      9 #ifndef MCLD_UNCOPYABLE_H
     10 #define MCLD_UNCOPYABLE_H
     11 #ifdef ENABLE_UNITTEST
     12 #include <gtest.h>
     13 #endif
     14 
     15 namespace mcld
     16 {
     17 
     18 /** \class Uncopyable
     19  *  \brief Uncopyable provides the base class to forbit copy operations.
     20  *
     21  */
     22 class Uncopyable
     23 {
     24 protected:
     25   Uncopyable() { }
     26   ~Uncopyable() { }
     27 
     28 private:
     29   Uncopyable(const Uncopyable&); /// NOT TO IMPLEMENT
     30   Uncopyable& operator=(const Uncopyable&); /// NOT TO IMPLEMENT
     31 };
     32 
     33 } // namespace of mcld
     34 
     35 #endif
     36 
     37