Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
andreasWallner opened this issue Sep 12, 2020 · 4 comments
Open

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

andreasWallner opened this issue Sep 12, 2020 · 4 comments

Comments

@andreasWallner
Copy link

andreasWallner commented Sep 12, 2020

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)

@Silveryard
Copy link

Is there an ETA on when this fix will be merged?

@FlyAndNotDown
Copy link

Same problems

knatten added a commit to knatten/DumbLang that referenced this issue Jan 8, 2023
Just lex it and print the tokens, since that's the only thing we can
print atm. Run this in CI as a sanity check.

I was going to use clipp for cmdline parsing, but it's broken as of
C++20: muellan/clipp#53. It also seems to be
unmaintained, the PR that fixes it has been open for >2 years:
muellan/clipp#54
knatten added a commit to knatten/DumbLang that referenced this issue Jan 8, 2023
Just lex it and print the tokens, since that's the only thing we can
print atm. Run this in CI as a sanity check.

I was going to use clipp for cmdline parsing, but it's broken as of
C++20: muellan/clipp#53. It also seems to be
unmaintained, the PR that fixes it has been open for >2 years:
muellan/clipp#54

Will need to look into finding a new cmdline parsing library.
@obi0ne
Copy link

obi0ne commented May 10, 2023

Any plans for this to be released in upcoming new version. (1.2.4 ?)
so conan can provided updated versions that compiles with C++20 ?

Is this opensource still alive ?

@andreasWallner
Copy link
Author

There is a fork by @GerHobbelt that includes this and quite a few other fixes: https://github.com/GerHobbelt/clipp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants