• C++ versions. The auto_ptr class is declared in ISO/IEC 14882, section 20.4.5 as: namespace std { template <class Y> struct auto_ptr_ref {}; template <class...
    7 KB (731 words) - 18:57, 4 December 2023
  • Smart pointer (redirect from Shared ptr)
    unique_ptr can be replaced with auto_ptr, which is now deprecated. To ease the allocation of a std::shared_ptr<SomeType> C++11 introduced: auto s = std...
    16 KB (1,847 words) - 23:23, 3 June 2024
  • library#regex.h. C++11 provides std::unique_ptr, and improvements to std::shared_ptr and std::weak_ptr from TR1. std::auto_ptr is deprecated. The C standard...
    102 KB (13,106 words) - 15:23, 3 September 2024
  • std::unique_ptr for single-owned objects and std::shared_ptr for objects with shared ownership. Similar classes are also available through std::auto_ptr...
    17 KB (2,032 words) - 21:19, 20 August 2024
  • including std::auto_ptr, std::random_shuffle, and old function adaptors. These were superseded in C++11 by improved facilities such as std::unique_ptr, std::shuffle...
    25 KB (1,995 words) - 09:32, 16 February 2024
  • C++14 (redirect from Decltype(auto))
    as if by auto. This can be used to capture by move, via the use of the standard std::move function: std::unique_ptr<int> ptr(new int(10)); auto lambda =...
    22 KB (2,438 words) - 04:13, 23 May 2024
  • constructors of some views explicit std::out_ptr and std::inout_ptr for C interoperability std::allocate_at_least and std::allocator::allocate_at_least explicit...
    54 KB (4,647 words) - 19:50, 25 August 2024
  • This is very rare but it can be seen used in the standard library's std::auto_ptr. A reference must be provided: X a; X b = a; // valid if any of the...
    12 KB (1,581 words) - 14:15, 17 May 2023
  • Equipment::getNetPrice(); for (const auto& i:equipment) { total += i->getNetPrice(); } return total; } virtual void add(std::shared_ptr<Equipment> equipment_) override...
    14 KB (1,425 words) - 04:04, 21 August 2024
  • SharedPtrAllocator { template<typename ...Args> std::shared_ptr<TypeToConstruct> construct_with_shared_ptr(Args&&... params) { return std::shared_ptr<TypeToConstruct>(new...
    13 KB (1,669 words) - 17:19, 20 August 2024