win32/except: workaround for mingw and std::invoke
This commit is contained in:
parent
bad822898d
commit
4d2be853b8
@ -29,9 +29,13 @@ namespace cruft::win32 {
|
|||||||
static decltype(auto)
|
static decltype(auto)
|
||||||
try_call (FunctionT &&func, ArgsT &&...args)
|
try_call (FunctionT &&func, ArgsT &&...args)
|
||||||
{
|
{
|
||||||
|
// GCC#9.1.0: We'd like to use std::invoke here, but mingw has a
|
||||||
|
// spotty record of actually supplying this functionality.
|
||||||
|
//
|
||||||
|
// It's almost certain that we'll be calling C functions, so
|
||||||
|
// pretend that's what we received for the time being.
|
||||||
return try_value (
|
return try_value (
|
||||||
std::invoke (
|
func (
|
||||||
std::forward<FunctionT> (func),
|
|
||||||
std::forward<ArgsT> (args)...
|
std::forward<ArgsT> (args)...
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user