Explicitly specify return value for lambda in AsStdFunction() to ensure it
works properly where return type is a reference.
This commit is contained in:
@@ -274,7 +274,7 @@ class MockFunction<R($ArgTypes)> {
|
||||
|
||||
#if GTEST_HAS_STD_FUNCTION_
|
||||
std::function<R($ArgTypes)> AsStdFunction() {
|
||||
return [this]($ArgDecls) {
|
||||
return [this]($ArgDecls) -> R {
|
||||
return this->Call($ArgNames);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user