This fixes incorrect handling of non-moveable types, adding tests for this case.
See issue 55346.
The current implementation is based on is_convertible, which is
defined in terms of
validity of the following function:
To test() { return declval<From>(); }
But this doesn't work if To and From are both some non-moveable type, which the
definition of implicit
conversions says should work due to guaranteed copy elision:
To to = E; // E has type From
It is this latter definition that is used in the
definition
of INVOKE<R>. Make invokable_r use is_core_convertible, which
captures the ability to use guaranteed copy elision, making the
definition correct for non-moveable types.
Fixes llvm/llvm-project#55346.
// Detects whether an expression of type _From can be implicitly converted to _To