Skip to content

Compiler error when compiling with MSVC & C++20 #53

@andreasWallner

Description

@andreasWallner

The std::result_of type trait was removed with C++20 in favor of std::invoke_result. With on of MSVCs latest updates they did this removal (if set to compile as C++20), leading to compile errors of clipp because of it's use in e.g.

clipp/include/clipp.h

Lines 160 to 163 in 2c32b2f

check_is_callable(int) -> decltype(
std::declval<Fn>()(std::declval<Args>()...),
std::integral_constant<bool,
std::is_same<Ret,typename std::result_of<Fn(Args...)>::type>::value>{} );

To reproduce you can run the testsuite with /std:c++latest when using at least MSVC16.7.3 (did not check if the change occured with this or an earlier version)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions