test.cc: In function ‘int main()’: test.cc:18:16: error: no match for ‘operator=’ (operand types are ‘Foo’ and ‘int’) instance = 12; ^~ test.cc:2:7: note: candidate: constexpr Foo& Foo::operator=(const Foo&) class Foo { ^~~ test.cc:2:7: note: no known conversion for argument 1 from ‘int’ to ‘const Foo&’ test.cc:2:7: note: candidate: constexpr Foo& Foo::operator=(Foo&&) test.cc:2:7: note: no known conversion for argument 1 from ‘int’ to ‘Foo&&’