template <typename From, typename To>

struct is_implicitly_convertible

Defined at line 328 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-actions.h

Detects whether an expression of type `From` can be implicitly converted to

`To` according to [conv]. In C++17, [conv]/3 defines this as follows:

An expression e can be implicitly converted to a type T if and only if

the declaration T t=e; is well-formed, for some invented temporary

variable t ([dcl.init]).

[conv]/2 implies we can use function argument passing to detect whether this

initialization is valid.

Note that this is distinct from is_convertible, which requires this be valid:

To test() {

return declval

<From

>();

}

In particular, is_convertible doesn't give the correct answer when `To` and

`From` are the same non-moveable type since `declval

<From

>` will be an rvalue

reference, defeating the guaranteed copy elision that would otherwise make

this function work.

REQUIRES: `From` is not cv void.

Public Members

static const bool value