fmtlib / fmt

A modern formatting library
https://fmt.dev
Other
19.83k stars 2.42k forks source link

Failed to detect trunk clang to support pre-compiled format #4000

Closed yujincheng08 closed 3 weeks ago

yujincheng08 commented 3 weeks ago

This one does not compile: https://godbolt.org/z/x315Y9q8Y

However, once we manually define FMT_USE_NONTYPE_TEMPLATE_ARGS, it does compile: https://godbolt.org/z/nf1YPfMvG

vitaut commented 3 weeks ago

The compiler reports class types in non-type template parameters as not supported: https://godbolt.org/z/5G1ro8G35. But we could check the clang version explicitly and enable this anyway (a PR is welcome).

yujincheng08 commented 3 weeks ago

You are right, https://en.cppreference.com/w/cpp/compiler_support also mentions this.

yujincheng08 commented 3 weeks ago

PRed