Newer
Older
CasicIrisIdentify / utils / id / Noncopyable.h
tanyue on 16 Dec 2023 905 bytes 20231216 debug on ubuntu arm
#ifndef _JW_CORE_NONCOPYABLE_H_
#define _JW_CORE_NONCOPYABLE_H_


//  Private copy constructor and copy assignment ensure classes derived from
//  class noncopyable cannot be copied.

namespace Jiawa {
    namespace Core {

        // protection from unintended ADL(Argument Dependent Lookup)
        namespace Noncopyable_ {

            class Noncopyable
            {
            protected:
                Noncopyable() = default;
                ~Noncopyable() = default;
                
                Noncopyable(const Noncopyable&) = delete;
                Noncopyable(const Noncopyable&&) = delete;
                Noncopyable& operator=(const Noncopyable&) = delete;
                Noncopyable& operator=(const Noncopyable&&) = delete;
            };
        }

        typedef Noncopyable_::Noncopyable Noncopyable;
    }
}

#endif // _JW_CORE_NONCOPYABLE_H_