fmt icon indicating copy to clipboard operation
fmt copied to clipboard

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

Open prlw1 opened this issue 1 year ago • 2 comments

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 8e42eef495)

prlw1 avatar Feb 17 '24 17:02 prlw1

https://www.godbolt.org/z/G9jYE47nx

vitaut avatar Feb 17 '24 18:02 vitaut

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

vitaut avatar Feb 17 '24 18:02 vitaut