A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/fmtlib/fmt/issues/3839 below:

fmt/ranges.h incompatible with Eigen 3.4 · Issue #3839 · fmtlib/fmt · GitHub

Eigen 3.4 seems to have a significant change in behavior where begin() exists for all matrices, but returns void 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.

#include <Eigen/Core>

#include <fmt/format.h>
#include <fmt/ostream.h>
#include <fmt/ranges.h> // doesn't work if uncomment this

int main() {
  Eigen::Matrix3d m;
  m << 1, 2, 3, 4, 5, 6, 7, 8, 9;
  fmt::print("{}\n", m);

  return 0;
}

Note: This was built using the -DFMT_DEPRECATED_OSTREAM compiler flag

<source>:10:13:   required from here
/opt/compiler-explorer/libs/fmt/9.1.0/include/fmt/ranges.h:264:34: error: void value not ignored as it ought to be
  264 |     decltype(*detail::range_begin(std::declval<Range&>()));

Godbolt Example: https://godbolt.org/z/TzG7TMxWx


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4