Template Class SharedPointer
Defined in File shared_pointer.hpp
Inheritance Relationships
Base Type
public DesignPattern::Creation< SharedPointer< T >, SharedPointerError >
Class Documentation
-
template<typename T>
class SharedPointer : public DesignPattern::Creation<SharedPointer<T>, SharedPointerError> DesignPattern::Creation offers us a create method which forwards the arguments to the constructor. Use this class like in the code example below.
// cxx::expected auto sharedPointer = SharedPointer<int>::Create(mySharedChunk, 123); if ( sharedPointer.has_error() ) { // ... } else { // ... }
Public Types
-
using CreationPattern_t = DesignPattern::Creation<SharedPointer<T>, SharedPointerError>
Public Functions
-
SharedPointer() = default
-
SharedPointer(const SharedPointer&) = default
-
SharedPointer(SharedPointer&&) = default
-
~SharedPointer() noexcept
-
SharedPointer &operator=(const SharedPointer&) noexcept
-
SharedPointer &operator=(SharedPointer&&) noexcept
-
explicit operator bool() const noexcept
Friends
- friend class DesignPattern::Creation< SharedPointer< T >, SharedPointerError >
-
using CreationPattern_t = DesignPattern::Creation<SharedPointer<T>, SharedPointerError>