error when define a move assignment = default (if using type alias) · Issue #56456 · llvm/llvm-project (original) (raw)

For some reason, I used a type alias when defining the move constructor, which compiles successfully on MSVC and GCC, but Clang doesn't allow it
I tested other special member functions, copy constructor, move constructor, copy assignment function can all use the = default declaration explicitly in the case of using type alias, only move assignment function does not allow this, but it can use = delete explicitly, so is this a bug?
here is my test code

// constant reference template using RC = T const &;

// non-constant reference template using RV = T &;

// r-value reference template using RM = T&&;

struct A {

// default constructor
A () = default;
// copy constructor
A (RC<A>) = default;
// move constructor
A (RM<A>) = default;

// copy assignment
auto operator = (RC<A>) -> RV<A> = default;
// move assignment
auto operator = (RM<A>) -> RV<A> = default; // error: only special member functions may be defaulted
//auto operator = (RM<A>) -> RV<A> = delete;  // OK

};

int main () { return 0; }