Why do conversion operators cause ambiguous overload when const-ref and value exist
问题 I'm looking at a wrapping class, based on https://www.fluentcpp.com/category/strong-types/ The main difference is that I'm replacing the get() method with a explicit casting operator as this triggers questions during code review when used. As you can see in the simplified code below, I have 3 overloads of the casting operator: From const A & to int From A && to int From const A & to const int & When writing: static_cast<int>(a) , I expect the overload of const A & to int to be used. However,