C++ Logo

std-discussion

Advanced search

Deleting the Rvalue member function

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Tue, 27 Dec 2022 13:32:23 +0000
What's the compiler supposed to do here?

struct Dog {
  Dog const volatile *operator&(void) const volatile && = delete;
};

#include <iostream>
using std::cout;
using std::endl;
#include <utility>
using std::move;

int main(void)
{
  Dog d;

  d.operator&(); // Should this work?
  move(d).operator&(); // I don't think this should work
}

Received on 2022-12-27 13:32:25