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

fmt/std.h happy with c++20, unhappy with c++23 #3854

Closed
prlw1 opened this issue Feb 17, 2024 · 2 comments
Closed

fmt/std.h happy with c++20, unhappy with c++23 #3854

prlw1 opened this issue Feb 17, 2024 · 2 comments

Comments

@prlw1
Copy link
Contributor

prlw1 commented Feb 17, 2024

If I compile

#include <fmt/std.h>

int main()
{
}

with g++ 14.0.1, with -std=c++20, all is well. If I use -std=c++23, I see

In file included from fmtbug.cc:1:
/usr/src/local/fmt/include/fmt/std.h:274:71: error: template argument 1 is invalid
  274 |     std::enable_if_t<is_formattable<T, Char> && is_formattable<E, Char>> {
      |                                                                       ^
/usr/src/local/fmt/include/fmt/std.h:274:73: error: template argument 3 is invalid
  274 |     std::enable_if_t<is_formattable<T, Char> && is_formattable<E, Char> {
      |                                                                        
*** Error code 1

(fmt head 8e42eef)

@vitaut
Copy link
Contributor

vitaut commented Feb 17, 2024

@vitaut
Copy link
Contributor

vitaut commented Feb 17, 2024

There is missing ::value after each is_formattable<...>. A PR to fix it would be welcome.

prlw1 added a commit to prlw1/fmt that referenced this issue Feb 17, 2024
Add ::value to is_formattable<...> as per suggestion by @vitaut in fmtlib#3854
prlw1 added a commit to prlw1/fmt that referenced this issue Feb 19, 2024
Add ::value to is_formattable<...> as per suggestion by @vitaut in
fmtlib#3854
vitaut pushed a commit that referenced this issue Feb 19, 2024
Add ::value to is_formattable<...> as per suggestion by @vitaut in
#3854
@vitaut vitaut closed this as completed Feb 19, 2024
happymonkey1 pushed a commit to happymonkey1/fmt that referenced this issue Apr 7, 2024
Add ::value to is_formattable<...> as per suggestion by @vitaut in
fmtlib#3854
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