mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 02:37:36 +02:00
Workaround an issue with "delete this" in GMock and gcc 6.1.1
(cherry picked from commit d00b43c592
)
This commit is contained in:
committed by
Jonathan Müller
parent
c1c963e8b9
commit
ae8ae747bd
@ -10090,8 +10090,9 @@ class FunctionMockerBase : public UntypedFunctionMockerBase {
|
|||||||
// threads concurrently.
|
// threads concurrently.
|
||||||
Result InvokeWith(const ArgumentTuple& args)
|
Result InvokeWith(const ArgumentTuple& args)
|
||||||
GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {
|
GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {
|
||||||
return static_cast<const ResultHolder*>(
|
const ResultHolder *rh = static_cast<const ResultHolder*>(
|
||||||
this->UntypedInvokeWith(&args))->GetValueAndDelete();
|
this->UntypedInvokeWith(&args));
|
||||||
|
return rh ? rh->GetValueAndDelete() : Result();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adds and returns a default action spec for this mock function.
|
// Adds and returns a default action spec for this mock function.
|
||||||
|
Reference in New Issue
Block a user