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/ranges.h missing const qualifier on format member function #2754

Closed
andijcr opened this issue Feb 10, 2022 · 2 comments
Closed

format/ranges.h missing const qualifier on format member function #2754

andijcr opened this issue Feb 10, 2022 · 2 comments

Comments

@andijcr
Copy link

andijcr commented Feb 10, 2022

auto format(U& range, FormatContext& ctx) -> decltype(ctx.out()) {

this member function could use const qualifier, maybe also constexpr.

I was getting this error, before adding const to my local copy
ranges.h:525:27: error: passing ‘std::__tuple_element_t<0, std::tuple<fmt::v8::formatter<std::array<unsigned char, 8>, char, void>, fmt::v8::formatter<long unsigned int, char, void> > >’ {aka ‘const fmt::v8::formatter<std::array<unsigned char, 8>, char, void>’} as ‘this’ argument discards qualifiers

@vitaut
Copy link
Contributor

vitaut commented Feb 10, 2022

Could you submit a PR?

@andijcr
Copy link
Author

andijcr commented Feb 10, 2022

Thanks!

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