stdformat Questions

2

Solved

Can I use a format string defined at runtime in a std::format? This seems to say that you can't; that all format strings are a compile-time-only thing. I could have sworn that I did this only a few...
Subcelestial asked 5/2, 2023 at 6:18

1

std::format has a (compile-time and runtime) format string validation, but one thing not included in this validation is whether there are enough {} placeholders for all arguments (excessive argumen...
Archoplasm asked 7/12, 2023 at 5:52

1

Solved

Let's say I want to format a single object directly using std::formatter, bypassing std::format. How do I do that? According to Formatter, I need to call .format(value, format_ctx), where format_ct...
Hartsfield asked 16/11, 2023 at 5:47

1

Solved

I want to use the <format> header available in C++20. I am using the most up-to-date release of CMake. My CMakeFiles looks like set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) ...
Lichee asked 22/2, 2020 at 0:55

2

Solved

In C++20 - how do you make a user-defined type compatible with std::format? For example, let's say I have a type called Point: struct Point { int x; int y; }; with its operator<< define...
Lucan asked 25/1, 2020 at 12:14
1

© 2022 - 2024 — McMap. All rights reserved.