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

format_as converting struct to tuple no longer works #3763

Closed
hewillk opened this issue Dec 19, 2023 · 3 comments
Closed

format_as converting struct to tuple no longer works #3763

hewillk opened this issue Dec 19, 2023 · 3 comments

Comments

@hewillk
Copy link

hewillk commented Dec 19, 2023

#include <fmt/ranges.h>

struct Data {
  int a = 3;
  double b = 0.42;
};

auto format_as(const Data& data)
{ return std::tie(data.a, data.b); }

int main() {
  fmt::println("{}", Data{});
}

https://godbolt.org/z/d8a7EsKb4

The above code works on 10.1.1, but not on trunk.

@vitaut
Copy link
Contributor

vitaut commented Dec 19, 2023

Bisected the regression to #3713.

@vitaut
Copy link
Contributor

vitaut commented Dec 19, 2023

It's essentially the same issue as #3752 except that the repro is simpler. Let's track there.

@vitaut
Copy link
Contributor

vitaut commented Dec 23, 2023

Fixed in 3eb3aef. Thanks for reporting.

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

2 participants