Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions highs/util/HighsDynamicLibrary.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,14 @@ class HighsDynamicLibrary {

// resolve and call a function directly (throws on failure)
template <typename FuncType, typename... Args>
#if (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || \
(defined(__cplusplus) && __cplusplus >= 201703L)
std::invoke_result_t<FuncType, Args...> call(const char* name,
Args... args) const {
#else
typename std::result_of<FuncType(Args...)>::type call(const char* name,
Args... args) const {
#endif
FuncType func;
if (!resolve(func, name)) {
throw std::runtime_error(std::string("Failed to resolve symbol: ") +
Expand Down
Loading