-
Couldn't load subscription status.
- Fork 1.4k
Closed as duplicate
Labels
Description
Check duplicate issues.
- Checked for duplicates
Description
Hi,
I have encountered a compilation issue when using libfmt inside ROOT Cling interpreter.
Reproducer
- Open the root:
root -l- include libfmt:
#include <fmt/format.h>- print hello world:
fmt::println("hello world");The error message would be:
ROOT_prompt_3:1:14: error: call to consteval function 'fmt::fstring<>::fstring<12UL>' is not a constant expression
fmt::println("hello world");
^
note: cast that performs the conversions of a reinterpret_cast is not allowed in a constant expression
/opt/FairSoft/include/fmt/base.h:2736:54: note: in call to 'basic_string_view(&"hello world"[0])'
if (FMT_USE_CONSTEVAL) parse_format_string<char>(s, checker(s, arg_pack()));
^
ROOT_prompt_3:1:14: note: in call to 'fstring<12UL>("hello world")'
fmt::println("hello world");
^~~~~~~~~~~~~
ROOT version
6.36.00
Installation method
build from source
Operating system
Fedora 42
Additional context
libfmt version: 11.2.0
C++ standard: 23
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Issues