-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fmt/ranges.h incompatible with Eigen 3.4 #3839
Comments
One potential solution appears to be patching
|
fmt::print("{}\n", fmt::streamed(m)); In this case Eigen providing broken |
@vitaut I think that See the updated godbolt here for an example: https://godbolt.org/z/xbETKd5h1 |
I think that |
I think you are right and we should improve the begin/end check. Could you submit a PR with your proposed fix? |
I hit the same issue with Eigen years ago, they haven't done a new release in years. |
I came across a similar problem, but with a different compiler error: https://godbolt.org/z/PTPzGjY1P It seems to be the same issue, where the |
@jdrouhard, if you want to override the standard range formatter you also have to opt out of it being formatted as a range or use an adapter type. |
Yeah, that's not what we're trying to do. We have some types with See the godbolt link above which shows what I'm talking about. Commenting out the It seems that the range formatter that simply detects whether a type should be formatted as a range should be disabled if the type has an explicit |
Disable formatting type as range if user provided format_as function exists, using that instead. Should fix issue raised in fmtlib#3839
Disable formatting type as range if user provided format_as function exists, using that instead. Should fix issue raised in fmtlib#3839
Fixes issue fmtlib#3839 An Eigen 3.4 2x2 matrix has a begin member function that returns void Be more strict checking that the result of calling *begin() is valid See input_or_output_iterator concept notes about void
Fixes issue fmtlib#3839 An Eigen 3.4 2x2 matrix has a begin member function that returns void Be more strict checking that the result of calling *begin() is valid See input_or_output_iterator concept notes about void
Fixes issue fmtlib#3839 An Eigen 3.4 2x2 matrix has a begin member function that returns void Be more strict checking that the result of calling *begin() is valid See input_or_output_iterator concept notes about void
Fixes issue #3839 An Eigen 3.4 2x2 matrix has a begin member function that returns void Be more strict checking that the result of calling *begin() is valid See input_or_output_iterator concept notes about void
Eigen 3.4 seems to have a significant change in behavior where
begin()
exists for all matrices, but returnsvoid
for non 1-D matrices where iteration is not well defined.This currently interferes with the
fmt/ranges.h
implementation such that the following code compiles with Eigen 3.9, but no longer compiles with 3.4.Note: This was built using the
-DFMT_DEPRECATED_OSTREAM
compiler flagGodbolt Example: https://godbolt.org/z/TzG7TMxWx
The text was updated successfully, but these errors were encountered: