PrevUpHomeNext

Struct template impl_ptr

impl_ptr

Synopsis

// In header: <impl_ptr.hpp>

template<typename user_type, 
         template< typename, typename... > class PT = detail::no_policy, 
         typename... more_types> 
struct impl_ptr {
  // types
  typedef impl_ptr< user_type, impl_ptr_policy::inplace, MT... > inplace;      
  typedef impl_ptr< user_type, impl_ptr_policy::shared >         shared;       
  typedef impl_ptr< user_type, impl_ptr_policy::unique >         unique;       
  typedef impl_ptr< user_type, impl_ptr_policy::copied >         copied;       
  typedef impl_ptr                                               impl_ptr_type;
  typedef typename impl_ptr< user_type >::implementation         impl_type;    
  typedef PT< impl_type, more_types... >                         policy_type;  

  // construct/copy/destruct
  impl_ptr(impl_ptr const &) = default;
  impl_ptr(impl_ptr &&) = default;
  impl_ptr(std::nullptr_t);
  template<typename... arg_types> 
    impl_ptr(detail::in_place_type, arg_types &&...);
  impl_ptr & operator=(impl_ptr const &) = default;
  impl_ptr & operator=(impl_ptr &&) = default;
  ~impl_ptr();

  // public static functions
  static user_type null();

  // public member functions
  bool operator!() const;
  explicit operator bool() const;
  bool operator==(user_type const &) const;
  bool operator!=(user_type const &) const;
  bool operator<(user_type const &) const;
  void swap(user_type &);
  long use_count() const;
  template<typename derived_impl_type, typename... arg_types> 
    void emplace(arg_types &&...);
  template<typename... arg_types> void emplace(arg_types &&...);
  impl_type * operator->() const;
  impl_type & operator*() const;

  // public data members
  static constexpr detail::in_place_type in_place;
};

Description

impl_ptr public construct/copy/destruct

  1. impl_ptr(impl_ptr const &) = default;
  2. impl_ptr(impl_ptr &&) = default;
  3. impl_ptr(std::nullptr_t);
  4. template<typename... arg_types> 
      impl_ptr(detail::in_place_type, arg_types &&... args);
  5. impl_ptr & operator=(impl_ptr const &) = default;
  6. impl_ptr & operator=(impl_ptr &&) = default;
  7. ~impl_ptr();

impl_ptr public static functions

  1. static user_type null();

impl_ptr public member functions

  1. bool operator!() const;
  2. explicit operator bool() const;
  3. bool operator==(user_type const & that) const;
  4. bool operator!=(user_type const & that) const;
  5. bool operator<(user_type const & that) const;
  6. void swap(user_type & that);
  7. long use_count() const;
  8. template<typename derived_impl_type, typename... arg_types> 
      void emplace(arg_types &&... args);
  9. template<typename... arg_types> void emplace(arg_types &&... args);
  10. impl_type * operator->() const;
  11. impl_type & operator*() const;

PrevUpHomeNext