20 General utilities library [utilities]

20.11 Smart pointers [smartptr]

20.11.2 Class bad_­weak_­ptr [util.smartptr.weak.bad]

namespace std {
  class bad_weak_ptr : public exception {
  public:
    // see [exception] for the specification of the special member functions
    const char* what() const noexcept override;
  };
}
An exception of type bad_­weak_­ptr is thrown by the shared_­ptr constructor taking a weak_­ptr.
const char* what() const noexcept override;
Returns: An implementation-defined ntbs.