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)
|
||||
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 (
|
||||
std::invoke (
|
||||
std::forward<FunctionT> (func),
|
||||
func (
|
||||
std::forward<ArgsT> (args)...
|
||||
)
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user