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

update macros for codecvt and support C++26 support on clang19 #1113

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

jmarrec
Copy link

@jmarrec jmarrec commented Jan 6, 2025

The commit you care about is 9a2884a @phlptp

where I fix the build error on LLVM 19 with C++26 after rooting the actual template issue (see #1098 (comment))

It comes down to C++26 adding a tuple interface to std::complex https://en.cppreference.com/w/cpp/numeric/complex/tuple_size

@@ -1520,6 +1520,7 @@ static_assert(CLI::detail::is_tuple_like<std::array<int, 10>>::value, "std::arra
static_assert(!CLI::detail::is_tuple_like<std::string>::value, "std::string should not be like a tuple");
static_assert(!CLI::detail::is_tuple_like<double>::value, "double should not be like a tuple");
static_assert(CLI::detail::is_tuple_like<std::tuple<double, int, double>>::value, "tuple should look like a tuple");
static_assert(!CLI::detail::is_tuple_like<std::complex<double>>::value, "std::complex should not be like a tuple");
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Static assert test

Comment on lines +298 to +300
// Even though in C++26 std::complex gains a std::tuple interface, for our purposes we treat is as NOT a tuple
template <typename S> class is_tuple_like {
template <typename SS>
template <typename SS, enable_if_t<!is_complex<SS>::value, detail::enabler> = detail::dummy>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the fix is here

Copy link

codecov bot commented Jan 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (e4ee3af) to head (9a2884a).
Report is 62 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##              main     #1113     +/-   ##
===========================================
  Coverage   100.00%   100.00%             
===========================================
  Files           17        17             
  Lines         4546      5034    +488     
  Branches         0      1029   +1029     
===========================================
+ Hits          4546      5034    +488     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

2 participants