`<print>`: Problem printing 128-bit integers
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 1.7k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 22
Description
Describe the bug
std::println and std::print do not work with std::_Signed128.
test case
#include <print>
#include <ranges>
int main(void)
{
auto d = std::ranges::distance(std::ranges::iota_view(1ULL, 10ULL));
std::_Signed128 n = 123;
std::println("meow = {}", d); // consteval function 'std::__p2286::_Compile_time_parse_format_specs' cannot result in a constant expression
std::println("meow = {}", n); // consteval function 'std::__p2286::_Compile_time_parse_format_specs' cannot result in a constant expression
}
Expected behaviour
Prints:
9
123
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by compiling the provided test case and tracing std::println/std::print through _Compile_time_parse_format_specs for std::_Signed128 and the ranges distance result. Done means both calls compile and produce the expected output, 9 and 123.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100