From 8e761289a2446367267c6c0d9a26e734f0f78306 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 16 Dec 2020 20:29:05 +0300 Subject: Get rid of legacy build systems and rename cutl/ to libcutl/ --- cutl/shared-ptr/base.hxx | 102 ----------------------------------------------- 1 file changed, 102 deletions(-) delete mode 100644 cutl/shared-ptr/base.hxx (limited to 'cutl/shared-ptr/base.hxx') diff --git a/cutl/shared-ptr/base.hxx b/cutl/shared-ptr/base.hxx deleted file mode 100644 index a37115b..0000000 --- a/cutl/shared-ptr/base.hxx +++ /dev/null @@ -1,102 +0,0 @@ -// file : cutl/shared-ptr/base.hxx -// license : MIT; see accompanying LICENSE file - -#ifndef CUTL_SHARED_PTR_BASE_HXX -#define CUTL_SHARED_PTR_BASE_HXX - -#include -#include // std::size_t - -#include - -#include -#include - -namespace cutl -{ - struct share - { - explicit - share (char id); - - bool - operator== (share) const; - - private: - char id_; - }; -} - -extern LIBCUTL_EXPORT cutl::share shared; -extern LIBCUTL_EXPORT cutl::share exclusive; - -#ifdef LIBCUTL_CXX11 -LIBCUTL_EXPORT void* -operator new (std::size_t, cutl::share); -#else -LIBCUTL_EXPORT void* -operator new (std::size_t, cutl::share) throw (std::bad_alloc); -#endif - -LIBCUTL_EXPORT void -operator delete (void*, cutl::share) LIBCUTL_NOTHROW_NOEXCEPT; - -namespace cutl -{ - struct LIBCUTL_EXPORT not_shared: exception - { - virtual char const* - what () const LIBCUTL_NOTHROW_NOEXCEPT; - }; - - struct LIBCUTL_EXPORT shared_base - { - shared_base (); - shared_base (shared_base const&); - shared_base& - operator= (shared_base const&); - - void - _inc_ref (); - - bool - _dec_ref (); - - std::size_t - _ref_count () const; - -#ifdef LIBCUTL_CXX11 - void* - operator new (std::size_t, share); -#else - void* - operator new (std::size_t, share) throw (std::bad_alloc); -#endif - - void - operator delete (void*, share) LIBCUTL_NOTHROW_NOEXCEPT; - - void - operator delete (void*) LIBCUTL_NOTHROW_NOEXCEPT; - - protected: - std::size_t counter_; - }; - - template - inline X* - inc_ref (X*); - - template - inline void - dec_ref (X*); - - template - inline std::size_t - ref_count (X const*); -} - -#include -#include - -#endif // CUTL_SHARED_PTR_BASE_HXX -- cgit v1.1