message: Allow resetting resource via '= nullptr'
diff: @@ -368,11 +368,20 @@ public:
  }
  consumer_resource() = default;
  +
  consumer_resource(consumer_resource&&) = default;
  +
  consumer_resource(const consumer_resource&) = default;
  +
  consumer_resource& operator=(consumer_resource&&) = default;
  +
  consumer_resource& operator=(const consumer_resource&) = default;
  + consumer_resource& operator=(std::nullptr_t) {
  + ctrl_ = nullptr;
  + return *this;
  + }
  +
  /// Tries to open the resource for reading from the buffer. The first `open`
  /// wins on concurrent access.
  /// @returns a pointer to the buffer on success, `nullptr` otherwise.
  @@ -416,11 +425,21 @@ public:
  }
  producer_resource() = default;
  +
  producer_resource(producer_resource&&) = default;
  +
  producer_resource(const producer_resource&) = default;
  +
  producer_resource& operator=(producer_resource&&) = default;
  +
  producer_resource& operator=(const producer_resource&) = default;
  + producer_resource& operator=(std::nullptr_t) {
  + ctrl_ = nullptr;
  + return *this;
  + }
  +
  +
  /// Tries to open the resource for writing to the buffer. The first `open`
  /// wins on concurrent access.
  /// @returns a pointer to the buffer on success, `nullptr` otherwise.
  