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

Fix build for C++20, Fix #53 #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andreasWallner
Copy link

@andreasWallner andreasWallner commented Sep 12, 2020

As reported in #53:

C++20 removed the deprecated std::result_of in favor of
std::invoke_result.
Switch between usage of those depending on the cpp_lib_is_invocable
feature test macro.

See:

An alternative solution would be to use decltype instead of either of those two templates,
if you prefer that I'd be happy to update my PR.

C++20 removed the deprecated std::result_of in favor of
std::invoke_result.
Switch between usage of those depending on the cpp_lib_is_invocable
feature test macro.

See:
 - https://en.cppreference.com/w/cpp/types/result_of
 - https://en.cppreference.com/w/cpp/feature_test#Library_features
FlyAndNotDown added a commit to ExplosionEngine/clipp that referenced this pull request Apr 7, 2022
@nicola-gigante
Copy link

nicola-gigante commented Jun 12, 2022

Hi, I need this P.R. merged to use clipp in a C++20 project. What is blocking merging it?

@Pospelove
Copy link

please consider merging this pr

@DominikGrabiec
Copy link

If you use vcpkg then this patch is being applied care of microsoft/vcpkg#27167

knatten added a commit to knatten/DumbLang that referenced this pull request 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 pull request 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.
@danyhm
Copy link

danyhm commented Jan 16, 2023

If you use vcpkg then this patch is being applied care of microsoft/vcpkg#27167

the patch still doesn't fix the compilation. i still get this error with c++20

Severity	Code	Description	Project	File	Line	Suppression State
Warning	C26495	Variable 'clipp::group::child_t<clipp::parameter,clipp::group>::data::group' is uninitialized. Always initialize a member variable (type.6).		C:\dev\vcpkg\installed\x86-windows-static\include\clipp.h	2772	
Error (active)	E0312	no suitable user-defined conversion from "const clipp::group::child" to "const clipp::group::child" exists	C:\dev\vcpkg\installed\x86-windows-static\include\clipp.h	2968	
Error (active)	E0120	return value type does not match the function type	C:\dev\vcpkg\installed\x86-windows-static\include\clipp.h	2973	
Error (active)	E0040	expected an identifier	C:\dev\vcpkg\installed\x86-windows-static\include\clipp.h	6324	
Error (active)	E0040	expected an identifier	C:\dev\vcpkg\installed\x86-windows-static\include\clipp.h	6734	
Error (active)	E0070	incomplete type is not allowed	C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\type_traits	762	
Error (active)	E0852	expression must be a pointer to a complete object type	C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\vector	1752	
Error (active)	E0393	pointer to incomplete class type "_MAC_adapter_raw_info" is not allowed	C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\xmemory	311	
Error (active)	E0070	incomplete type is not allowed	C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\xmemory	797	
Error (active)	E0852	expression must be a pointer to a complete object type	C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\xmemory	904	
Warning	C26495	Variable 'clipp::group::child_t<clipp::parameter,clipp::group>::data::param' is uninitialized. Always initialize a member variable (type.6).	C:\dev\vcpkg\installed\x86-windows-static\include\clipp.h	2772	
Warning	C26495	Variable 'clipp::group::depth_first_traverser::memento::level_' is uninitialized. Always initialize a member variable (type.6).	C:\dev\vcpkg\installed\x86-windows-static\include\clipp.h	2831	
Warning	C4003	not enough arguments for function-like macro invocation 'max'	C:\dev\vcpkg\installed\x86-windows-static\include\clipp.h	332	
Warning	C4003	not enough arguments for function-like macro invocation 'max'	C:\dev\vcpkg\installed\x86-windows-static\include\clipp.h	333	
Error	C2589	'(': illegal token on right side of '::'	C:\dev\vcpkg\installed\x86-windows-static\include\clipp.h	332	
Error	C2589	'(': illegal token on right side of '::'	C:\dev\vcpkg\installed\x86-windows-static\include\clipp.h	5909	
Error	C2589	'(': illegal token on right side of '::'	C:\dev\vcpkg\installed\x86-windows-static\include\clipp.h	6324	
Error	C2062	type 'unknown-type' unexpected	C:\dev\vcpkg\installed\x86-windows-static\include\clipp.h	6324	
Error	C2059	syntax error: ')'	C:\dev\vcpkg\installed\x86-windows-static\include\clipp.h	6324	
Error	C2589	'(': illegal token on right side of '::'	C:\dev\vcpkg\installed\x86-windows-static\include\clipp.h	6734	
Error	C2062	type 'unknown-type' unexpected	C:\dev\vcpkg\installed\x86-windows-static\include\clipp.h	6734	
Error	C2059	syntax error: ')'	C:\dev\vcpkg\installed\x86-windows-static\include\clipp.h	6734	

@DominikGrabiec
Copy link

@danyhm That's a different error that you have.

Maybe you can try https://github.com/GerHobbelt/clipp as that seems to be more up to date.

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

Successfully merging this pull request may close these issues.

5 participants